主要添加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