public class

AdminIssueLockoutFlagManager

extends Object
java.lang.Object
   ↳ com.atlassian.jira.security.AdminIssueLockoutFlagManager

Class Overview

An Administrator will be locked out of issues and projects if they do not have access to an application. We will warn the administrators of such a configuration with a UI flag. This class provides come common utility methods to help with the implementation of this flag.

Summary

Constants
String FLAG The flag ID displayed in the UI.
Public Constructors
@Inject AdminIssueLockoutFlagManager(GlobalPermissionManager globalPermissionManager, FlagDismissalService flagDismissalService, ApplicationRoleManager applicationRoleManager)
Public Methods
boolean isAdminWithoutIssuePermission(ApplicationUser user)
Return true if the passed user is an admin that does not have access to projects and issues.
@EventListener void removeDismissalOnLogin(LoginEvent loginEvent)
At each login we check if the user is an admin.
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final String FLAG

The flag ID displayed in the UI.

Constant Value: "admin.lockout"

Public Constructors

@Inject public AdminIssueLockoutFlagManager (GlobalPermissionManager globalPermissionManager, FlagDismissalService flagDismissalService, ApplicationRoleManager applicationRoleManager)

Public Methods

public boolean isAdminWithoutIssuePermission (ApplicationUser user)

Return true if the passed user is an admin that does not have access to projects and issues.

Parameters
user the user to check.
Returns
  • true if the passed user is an admin who does not have access to any projects or issues.

@EventListener public void removeDismissalOnLogin (LoginEvent loginEvent)

At each login we check if the user is an admin. If they have access to an application we clear the dismissal flag so that the flag will display again if that admin loses application access. We don't want the dismissal to be permanent.

Parameters
loginEvent the user that just logged in.