Giter Site home page Giter Site logo

Comments (6)

michaellwest avatar michaellwest commented on July 21, 2024

Can you add a screenshot showing the access on the item through each step?

from console.

RaghurajBiz avatar RaghurajBiz commented on July 21, 2024

Hi Michaell,

Please find the Screenshot

Step 1: We will run the access rights to the User
Access Item

Step 2: We will run the Revoke rights to the User
Revoke Script

Step 3: Rerun the Script of Step 1 to give access to the same user.

It's getting failed to access the site whereas the user can't see read/write as per Sitecore support, the deny access take precedence.
image

Please let me know if need any further information.

from console.

michaellwest avatar michaellwest commented on July 21, 2024

I was hoping for a screenshot from the "Security Details" tab but the use of Get-ItemAcl is just as good. As you can see, the use of Add-ItemAcl is additive and therefore the Deny overrides the Allow.

Using Set-ItemAcl may be more appropriate for what you expect to happen.

from console.

RaghurajBiz avatar RaghurajBiz commented on July 21, 2024

Hi @michaellwest,

We have checked the Set-ItemAcl option but it's overwriting the previous security information on an item.
So, we cannot use it because we will have lot of Authors working on CMS and it will break the accessibility.
of Authors for a specific item in the middle of their work.

Please help us in getting the solution for revoke/remove access for a respective user on any specific item.

Thanks,
Raghu

from console.

github-actions avatar github-actions commented on July 21, 2024

This issue is stale because it has been open for 365 days with no activity.

from console.

AdamNaj avatar AdamNaj commented on July 21, 2024

@RaghurajBiz & @michaellwest I am not sure what the nature of this problem is.

After you use the Add-ItemAcl are they not added or are they added but do not exhibit the behavior you expected?
If it's the former we need to fix it (although I could not reproduce it), if it's the latter then I would suggest that the security settings were not chosen correctly and there is another problem that is unrelated to this cmdlet or SPE in general.

Please confirm that the problem you're reporting is that Add-ItemAcl does not add the rights you've passed to it to the item and how we can reproduce it on a clean Sitecore (either with package or a script reproducing the situation).

Currently I have to assume that it works as intended based on the following script:

$authorName = "sitecore\admin"
$micrositePath = "master:/content/Home/security-test"
if(Test-Path $micrositePath){
    Remove-Item $micrositePath
}

New-Item $micrositePath -ItemType "Sample/Sample Item" | Out-Null

Write-Host "Before" -f Green

(Get-Item $micrositePath).Security.GetAccessRules()

Add-ItemAcl -Path $micrositePath -AccessRight item:read -PropagationType Any -SecurityPermission DenyAccess -Identity $authorName

Write-Host "After first assignment" -f Green
(Get-Item $micrositePath).Security.GetAccessRules()

Add-ItemAcl -Path $micrositePath -AccessRight item:read -PropagationType Any -SecurityPermission AllowAccess -Identity $authorName

Write-Host "After second assignment" -f Green
(Get-Item $micrositePath).Security.GetAccessRules()

The execution:
image

Therefore closing the issue for now. Please reopen if you think this is wrong.

from console.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.