您的位置:首页 > 其它

How to Setup AssociatedOwnerGroup / AssociatedMemberGroup / AssociatedVisitorGroup

2011-12-07 16:07 471 查看
在SharePoint 2010中,有时候会不小心将默认的3个组(AssociatedOwnerGroup / AssociatedMemberGroup / AssociatedVisitorGroup)给删除掉,如果想重新设置,可以有以下方法设置

1. Coding

using (SPSite spSite = new SPSite("SiteCollectionUrl"))
{
using (SPWeb spWeb = spSite.OpenWeb())
{
spWeb.AssociatedVisitorGroup = spWeb.Groups["VisitorsGroupName"];
spWeb.AssociatedMemberGroup = spWeb.Groups["ContributorGroupName"];
spWeb.AssociatedOwnerGroup = spWeb.Groups["OwnerGroupName"];
spWeb.Update();
}
}

2. 页面

在2010中,隐藏了设置页面,不过可以直接通过URL访问。

[YourSiteURL]/_layouts/permsetup.aspx
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: