Create SharePoint permission set – user can only add list items but don’t see them
The task – create SharePoint list so that users could only add list items but couldn’t see any items, even created by them, and, of course, couldn’t edit or delete them. May be there are some ways to do it, but I found this solution to create new permission set - user can add view site pages, view modal pages, add list items but cannot read and delete any list items.
Suddenly, SharePoint doesn’t allow to make such permission set. As often happens with SharePoint, if you can’t do it via web interface, it doesn’t mean you cannot do it at all. PowerShell will help us.
Below I write a PS-script to create permission level - user can add view site pages, view modal pages, add list items but cannot read and delete any list items.
#Create SharePoint permission level - user can add view site pages, view modal pages, add list items but cannot read and delete any list items
$spweb=Get-SPWeb -Identity "http://sp2010";
$spRoleDefinition = New-Object Microsoft.SharePoint.SPRoleDefinition;
$spRoleDefinition.Name = "Create SPListItems only";
$spRoleDefinition.Description = "List where users can only add SharePoint list items but can't see them";
$spRoleDefinition.BasePermissions = "AddListItems, ViewPages, ViewFormPages, Open";
No Comments »
No comments yet.
RSS feed for comments on this post. TrackBack URL