Hi all
Is there any possibility (JS, ScriptRunner, other ideas) to change the text in the restriction pop up?
Use Case: A lot of user doesn't understand, that the edit restriction isn't the edit permission. So they ask, why the user do not have edit permission although they "give them permission".
Thanks for any idea!
Regards, Dominic
Hi Dominic.
The following JavaScript might help to get you started with the goal, which you can append to the Custom HTML admin section.
<script type="text/javascript">
$( document ).ajaxSuccess(function( event, request, settings ) {
if (settings.url.indexOf("getcontentpermissions.action") >= 0 && (event.currentTarget.URL.indexOf("viewpage.action") >= 0 || event.currentTarget.URL.indexOf("/display/") >= 0)){
console.log("ajaxSuccess",settings.url, event.currentTarget.URL);
if ($('span.page-restrictions-dialog-explanation').html().indexOf("Everyone can view and edit this page") >= 0){
$('span.page-restrictions-dialog-explanation').html('Your custom text');
}
}
});
</script>
This script does:
I just couldn't find a way to bind it to changes on the selector.
So if the user changes from No restrictions to something else and then gets back to No restrictions, then the original text would be used.
Kind regards,
Thiago Masutti
Hey @Thiago Masutti
Thanks a lot for your help!
It's pitty, that you couldn't find a way to bind the selector changes. Because I want to show a message only in the "Only some people can view or edit"-Case.
Because then, the user thinks "Oh I gave him edit permissions", and then a support ticket could be avoid when the text would be "Only some people can view or edit. Make sure to give edit permission on the space" (Something like that)
Regards, Dominic
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I see @Dominic Lagger
If editing a bundled plugin is an option to you, which would also require you to make modifications on every upgrade, then you can change the original plugin and the related file in the translation plugins for target languages.
The jar files are located in <confluence-install>/confluence/WEB-INF/atlassian-bundled-plugins
These may be the target options:
option.edit.description=Everyone can view, only some can edit.
option.none.description=Everyone can view and edit this page.
option.viewedit.description=Only some people can view or edit.
Changing these files requires a restart and clearing the plugins cache is recommended.
If using data center, this should be changed on all nodes of the cluster.
Kind regards,
Thiago Masutti
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear @Dominic Lagger ,
removed my answer. The one of @Thiago Masutti is the best! Please accept that one.
So long
Thomas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.