Group is Not visible in site-Permission
-
Thursday, May 03, 2012 7:16 AM
Hi
I have created a group & assigned to a role (Code as given Below)
It is not showing in SiteAction=>SiteSetting=>CodeSitePermission.
But it is showing in SiteAction=>SiteSetting=>People&Groups=>Groups What should I do to appear that in SitePermission?
I am using FBA.
==================================================
====
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
All Replies
-
Friday, May 04, 2012 8:04 PM
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- Marked As Answer by synthasis_shajan Saturday, May 05, 2012 4:51 AM

