1
votes

This is a question on roles and rights security restriction on the General Link field type.

The general link field displays an Edit Link button on Page Editor and on click of the button, a general link form opens up with options to set up Internal Link, Media Link, External Link, Anchor, Mail and Javascript.

I want to hide/disable the Anchor and Javascript links for certain roles via Security Restrictions using Security Editor in Sitecore.

If I go to the Core Database and deny Read access to item at path:

sitecore/system/Field types/LinkTypes/General Link/Menu/Anchor

it hides the Anchor item for General Link field in Content Editor but not in Page Editor.

Is there a way to do hide it in Page Editor mode?

1

1 Answers

1
votes

Unfortunately, in Sitecore 7 (not sure about 8), these options are hard-coded into the dialog and do not pull from Sitecore items, so you will not be able to apply security as you normally would. As I see it, that leaves you with two options:

  1. Override the dialog's default behavior by pointing to your own implementation.

  2. Disable the options for all users by commenting out the Anchor and JavaScript sections of the following file. Place the modified file in the \sitecore\shell\Override folder.

    <webroot>\sitecore\shell\Applications\Dialogs\GeneralLink\GeneralLink.xml