I'd like to add some text to the "You are not permitted to perform this operation" generic page that shows when a user hits something in Confluence they have no access to. Specifically when accessing spaces they have no rights to.
I've seen another question here for the same thing and a link to the velocity pages, but I'm just not certain how to actually add something and have it display.
I'm running Confluence 5.3.4, I have a user macro called "spaceadmins" which shows whomever might be a space admin for the current space. So I want to have the not permitted page show:
You do not have permissions to this content, please contact these folks for access: <spaceadmins>
I've tried adding just the following into the existing div tag, within the body tag, in pagenotpermitted.vm: $helper.renderConfluenceMacro("{spaceadmins}") But I see no change to the page when I restart Confluence. Adding plain text within this div tag also doesn't reflect to a 'not permitted' page when I restart Confluence.
Any trick to this? Confluene restarted, cache cleared, etc.
Hi,
it looks like your change and what you have tested are two different thing.
It looks like your test is pointing to the Velocity template "notpermitted.vm" (located in confluence-x.x.x-source\confluence-project\confluence-core\confluence-webapp\src\main\webapp)
<html> <head> <title>$action.getText("title.not.permitted")</title> </head> <body style="margin:5px"> #parse ( "/breadcrumbs.vm" ) <div id="content" style="margin:10px;"> <p>$action.getText("not.permitted.description")</p> </div> </body> </html>
I guess this template is called if the user is not allowed to access a certain space. The template you mentioned to modify seems to work for pages within a space. So I assume the pagenotpermitted.vm is called if the user has access to the space BUT not to a defined page within.
HTH, Sabine
Oh wow that's it exactly, thank you Sabine! I didn't notice this other velocity file, and for my install it's in the 'confluence' directory in the install folder.
Confirmed my macro does load in there! Downside is it's not correctly showing the space admins for the space, but that's something I can fiddle with in the macro.
Thanks so much!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.