SharePoint custom security group is missing in Site Permissions -
i have written piece of code create custom security group in sharepoint app. code runs on feature activation @ site level , follows:
public override void featureactivated(spfeaturereceiverproperties properties) { spsite site = (spsite)properties.feature.parent; using (spweb web = site.openweb()) { if (!groupexists(web.sitegroups, "test column administrators")) { web.sitegroups.add("test administrators", web.associatedownergroup, null, "contains users , groups can administer test column articles."); web.associatedgroups.add(web.sitegroups["tets column administrators"]); web.update(); } } }
the code create group , adds sharepoint site when go site actions->site permissions (_layouts/user.aspx page), group missing. when manually go groups.aspx page (_layouts/groups.aspx) there.
how can code create group in such way appears in user/aspx page well?
thanks in advance
that ok. groups page displays list of groups exist in site. , page users.aspx displays permissions principals have within site. code ok have add more code grants permissions group if needs permissions. when group has permissions within site appear on users.aspx page. see sample how add permissions , item, same site level , web level.
Comments
Post a Comment