-
-
Notifications
You must be signed in to change notification settings - Fork 69
Description
Expected Behavior
User should get the read/write access after running AllowAccess Powershell Script.
_Please describe the expected behavior. _
User should get the read access.
Actual Behavior
User is not getting the read/write access after running AllowAccess Powershell Script.
Please describe the actual behavior.
limitation of the Add-ItemAcl command
Steps to Reproduce the Problem
Use case:
We are considering two CMS users here that is user1 and user2. Both of these users belong to "DS Author" role which is a custom role basically means content author.
Step1 - User1 creates a microsite page in SXA called Page1 using PowerShell script. In this case read permission is denied for "DS Author" role on Page1 and read/write/create/delete permission allowed for user1 explicitly on Page1. In this way no other user belong to "DS Author" role will get access of Page1 except user1.
Step2 - User1 can give read/write/create permission to user2 for Page1 using PowerShell script.
Step3 - User1 can revoke access of Page1 using PowerShell script. In this case read permission is set to denied for page1 for user2 explicitly.
Step4 - User1 can again give read/write/create permission to user2 for Page1 using PowerShell script which is mentioned in Step2.
In this case user1 is the owner of Page1 and he can give access or revoke access anytime to other users.
Now, we can see the Step4 is failing. That means when user1 gives access for the first time to user2 and then revoke access from user2 it is working fine. When user1 gives access again to user2 then it is not working.
When read access is set to denied for user2 once after that Sitecore is not setting it to allowed. This is the main issue we are facing.
I am attaching PowerShell scripts for your reference. Please let me know the solution urgently for this as it is affecting our production site.
Other Information:
We had raised the concern to sitecore support team and got the response saying since its 3rd party module they cannot provide support and redirected too here,
There will be 2 access rights for the same user, one for AllowAccess and one for DenyAccess. In Sitecore, the deny access take precedence. Hence, User2 will not be able to read the item. This is limitation of the Add-ItemAcl command.
Example:
$authorName = "user1"
$micrositePath = "master:/content/BCG/Websites/Internal Information/DesignStudios/Home/Web platform/Client Proposal/Page1"
Add-ItemAcl -Path $micrositePath -AccessRight item:read -PropagationType Any -SecurityPermission DenyAccess -Identity $authorName
Add-ItemAcl -Path $micrositePath -AccessRight item:read -PropagationType Any -SecurityPermission AllowAccess -Identity $authorName
_Please include the version number of SPE and Sitecore.
- [5.1 ] Tested issue with clean install of Sitecore and the latest available version of SPE.