I need to create a permission level for allowing to add only in document library. The issue is when i add permission: Add items, it checkes automatically View Items
I'm n sandbox solution so i don't have powershell
thanks
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It only takes a minute to sign up.
Sign up to join this communityI need to create a permission level for allowing to add only in document library. The issue is when i add permission: Add items, it checkes automatically View Items
I'm n sandbox solution so i don't have powershell
thanks
This is not possible. SharePoint expects user to have permissions to view those items which are added by the user.
However, If you want to ensure privacy by not letting users to view others items then go to List/Document Library Settings -> Advanced Settings and then set options for Read Access as "Read items that were created by the user".
For information it's possible with powershell
With this you can choose permission you want and if you want only add you can do this like this:
Add-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue
$url="http://mysp"
$web=get-spweb $url
#check permission level doesn't exist
if($web.RoleDefinitions["AddOnly"] -eq $null){
$spRoleDefinition = New-Object Microsoft.SharePoint.SPRoleDefinition
$spRoleDefinition.Name = "AddOnly"
$spRoleDefinition.Description = "Can only add"
# .Type is a ReadOnly property, hence it'll remain on "None".
# Use the command [System.Enum]::GetNames ("Microsoft.SharePoint.SPBasePermissions") to get a list of possible BasePermission values
# For this Permission Level, we'll add only add permissions:
$spRoleDefinition.BasePermissions = "AddListItems"
#ViewListItems, AddListItems, EditListItems, OpenItems, ViewVersions, Open, ViewPages, EditMyUserInfo, ManagePersonalViews"
$web.RoleDefinitions.Add($spRoleDefinition)
}else{
$PermissionLevel = "AddOnly"
$BasePermission = "AddListItems"
$spRoleDefinition = $web.RoleDefinitions[$PermissionLevel]
$spRoleDefinition.BasePermissions = $BasePermission
$spRoleDefinition.Update()
}
Out of the box I don't think there is anything you can do to achieve this. However, if you have access to SharePoint designer you can create a workflow to move submitted documents out into a separate document library with restricted permissions.
You can add a filter to the view. Filter it down to the user who created the file.
Reference:- How can I allow users to add documents to a library but not be able to open other documents listed?