cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Workflow Hero

Item Level Permission for users in the same group

Jump to solution

Hi Everyone,

 

I am a complete Sharepoint and Nintex Newbie.  I am on Sharepoint 2013.  I am trying to design a workflow that grants item level permission to the user and all users in their group.  For example if someone from California entered the form, I would like all California members to have access to that entry, and not anyone else.  I somehow need to design a workflow to lookup the group that user belongs to (maybe on a separate list) then enter that group in the permissions workflow automatically...  Or maybe use a drop down box that says the user is from California and grant permissions to the California group automatically...

 

Sorry if this is a repost, I searched and searched.  Thank you for your help!

Labels: (2)
0 Kudos
Reply
4 Replies
Workflow Hero

Re: Item Level Permission for users in the same group

Jump to solution

Hi Lawrence,

this could be done in a workflow. Depending on if you are workfing with SharePoint Groups or Active Directory Groups you will need to use a different approach.

 

If using SharePoint groups you will have to lookup the user's Groups by using the SharePoint UserGroup Web Service. You would then need to iterate the user's groups and find the group you want. It helps when your regional groups follow a specific name scheme like "myworkflow-California". Depending on the found group you can give that group permission to the list item.

 

If using Active Directory groups you will have to find the groups by using an LDAP query action, for example

(&(objectClass=person)(samaccountname=YOURSAMACCOUNTNAME))

When querying the memberOf Property the query will return all Groups the user is a member of. Again you will have to iterate them and search for one of your regional groups, ideally by a common name schema.

 

Hope this makes sense.

 

Best regards

Enrico

0 Kudos
Reply
Workflow Hero

Re: Item Level Permission for users in the same group

Jump to solution

Hi,

 

you can use the `GetRoleCollectinoFromUser` method of the UserGroup webservice to query the groups of a user. You can call this webservice using the "call web service" action.

 

You will get a chunck of XML, which can be processed using the "quey xml" action.

0 Kudos
Reply
Workflow Hero

Re: Item Level Permission for users in the same group

Jump to solution

Hi Everyone I really appreciate your quick replies.  The users are broken down by sharepoint groups I created across 7 areas in the country.  I don't really understand how to use the webservice logic so I came up with a very crude solution.  I created a workflow with parallel tasks and a run if column = certain area in the country.  Each parallel task = another area, and I input an area column in the Form.

 

I hope this method doesn't slow down my sharepoint too much...

Reply
Workflow Hero

Re: Item Level Permission for users in the same group

Jump to solution

Well basically you add the action to you workflow and configure it like this:

 


call webservice for groups.png

  1. type in the URL to the webservice
  2. add some credentials; the webservice is being called using these credentials
  3. refresh the list of available methods
  4. choose "GetGroupCollectionFromUser"
  5. add the login-name of the user for who you want to get all the groups. I choose the initiator of the current workflow, but you could also use any other field.
  6. specify a variable (of type string) where the response is being stored. The response will be a chunk of XML.
0 Kudos
Reply