Is there a way to restrict the "Source" tab based on the Tridion security group. If so, what's the setting to disable it? We are trying to restrict editors from editing from the source
3 Answers
You can make a basic GUI Extension for your components (there are some guides to do this)
Then in the js of your extension the code that you need could be something like that:
if (Tridion.UI.UserSettings.getJsonUserSettings(true).User.Data.GroupMemberships.Group)
{
if (Tridion.UI.UserSettings.getJsonUserSettings(true).User.Data.GroupMemberships.Group["@title"].toString().indexOf(YOUR_SECURITY_GROUP) == -1) {
$display.getView().properties.controls.TabControl.disableItem(2)
}
}else{
$display.getView().properties.controls.TabControl.disableItem(2)
}
The line :
$display.getView().properties.controls.TabControl.disableItem(2)
Turns the source tab (with index 2) disabled.
In addition to the information provided by Julián above, we recently used the following Anguilla code to disable the 'Source' tab on Tridion 2013 SP1 (Where we are supplying the tab id, rather than the position):
$display.getView().properties.controls.TabControl.disableItem('SourceTab');
Yes, there is a way to do this. Unfortunately it's not OOTB. We had this exact same requirement at a client who only wanted certain "less trusted" editors to only use the WYSIWYG. We ended up developing a custom GUI extension to disable the Source tab's text area based on user's group.
-
Thanks Nickoli, I suppose this cannot be shared? Or can it? TridionWorld possibly? Commented May 4, 2015 at 23:57