Answered Group is Not visible in site-Permission

  • 3 мая 2012 г. 7:16
     
     

    Hi

    I have created a group & assigned to a role (Code as given Below)
    It is not showing in SiteAction=>SiteSetting=>

    SitePermission.
    But it is showing in SiteAction=>SiteSetting=>People&Groups=>Groups

    What should I do to appear that in SitePermission?

    I am using FBA.

    ==================================================

    Code
    ====
    web.AllowUnsafeUpdates = true;

    //Create a Groups
                //----------------
                SPGroupCollection collGroups = web.SiteGroups;
                SPUser ownr = web.Author;          
                SPUser usr = web.CurrentUser;          
                collGroups.Add("Meeting_

    Attendees", usr, ownr, "Group of Meeting Participant");           
                web.Update();


      //Assign Roles
      //-----------
                SPRoleAssignment roleAssignment = new SPRoleAssignment(web.SiteGroups["Meeting_Attendees"]);
                roleAssignment.RoleDefinitionBindings.Add(web.RoleDefinitions["Read"]);


                web.RoleAssignments.Add(roleAssignment);

                web.Update();

                web.AllowUnsafeUpdates = false;

                                     


    S H A J A N

Все ответы

  • 4 мая 2012 г. 20:04
     
     Отвечено

    Shajan,

    1. Are you seeing any errors from 2nd part of your code, where you assign SPRoleAssignment to Meeting_Attendees group? ULS log, exceptions?

    2. Is your web = RootWeb? make sure you are referencing to the root web if your site inherits the permission level.

    Hope it helps

    James


    Please mark as Answered if it helped you
    James Tsai | SharePoint Consultant | MCPD,MCTS | www.jamestsai.net

    • Помечено в качестве ответа synthasis_shajan 5 мая 2012 г. 4:51
    •