How to display jira announcement banner only for logged out users

Denys Kovalenko
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.
March 17, 2014

Hello,

How to display jira announcement banner only for logged out users?

Thanks in advance,

Denys.

1 answer

1 accepted

2 votes
Answer accepted
Boris Georgiev _Appfire_
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.
March 17, 2014

That is not possible as it supports only public and private visibility and public includes private.

If you really need it you might do it by

  • set visibility to public
  • put some custom JS code in the announcement banner to hide it if a user is logged in

for example:

Banner content...some messsage bla bla bla
<script>
AJS.$(function() {
AJS.$.get(AJS.params.baseURL+"/rest/auth/1/session", function (data) {
//hide the banner
AJS.$('#announcement-banner').remove()
});
});
</script>


Denys Kovalenko
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.
March 17, 2014

It works for me.

Thanks Boris.

Suggest an answer

Log in or Sign up to answer