public abstract class AbstractUserManagementPermissionCondition extends Object implements com.atlassian.plugin.web.Condition
admin
privileges and that some other Crowd-based condition is met.Constructor and Description |
---|
AbstractUserManagementPermissionCondition(com.atlassian.bitbucket.user.UserAdminService adminService,
com.atlassian.bitbucket.permission.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. |
Modifier and Type | Method and Description |
---|---|
void |
init(Map<String,String> map)
No initialisation is necessary, because the permission is fixed as
admin . |
boolean |
shouldDisplay(Map<String,Object> map)
Ensures the user has
admin privileges and then delegates to
shouldDisplay(UserAdminService) to perform the Crowd check. |
protected abstract boolean |
shouldDisplay(com.atlassian.bitbucket.user.UserAdminService crowdService)
Implemented in derived classes to perform a user management check to verify the required condition.
|
public AbstractUserManagementPermissionCondition(com.atlassian.bitbucket.user.UserAdminService adminService, com.atlassian.bitbucket.permission.PermissionService permissionService)
AbstractUserManagementPermissionCondition
which will use the provided
PermissionService
to perform the admin
check and the provided
UserAdminService
to perform the user management check.adminService
- the user admin service to use when performing checkspermissionService
- the permission service to use when performing checkspublic void init(Map<String,String> map)
admin
.init
in interface com.atlassian.plugin.web.Condition
map
- ignoredpublic boolean shouldDisplay(Map<String,Object> map)
admin
privileges and then delegates to
shouldDisplay(UserAdminService)
to perform the Crowd check.shouldDisplay
in interface com.atlassian.plugin.web.Condition
map
- ignoredtrue
if the user has admin privileges and the required Crowd condition is met; otherwise,
false)
protected abstract boolean shouldDisplay(com.atlassian.bitbucket.user.UserAdminService crowdService)
crowdService
- the service to use when performing the checktrue
if the check passes; otherwise, false
Copyright © 2021 Atlassian. All rights reserved.