I'm trying to set hidden items to true for a certain role. There's a very similar question here. I thought this might be a caching issue so I tried setting UserOptions.View.ShowHiddenItems how it is set here but that didn't work out either.

After setting the value both ways I tried manually reloading all my site's registries and I also tried using user.Profile.Reload() to see if that would update the value of UserOptions.View.ShowHiddenItems to be true but that didn't work out either.


After drilling down further in the code I found the issue. The property ShowEntireTree returns what is saved in the registry straight up while ShowHiddenItems returns false if it is false otherwise it returns whether or not the user can read the item in the core db that relates to the hidden item checkbox (/sitecore/content/Applications/Content Editor/Ribbons/Chunks/View/Hidden Items).

Giving my role read access to that made the solution here work as expected.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.