Is there a way to disable a jira banner once user logs in?

Hi,

Is there a way to only show a banner when a user is not logged in?

What I am trying to do is only show the banner when a user is not authenticated. If the user logs in, the banner doesn't display.

 

Any tips? Something that checks whether a user is logged in , etc?

Thanks. 

2 answers

1 vote
Stephen Deutsch Community Champion Jun 25, 2015

JIRA makes a javascript variable available (AJS.params) that has lots of information available, including the name of the logged in user, which is blank if the user is not authenticated.  Based on that, you could do something like this:

<div id="my-announcement" class="hidden">
  Your HTML here
</div>
<script>
  if (!AJS.params.loggedInUser) { 
    jQuery("#my-announcement").removeClass("hidden"); 
  }
</script>

Hi,

 

Could somebody help me with the same functionality. Which files do i need to modify?

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published yesterday in Jira

5 ways you can make the most of Jira Software and Bitbucket Cloud

As part of the Bitbucket product team I'm always interested in better understanding what kind of impact the use of our tools have on the way you work. In a recent study we conducted of software devel...

56 views 0 5
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you