Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Customising "You can't view this issue" screen

If a user attempts to view an issue they don't have permission for, say they're following a link from a document to an old project that has had the 'Browse Project' permission removed, they currently get a page saying "You can't view this issue, It may have been deleted or you don't have permission to view it."

Is there anyway to customise this screen?  We're required to have access to all old issues for safety reasons, but we also have about 70 projects that are no longer being worked on and haven't been for years.  I'd like to hide them from general users, but in the rare case somebody does need to access one I want to make it clear what to do.

1 answer

1 accepted

1 vote
Answer accepted
Mirek Community Leader Nov 21, 2019

Hi @cameronshiell ,

Actually a good question

There might be a page (template) that you can probably modify on the server, but without impacting the files you can try to create a redirection to a page or something that would give you information about projects, contact information, etc.

You should achieve it by adding a piece of JS code into your Announcement Banner..

How would the JS look like?

The idea behind the code is that when you load that error page containing specific element that is unique (in that case DIV with ID):

error-image.error-image-canNotBeViewed

you can do something (in that case whatever you want). I suggest a redirection somewhere (to a Confluence page for example), but you can also try to modify the page using JS if you know how to do it (of course)

So the final code would be something simple like this..

<script type="text/javascript">
jQuery(window).load(function(){

if (AJS.$("span.error-image.error-image-canNotBeViewed").length !== 0) {

var new_path = "https://google.com"

window.location.replace(new_path);
console.log("Redirection to a new page");
return false;

}
});
</script>

I hope it helps :)

Ravi Sagar Community Leader Nov 21, 2019

This is a cool trick.

Like Mirek likes this

That's a really elegant answer, thanks!

Like Mirek likes this

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Confluence

Introducing External Collaboration for Confluence

We’re excited to introduce external collaboration for Confluence, now available in early access. It is available to preview for Confluence Cloud Premium and Enterprise customers. (If you're not on ...

207 views 0 7
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you