Hello bloggers, sometimes in our companies or in our customers, we receive a requirement that the lists and / or document libraries in SharePoint 2010 it should have specific permissions "only some people can add items but don't see them on the list". What happened if we want to use the GUI to set the permissions? this happens:
Step 1: Go to Site actions\Site settigs\Site Permissions
Step 2: Permissions Level\Add a Permission Level
Step 3: if you click on the "Add Items" checkbox, the "view items" checkbox is also selected. This is because in the GUI these two permissions are dependent on one another.
To solve the requirement, In this case, we can use PowerShell to make it. There is a PowerShell cmdlet for creating / editing permission levels of the root site. This cmdlet is “New-Object Microsoft.SharePoint.SPRoleDefinition”. Let's see how to use it:
1. We need to get the web information
2. Create an instance of the New-Object
3. Assign a name for the new Role
4. Assign a description
5. Assign the base permissions
6. Assign the new role to web
7. dispose the web element
here the entire PowerShell:
Using the following command, you can see all Base Permissions:
I hope this information helps,
Regards,
Andrés Rojas
|
0 comentarios:
Publicar un comentario