Package com.atlassian.jira.web.bean
Class PermissionCheckBean
java.lang.Object
com.atlassian.jira.web.bean.PermissionCheckBean
This bean class allows for "concise" permission checks to be made. Its therefore useful in
jsp/velocity contexts for check that the user has permission to see something and hence
the UI can be adjusted appropriately.
- Since:
- v3.12
-
Constructor Summary
ConstructorsConstructorDescriptionPermissionCheckBean
(JiraAuthenticationContext authContext, PermissionManager permissionManager) -
Method Summary
Modifier and TypeMethodDescriptionboolean
isAdmin()
Tells whether the configured user (if any) has admin permission.boolean
isIssueVisible
(Issue issue) Returns true if the user has permission toPermissions.BROWSE
the issue
-
Constructor Details
-
PermissionCheckBean
public PermissionCheckBean(JiraAuthenticationContext authContext, PermissionManager permissionManager) -
PermissionCheckBean
public PermissionCheckBean()
-
-
Method Details
-
isIssueVisible
Returns true if the user has permission toPermissions.BROWSE
the issue- Parameters:
issue
- the issue in question to be checked- Returns:
- true if the user has permission to
Permissions.BROWSE
the issue. - Throws:
IllegalArgumentException
- if the issue object is nhull
-
isAdmin
public boolean isAdmin()Tells whether the configured user (if any) has admin permission.- Returns:
- true only if the user is an administrator.
-