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    

 

posted @ 2012-07-12 10:03  Leochen  阅读(368)  评论(0编辑  收藏  举报