does user have edit/create permissions on a list

Aug 15, 2013 at 9:55 PM
Is it possible to check if a user has edit/create permissions on a list? I've looked at all the permissions stuff and I saw https://spservices.codeplex.com/wikipage?title=GetRolesAndPermissionsForCurrentUser&referringTitle=Users%20and%20Groups but that seems to check on the site as a whole. I'm trying to figure out a way to see if a user has on a specific list.
Aug 15, 2013 at 11:03 PM
I though there was a way with a single call, but I cant find it now (or maybe I dreamed it existed)....

You may have have to take a two step approach: get the list of permissions on the list (Permissions.GetPermissionCollection) then iterate over that an check if user has that permission... you will be dealing with permission masks.
Aug 16, 2013 at 4:30 AM
ptavares wrote:
You may have have to take a two step approach: get the list of permissions on the list (Permissions.GetPermissionCollection) then iterate over that an check if user has that permission... you will be dealing with permission masks.
Could you expand on that? I get what you're saying but not sure how to compare it for a user...
Aug 19, 2013 at 6:43 PM
It's been a while since I have worked with Mask values, so you will need to do some research on how to compare those...

The approach is to:
  1. get the list of groups/people that have permissions to the list. This returns the Role name and permission mask (see example of output here
  2. get the user permission (using GetRolesAndPermissionsForCurrentUser... The documentation has a good example on getting the user's permissions)
Loop through the permissions for the List and check to see if user has that permission to it.

Sorry I don't have more specifics... I have done some stuff with permissions, but at the site level - similar to the example on the Documentation page for GetRolesAndPermissionsForCurrentUser.

Paul.
Aug 19, 2013 at 8:11 PM
I am going to look into this to see if I can figure it out. Thanks!
Aug 26, 2013 at 11:18 PM
I was following up on something today and came across an article that may help you here... When you get a chance, look at this:

http://social.msdn.microsoft.com/Forums/sharepoint/en-US/c32bc150-7249-423d-8018-d2f23afc1f3b/getpermissioncollection-converting-permission-mask-to-roles
Aug 29, 2013 at 10:27 PM
Awesome. Thanks. I will read it and see if I can get it to work for what I need.