Setting permissions based on Manager using workflow

We've got a workflow that finds the manager of an AD user (from InfoPath field), then Replaces the Current Item's permissions with Read for the manager only and strips everything else.

The problem is that during the moments a form has made its way to the database but BEFORE the permissions are set by the workflow, a user NOT in the chain can access the record.  Has anyone run into this before?

Any tips/tricks?

It seemed like such an unlikely thing to happen yet it has happened twice already in the last few weeks and is a real problem for us. We haven't tested to see how long the "moment" is for yet but that might be a good next step.

May 26th, 2015 7:47pm

Hi,

Can you elaborate little more about the steps you are following to set the permission for the item once you get the manager name, when we work with the workflow to edit item level permission we can edit the permission using impersonation. While editing the item  permissions , first we need to stop  inheriting  permissions  for the list where the items exists, if you are following the same, can you elaborate little bit more about your steps to come up with exact resolution.

Free Windows Admin Tool Kit Click here and download it now
May 26th, 2015 8:41pm

Couple of options spring to mind...

Assuming you are storing the Manager in a field in the InfoPath Form (maybe hidden) and promote this field to the list so you can see and use it.

Option 1:

You could modify the default view so it only shows records where Created = [Me] OR Manager = [Me]. This way user's would only see there own forms, and managers would see their forms plus the forms that were "assigned to" them.

Not foolproof, but could help to eliminate the issue.

Option 2:

Use an Event Receiver to manage the permissions on Item Created. This would ensure that the permissions would be set straight away so you wouldn't get the delay period where "other" users could access the form.

May 27th, 2015 12:51am

Hi,

Can you elaborate little more about the steps you are following to set the permission for the item once you get the manager name, when we work with the workflow to edit item level permission we can edit the permission using impersonation. While editing the item  permissions , first we need to stop  inheriting  permissions  for the list where the items exists, if you are following the same, can you elaborate little bit more about your steps to come up with exact resolution.

Free Windows Admin Tool Kit Click here and download it now
May 28th, 2015 5:27pm


Assuming you are storing the Manager in a field in the InfoPath Form (maybe hidden) and promote this field to the list so you can see and use it.


That's an interesting thought.  I thought getting the Manager of a user was only possible once the record hits the List and Designer can do its thing using a Workflow.  But you're right I can probably get the manager's name through GetUserProfileByName.  Still, once armed with that info I think a workflow still needs to be in the equation in order to actually set the permissions (i.e. InfoPath can't set permissions can it?).
May 28th, 2015 5:32pm

Duh, I think I might have missed something really simple.

Setting Item-level Permissions to default to "... created by the user" in the List's Advanced Settings probably handles all cases of the above before the workflow gets to it.

Free Windows Admin Tool Kit Click here and download it now
May 28th, 2015 5:39pm

I didn't think you could apply Item-Level Permissions in a Forms Library?
May 28th, 2015 9:49pm

Duh, I think I might have missed something really simple.

Setting Item-level Permissions to default to "... created by the user" in the List's Advanced Settings probably handles all cases of the above before the workflow gets to it.

Actually this doesn't seem to work as it overrides all item-level permissions.

Free Windows Admin Tool Kit Click here and download it now
May 29th, 2015 9:09am

I didn't think you could apply Item-Level Permissions in a Forms Library?
This is InfoPath on a List.
May 29th, 2015 9:09am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics