Class SoftwareAuthorizationServiceImpl
java.lang.Object
com.atlassian.greenhopper.license.SoftwareAuthorizationServiceImpl
- All Implemented Interfaces:
SoftwareAuthorizationService
@Service
public class SoftwareAuthorizationServiceImpl
extends Object
implements SoftwareAuthorizationService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
canUseApplication
(com.atlassian.jira.user.ApplicationUser user) Determines whether the given user is allowed to access the JIRA Software application.Collection<com.atlassian.application.api.ApplicationAccess.AccessError>
Get any errors that would occur when accessing the Software application.void
Determines whether a valid license is present for the JIRA Software application.
-
Constructor Details
-
SoftwareAuthorizationServiceImpl
public SoftwareAuthorizationServiceImpl()
-
-
Method Details
-
canUseApplication
public boolean canUseApplication(@Nullable com.atlassian.jira.user.ApplicationUser user) Description copied from interface:SoftwareAuthorizationService
Determines whether the given user is allowed to access the JIRA Software application.- Specified by:
canUseApplication
in interfaceSoftwareAuthorizationService
- Parameters:
user
- the user to check for access rights - if this is null, this method returns false- Returns:
- true if the user has been assigned to JIRA Software and the application is backed by a license.
-
verifySoftwareLicense
public void verifySoftwareLicense() throws com.atlassian.extras.common.LicenseExceptionDescription copied from interface:SoftwareAuthorizationService
Determines whether a valid license is present for the JIRA Software application.- Specified by:
verifySoftwareLicense
in interfaceSoftwareAuthorizationService
- Throws:
com.atlassian.extras.common.LicenseException
- if a Software license is not present, or if the Software license has expired, or if the number of users specified in the Software license has been exceeded.
-
getSoftwareLicensingAccessErrors
public Collection<com.atlassian.application.api.ApplicationAccess.AccessError> getSoftwareLicensingAccessErrors()Description copied from interface:SoftwareAuthorizationService
Get any errors that would occur when accessing the Software application. Note, this only checks access errors resulting from licensing, not from particular users accessing the Software application.- Specified by:
getSoftwareLicensingAccessErrors
in interfaceSoftwareAuthorizationService
- Returns:
- a collection of
com.atlassian.greenhopper.license.ApplicationAccessError
that represents various licensing violations. An empty collection means there is no violation.
-