public interface ApplicationAccess
Application (e.g. Service Desk) installed on top of a platform
(e.g. JIRA). Note, this is not a specific licensing check, as long as there is a license that can grant access
present then there will be no access errors. That is, the access may not come from the license of the specific
application being checked.
Unless otherwise noted none of the parameters or return values can be null.| Modifier and Type | Interface and Description |
|---|---|
static class |
ApplicationAccess.AccessError
Represents the different types of access error.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
canUserAccessApplication(com.atlassian.sal.api.user.UserKey userKey)
Returns
true if the user actually able to use the associated Application. |
io.atlassian.fugue.Option<ApplicationAccess.AccessError> |
getAccessError(com.atlassian.sal.api.user.UserKey userKey)
Returns the most important reason why the passed user cannot access the
Application. |
int |
getActiveUserCount()
Returns the number of users who are currently able to access the associated
Application. |
ApplicationKey |
getApplicationKey()
Get the
ApplicationKey of the Application whose access control
is managed by this instance. |
URI |
getManagementPage()
Returns a relative URI to a screen where administrators can manage application access.
|
io.atlassian.fugue.Option<Integer> |
getMaximumUserCount()
Return the maximum number of users that can be given access to the
Application. |
ApplicationKey getApplicationKey()
ApplicationKey of the Application whose access control
is managed by this instance.ApplicationKey of the Application whose access control is managed by this instance.io.atlassian.fugue.Option<Integer> getMaximumUserCount()
Application.
Option.none() is returned to indicate there is no maximum.Option.none() is returned to indicate there is no maximum.int getActiveUserCount()
Application.
This function may be called frequently; it is strongly recommended that implementations use a caching strategy to reduce the cost of repeated calls.
Application.boolean canUserAccessApplication(@Nullable com.atlassian.sal.api.user.UserKey userKey)
true if the user actually able to use the associated Application. This method returns
true when getAccessError().isEmpty() is true.
This function may be called frequently; it is strongly recommended that implementations use a caching strategy to reduce the cost of repeated calls.
userKey - the user key. null represents the anonymous user.Application.io.atlassian.fugue.Option<ApplicationAccess.AccessError> getAccessError(@Nullable com.atlassian.sal.api.user.UserKey userKey)
Application. Option.none() will be returned
if the user can access the Application.userKey - the user key. null represents the anonymous user.Application or
Option.none() if the user is able to access the Product.URI getManagementPage()
The URI must reference a page on the current application instance.
This URI should not include the application's context path if one exists.
Copyright © 2018 Atlassian. All rights reserved.