sharepoint角色。创建角色定义

示例

ClientContext oClientContext = new ClientContext("http://MyServer/sites/MySiteCollection");

Web oWebsite = clientContext.Web;

BasePermissions permissions = new BasePermissions();

permissions.Set(PermissionKind.CreateAlerts);

permissions.Set(PermissionKind.ManageAlerts);

RoleDefinitionCreationInformation roleCreationInfo = new RoleDefinitionCreationInformation();

roleCreationInfo.BasePermissions = permissions;

roleCreationInfo.Description = "A new role with create and manage alerts permission";

roleCreationInfo.Name = "Create and Manage Alerts";

roleCreationInfo.Order = 4;

RoleDefinition oRoleDefinition = oWebsite.RoleDefinitions.Add(roleCreationInfo);

clientContext.ExecuteQuery();

Console.WriteLine("{0} role created.", oRoleDefinition.Name);

           

以上是 sharepoint角色。创建角色定义 的全部内容, 来源链接: utcz.com/z/345208.html

回到顶部