Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

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

Bryan Karsh
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 25, 2015

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
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 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>
0 votes
Shashank Agrawal March 30, 2018

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
TAGS
atlassian, atlassian government cloud, fedramp, webinar, register for webinar, atlassian cloud webinar, fedramp moderate offering, work faster with cloud

Unlocking the future with Atlassian Government Cloud ☁️

Atlassian Government Cloud has achieved FedRAMP Authorization at the Moderate level! Join our webinar to learn how you can accelerate mission success and move work forward faster in cloud, all while ensuring your critical data is secure.

Register Now
AUG Leaders

Atlassian Community Events