Package com.atlassian.jira.security
Class AdminIssueLockoutFlagManager
java.lang.Object
com.atlassian.jira.security.AdminIssueLockoutFlagManager
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.
- Since:
- v7.0
-
Field Summary
-
Constructor Summary
ConstructorDescriptionAdminIssueLockoutFlagManager
(GlobalPermissionManager globalPermissionManager, FlagDismissalService flagDismissalService, ApplicationRoleManager applicationRoleManager) -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returntrue
if the passed user is an admin that does not have access to projects and issues.void
removeDismissalOnLogin
(LoginEvent loginEvent) At each login we check if the user is an admin.
-
Field Details
-
FLAG
The flag ID displayed in the UI.- See Also:
-
-
Constructor Details
-
AdminIssueLockoutFlagManager
@Inject public AdminIssueLockoutFlagManager(GlobalPermissionManager globalPermissionManager, FlagDismissalService flagDismissalService, ApplicationRoleManager applicationRoleManager)
-
-
Method Details
-
removeDismissalOnLogin
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.
-
isAdminWithoutIssuePermission
Returntrue
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.
-