Hi!
I'm jira admin and I would like to customize Error Page in Confluence 7.19
I would like the user who does not have access to the specific page to receive information on the Error page who to contact for access.
Thanks for all answers
There are a few ways this can be accomplished, none of which are easy. Meaning that they will all require some type of code customization, there's no GUI settings to customize application templates.
On Server/DC you can use the 'Custom HTML' feature within the application's General Config to add some HTML/JS logic to determine if you're on the Error page and display your custom message. Unfortunately, there's no way to determine who the space admin is, through the REST API, so what you can do is just make it clearer for the user to find who that is and inform them to reach out to them.
Here's an example:
const initCustomErrorMessage = () => {
// if .request-access div exists, we're on the 401 page, so append more details
if($('div.request-access').length > 0) {
let errorMsg = '<h3>Please reach out to a Space Administrator to request access to this resource</h3>. <p>To learn who the space administrators are for this space, click <a href="https://'+ window.location.host +'/spaces/viewspacesummary.action?key='+AJS.params.spaceKey+'">here</a>.</p>';
$('div.request-access').append(errorMsg);
}
}
AJS.toInit(function () {
initCustomErrorMessage();
})
The above solution will not work for Confluence Cloud
Thank you for your reply.
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.