I have an application where i wish to display all document libraries for which the current user has Write permissions. How can i get this information... GetLists doesnt return me anything about permissions... Whereas, "GetPermissionCollection" only returns me the permissions when the user has Full control as 开发者_开发百科permissions....so it is of no use... :(
Dont we have anything like "GetRolesAndPermissionsForCurrentUser" to get permissions for lists. I am using this to get the site level permissions for the current user... But this does not work for lists :(
Someone please do help..... :(
You can check for the permissions the current user has on the list:
List<SPList> lists = new List<SPList>();
foreach (SPList spList in properties.Web.Lists)
{
if (spList.DoesUserHavePermissions(SPBasePermissions.EditListItems))
{
lists.Add(spList);
}
}
精彩评论