Forums

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

Removing the Log In (upper right) button when using SSO

Kira Graf
Contributor
October 1, 2019

We're switching over to SSO. We've disabled the Log In screen but if you don't have a SSO account the Log In button in the upper right hand of the screen is still being displayed taking you to the regular log in. Our customer wanted that Log In button disabled, along with the ability to Log Out. Since it took a lot of googling before I figured it out I figured I'd share:

To hide the Log Out button using Scriptrunner:

  1. Scriptrunner → Script Fragments
  2. Click Add New Item -> Hide system or plugin UI element
  3. Enter the following:
    1. Name: Hide Log Out Menu Item
    2. Hide What: jira.webfragments.user.navigation.bar:log_out
    3. Condition:
// Always Hide
0

To remove Login Button using Scriptrunner:

  1. Scriptrunner → Script Fragments
  2. Click Add New Item -> Hide system or plugin UI element
  3. Enter the following:
    1. Name: Remove Login Button
    2. Hide What: com.atlassian.jira.jira-header-plugin:user-menu
    3. Condition:
import com.atlassian.jira.component.ComponentAccessor

def user = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser()

if (user) {
return 1
} else {
return 0
}

 

2 answers

0 votes
Jon Espen Ingvaldsen Kantega SSO
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.
October 3, 2019

Thanks! Great work!

0 votes
Ravi Sagar _Sparxsys_
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.
October 2, 2019

Thanks for sharing :)

Suggest an answer

Log in or Sign up to answer