Sharepoint 2010:基于当前用户判断访问列表项目的权限 --Determine access to SPListItem based on a Current User

In that case you could check / ensure permissions on a certain list item with the method DoesUserHavePermissions:

SPListItem
item =//...
if(item.DoesUserHavePermissions(SPContext.Current.Web.CurrentUser,SPBasePermissions.ViewListItems))
{
 
// futher actions if user has permission goes here.
}

posted on 2012-02-07 15:35  SUNJUNLIN  阅读(255)  评论(0编辑  收藏  举报

导航