public class LicenseRoleAuthorizationServiceImpl extends Object implements LicenseRoleAuthorizationService
Constructor and Description |
---|
LicenseRoleAuthorizationServiceImpl(LicenseRoleManager licenseRoleManager,
GroupManager groupManager) |
Modifier and Type | Method and Description |
---|---|
boolean |
canUseRole(ApplicationUser user,
LicenseRoleId role)
Returns true if the given user has been assigned to the given role and the role is
backed by a license that grants that role.
|
int |
getUserCount(LicenseRoleId roleId)
Retrieve the number of active users for a specific license role (product).
|
boolean |
isAuthenticated(ApplicationUser user,
LicenseRoleId role)
Deprecated.
|
boolean |
isAuthenticated(LicenseRoleId role)
Deprecated.
|
boolean |
isLicenseRoleInstalled(LicenseRoleId role)
Returns true if the given license role has been defined by a product, plugin or the platform,
and there is a license present for the role.
|
public LicenseRoleAuthorizationServiceImpl(LicenseRoleManager licenseRoleManager, GroupManager groupManager)
public boolean isLicenseRoleInstalled(@Nonnull LicenseRoleId role)
LicenseRoleAuthorizationService
isLicenseRoleInstalled
in interface LicenseRoleAuthorizationService
role
- a license role identifiercom.atlassian.jira.license.JiraLicenseManager#isLicensed(LicenseRoleId)} which
provides this functionality from 6.3
public boolean canUseRole(@Nullable ApplicationUser user, @Nonnull LicenseRoleId role)
LicenseRoleAuthorizationService
canUseRole
in interface LicenseRoleAuthorizationService
user
- the user to check for access rights - if this is null, this method returns falserole
- the license role to checkLicenseRoleService#userHasRole(ApplicationUser, LicenseRoleId)} for a method which does not check the
license
@Deprecated public boolean isAuthenticated(@Nonnull LicenseRoleId role)
isAuthenticated
in interface LicenseRoleAuthorizationService
public int getUserCount(@Nonnull LicenseRoleId roleId)
LicenseRoleAuthorizationService
getUserCount
in interface LicenseRoleAuthorizationService
roleId
- is the license role ID used to identify the product.@Deprecated public boolean isAuthenticated(@Nullable ApplicationUser user, @Nonnull LicenseRoleId role)
isAuthenticated
in interface LicenseRoleAuthorizationService
Copyright © 2002-2015 Atlassian. All Rights Reserved.