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:
- Scriptrunner → Script Fragments
- Click Add New Item -> Hide system or plugin UI element
- Enter the following:
- Name: Hide Log Out Menu Item
- Hide What: jira.webfragments.user.navigation.bar:log_out
- Condition:
// Always Hide
0
To remove Login Button using Scriptrunner:
- Scriptrunner → Script Fragments
- Click Add New Item -> Hide system or plugin UI element
- Enter the following:
- Name: Remove Login Button
- Hide What: com.atlassian.jira.jira-header-plugin:user-menu
- Condition:
import com.atlassian.jira.component.ComponentAccessor
def user = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser()
if (user) {
return 1
} else {
return 0
}