判断一个用户在SPItem上是否有权限的方法:
判断用户是否在SPItem上有权限public static bool UserInItemExists(SPWeb web, SPListItem item, string strUserLoginName) { bool boolResult = false; try { if (item != null) { SPRoleAssignmentCollection roles = item.RoleAssignments; foreach (SPRoleAssignment role in roles) { sbResult.Append(role.Member.Name.ToUpper().Trim()); SPUser loginuser = null; try { loginuser = new SPSite(SPContext.Current.Site.Url).RootWeb.Users[strUserLoginName]; } catch { loginuser = null; } SPUser memberuser = null; try { memberuser = ((Microsoft.SharePoint.SPUser)(role.Member)); } catch { memberuser = null; } if (loginuser != null && memberuser != null) { if (loginuser.Sid == memberuser.Sid) { boolResult = true; break; } } } } } catch { } return boolResult; }