主要添加Domain User 来控制其权限,下面是代码

        SPRoleAssignment domainUsers = new SPRoleAssignment(web.EnsureUser(Environment.UserDomainName+"\\Domain Users"));
        domainUsers.RoleDefinitionBindings.Add(web.RoleDefinitions["参与讨论"]);
        list.RoleAssignments.Add(domainUsers);

        list.WriteSecurity = 2;
        list.ReadSecurity = 2;   

代码下载:

https://files.cnblogs.com/gzh4455/SurgeyRightManager.aspx.zip

posted on 2012-08-06 17:10  gzh4455  阅读(308)  评论(0编辑  收藏  举报