3

Issue Description

The entire Sitecore Powershell context menu is not visible for any content editor. I've tried creating a user and adding every role (except for ones like limited content editor etc). The only way I can get it to pop-up is to make the user an Administrator.

  • SPE: 4.4
  • Sitecore: 8.2 rev. 160729

Expected Behavior

The user with the role 'Sitecore Client Authoring' should be able to read the powershell context menu items when right clicking an item.

Actual Behavior

The entire scripts context menu is not visible to the content editor.

Steps to Reproduce the Problem

  • Create a new (/sitecore/templates/Modules/PowerShell Console/) PowerShell Script Module in /sitecore/system/Modules/PowerShell/Script Library/My Module.

    • Create a Powershell Script Library (child of the module) named Content Editor
    • Create a Powershell Script Library (child of the content editor script library) named Context Menu
    • Create a Powershell Script Library (child of the context menu script library) named My Scripts
    • Create a new Powershell Script item My Super Cool Script
  • Create a new user and apply the roles:

    • sitecore\Author
    • sitecore\Sitecore Client Social Authoring
    • sitecore\Analytics Testing
    • sitecore\Sitecore Client Users
    • sitecore\Analytics Personalisation
    • sitecore\Sitecore Client Authoring
    • sitecore\Designer
    • sitecore\Sitecore Client Designing
  • Log in using the new user account

  • Right click an item, the context menu is not visible

Access Rights In Core Database Script Set-up Context Menu Example

2

The Scripts context menu actually uses a different item in the core db.

The security settings can be seen here. In SPE 4.7 you should expect the visibility to respect sitecore\Sitecore Limited Content Editor (deny read).

In your screenshot it appears you are expecting the Edit Scripts command to work, when you actually need Context PowerShell Scripts.

Context PowerShell Scripts

I added a new user to the sitecore\Author role and without making any other security change I could immediately see the appropriate Scripts context menu.

Menu

Without any extra work I followed the script creation steps you provided and the menu appears as expected.

Working Menu

If the menu does not appear it would have to be a security role added to the user or to a specific set of items.

1

Are you sure you want to enable script editing for all content authors?

The problem I see with this approach is that you are giving a lot of power for those users and if they know their way around scripting they can mess up you website.

But you can still create scripts and make them available to those users through the click of a button for example. You can always create a ribbon button on the Content Editor which when you click it, it executes your script. Here you can find an example of generating a powershell report when users click on a button on the content editor. This points you to the right direction in this sense.

If your answer is still YES I want to enable that for content authors:

Looking at your screenshots seem like the role Sitecore Client Authoring is being granted but the role Sitecore Client Users denies access. The way Sitecore security works for roles is if there is one role which grants and another which denies access it will deny it. You can read more about it here

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.