public abstract class

AbstractUserManagementPermissionCondition

extends Object
implements Condition
java.lang.Object
   ↳ com.atlassian.bitbucket.web.conditions.AbstractUserManagementPermissionCondition
Known Direct Subclasses

Class Overview

An abstract base class for constructing a condition check which validates that the user has admin privileges and that some other Crowd-based condition is met.

Summary

Public Constructors
AbstractUserManagementPermissionCondition(UserAdminService adminService, PermissionService permissionService)
Constructs a new AbstractUserManagementPermissionCondition which will use the provided PermissionService to perform the admin check and the provided UserAdminService to perform the user management check.
Public Methods
void init(Map<StringString> map)
No initialisation is necessary, because the permission is fixed as admin.
boolean shouldDisplay(Map<StringObject> map)
Ensures the user has admin privileges and then delegates to shouldDisplay(UserAdminService) to perform the Crowd check.
Protected Methods
abstract boolean shouldDisplay(UserAdminService crowdService)
Implemented in derived classes to perform a user management check to verify the required condition.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.plugin.web.Condition

Public Constructors

public AbstractUserManagementPermissionCondition (UserAdminService adminService, PermissionService permissionService)

Constructs a new AbstractUserManagementPermissionCondition which will use the provided PermissionService to perform the admin check and the provided UserAdminService to perform the user management check.

Parameters
adminService the user admin service to use when performing checks
permissionService the permission service to use when performing checks

Public Methods

public void init (Map<StringString> map)

No initialisation is necessary, because the permission is fixed as admin.

Parameters
map ignored

public boolean shouldDisplay (Map<StringObject> map)

Ensures the user has admin privileges and then delegates to shouldDisplay(UserAdminService) to perform the Crowd check.

Parameters
map ignored
Returns
  • true if the user has admin privileges and the required Crowd condition is met; otherwise, false)

Protected Methods

protected abstract boolean shouldDisplay (UserAdminService crowdService)

Implemented in derived classes to perform a user management check to verify the required condition.

Parameters
crowdService the service to use when performing the check
Returns
  • true if the check passes; otherwise, false