sharepoint2010 查看某用户在当前item上的权限级别
sharepoint2010 查看某用户在当前item上的权限级别
1 SPRoleAssignment assignment = listitem.RoleAssignments.GetAssignmentByPrincipal((SPPrincipal)user);
2 foreach (SPRoleDefinition role in assignment.RoleDefinitionBindings)
3 {
4 String roleName = role.Name;
5 SPBasePermissions permission = role.BasePermissions;
6 Console.Write(roleName + "\n");
7
8 }
9
2 foreach (SPRoleDefinition role in assignment.RoleDefinitionBindings)
3 {
4 String roleName = role.Name;
5 SPBasePermissions permission = role.BasePermissions;
6 Console.Write(roleName + "\n");
7
8 }
9