Monday, February 20, 2012

Custom Permissions In SharePoint

- Including removing the ability to delete saved InfoPath form data for contributors


There are many reasons you may need a custom permissions level in SharePoint, as the default permission levels available do not cover all application scenarios.

One very common requirement for InfoPath Form Systems is to prevent the user from being able to delete their form information once submitted. The lowest permission level that will allow a user to submit to a form library is "Contribute", but, by default, contribute also includes the delete ability. A custom permission level is necessary here, see the "Contribute without delete" section of this post.

If you use content approval to control permissions on a form library (see: Prevent Multiple Active Forms for One User ), you may need a specific group of users that should be able to open and review any form, moving the information along as part of the process. A couple of common examples are a manager who approves a vacation request, or a help desk request that is then reviewed by support staff. In this case, we create a custom permission that can then be associated with this group of users to allow this functionality. See "Create an Approvers Permission Level".

Of course, you can create any custom permission that your solution requires. These are examples of the process that can be followed for any custom permission.

Contribute without Delete

1. “Site Actions” -> “Site Permissions”.
2. In the “Manage” section of the Office Ribbon, choose “Permission Levels”.
3. Click the “Contribute” permission level.
4. Scroll down to the bottom of the page and choose “Copy Permission Level”.
5. Name your new permission level “Contribute without Delete”.
6. Fill out the description with similar to “All permissions of Contribute without delete”.
7. In the “List Permissions” section, remove the checkmark beside “Delete Items – Delete items from a list and documents from a document library”.
8. Click “Submit”.

You now have a contribute without delete permission level. Create a group with this permission level and associate directly to the form library (not the site) that hosts the InfoPath form. Users who belong to the group with this permission level will be able to submit form information to the library, but not delete it.

Create an Approvers Permission Level

1. Login to your site as a site admin.
2. “Site Actions” -> “Site Permissions”.
3. In the “manage” section of the Office Ribbon, click “Permission Levels”.
4. Click the “Contribute” permission level link.
5. Scroll to the bottom of the form and select “Copy Permission Level”.
6. A new permission level form page will open, with all of the contribute permission levels displayed. Name this new permission level “Approve”. For the description, type “All permissions of Contribute plus Content Approval.”
7. In the “List Permissions” section, Check “Approve Items”.
8. Click “Submit”.

You can now use this permission level to give users contribute and approval levels in your groups. If you use content approval, users in this group will be able to see all items in "pending" status.

No comments:

Post a Comment