com.atlassian.stash.user.PermissionService |
Reads the permissions of users and groups. IMPORTANT: This should not be restricted by permissions, and is not intended for querying access levels of users, but rather checking access of the current user at runtime
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
This method is deprecated.
in 2.7, scheduled for removal in 3.0. This functionality will no longer be available
in the public Java API for performance reasons
| |||||||||||
Get the groups which are granted a permission
| |||||||||||
Get the users which are granted a permission
| |||||||||||
Get the highest global permission for a group.
| |||||||||||
Get the highest global permission for a user.
| |||||||||||
Get the highest global permission for a user.
| |||||||||||
This method is deprecated.
in 2.7, scheduled for removal in 3.0. This functionality will no longer be available
in the public Java API for performance reasons
| |||||||||||
Retrieve whether the current user (authenticated or not) has access to the given project.
| |||||||||||
Retrieves whether the repository is publicly accessible.
| |||||||||||
Retrieves whether the project is publicly accessible.
| |||||||||||
Retrieve whether the current user (authenticated or not) has access to the given repository.
|
This method is deprecated.
in 2.7, scheduled for removal in 3.0. This functionality will no longer be available
in the public Java API for performance reasons
Get the number of users in the system who have the given permission
Get the groups which are granted a permission
permission | the permission in question |
---|---|
request | a page request |
Get the users which are granted a permission
permission | the permission in question |
---|---|
request | a page request |
Get the highest global permission for a group.
groupName | the group name |
---|
Get the highest global permission for a user.
user | the user |
---|
Get the highest global permission for a user.
username | the user name |
---|
This method is deprecated.
in 2.7, scheduled for removal in 3.0. This functionality will no longer be available
in the public Java API for performance reasons
Get the usernames of the users with the given permission (whether directly or though permission inheritance) This includes users granted the permission directly and those who have the permission through their group membership.
permission | the permission for which the users are being fetched. It must be global |
---|
permission | the requested permission. Must be non-global. |
---|
Permission
for any project / repositoryuser | the user in question |
---|---|
permission | the requested permission. Must be non-global. |
StashUser
has the requested Permission
for any project / repositorypermission | the permission required. |
---|
project | the project on which permission is being checked. |
---|---|
permission | the permission required. |
repository | the repository on which permission is being checked. |
---|---|
permission | the permission required. |
permission | the permission required. |
---|---|
group | the group to be checked. |
username | the user in question |
---|---|
permission | the requested permission. Must be global. |
true
if the given user identified by username
has the requested Permission
.
Will return true if the user is active
and one of the following conditions is met:
user | the user in question |
---|---|
permission | the requested permission. Must be global. |
true
if the given StashUser
has the requested Permission
.
Will return true if the user is active
and one of the following conditions is met:
permission | the requested permission. Must be global. |
---|
Permission
permission | The permission required. |
---|---|
excludedGroups | A Set of groups to be excluded from consideration. |
projectId | the id project in question |
---|---|
permission | the requested permission. Must be non-global. |
Permission
for the given Project
project | the project in question |
---|---|
permission | the requested permission. Must be non-global. |
Permission
for the given Project
user | the user in question |
---|---|
project | the project in question |
permission | the requested permission. Must be non-global. |
true
if the given StashUser
has the requested Permission
for the given Project
.
Will return true if the user is active
and one of the following conditions is met:
publicly accessible
and the permission is implied as a resultadministration rights
to Stashadministration rights
to Stashuser | the user in question |
---|---|
projectId | the id of project |
permission | the requested permission. Must be non-global. |
StashUser
has the requested Permission
for the Project
identified by projectId.project | The project on which permission is being checked. |
---|---|
permission | The permission required. |
excludedGroups | A Set of groups to be excluded from consideration. |
repositoryId | the repository in question |
---|---|
permission | the requested permission. Must be non-global. |
Permission
for the given Repository
identified by repositoryid.user | the user in question |
---|---|
repositoryId | the repository in question |
permission | the requested permission. Must be non-global. |
StashUser
has the requested Permission
for the given Repository
.repository | the repository in question |
---|---|
permission | the requested permission. Must be non-global. |
Permission
for the given Repository
user | the user in question |
---|---|
repository | the repository in question |
permission | the requested permission. Must be non-global. |
StashUser
has the requested Permission
for the given Repository
.
Will return true if the user is active
and one of the following conditions is met:
publicly accessible
and the permission is implied as a resultadministration rights
to Stashadministration rights
to Stashrepository | The repository on which permission is being checked. |
---|---|
permission | The permission required. |
excludedGroups | A Set of groups to be excluded from consideration. |
projectId | the id of the project on which to check |
---|
true
if the current user has access to the given project, false
otherwiseRetrieve whether the current user (authenticated or not) has access to the given project.
The user may have access as a result of the following:PROJECT_VIEW
permission for the given project; orwithPermission(Permission, String)
running with}
PROJECT_VIEW
permission; oris public
; orare public
project | the project on which to check |
---|
true
if the current user has access to the given project, false
otherwiseRetrieves whether the repository is publicly accessible.
Note that a repository will be public if:isRepositoryAccessible(Repository)
instead.repository | the repository on which to check |
---|
true
if unauthenticated users can access the given repository, false
otherwiseRetrieves whether the project is publicly accessible.
Note: to check whether the current user (authenticated or not) can access the project, useisProjectAccessible(Project)
instead.project | the project on which to check |
---|
true
if unauthenticated users can access the given project, false
otherwiserepositoryId | the id of the repository on which to check |
---|
true
if the current user has access to the given repository, false
otherwiseRetrieve whether the current user (authenticated or not) has access to the given repository.
The user may have access as a result of the following:REPO_READ
permission for the given repository; orwithPermission(Permission, String)
running with}
REPO_READ
permission; orrepository | the repository on which to check |
---|
true
if the current user has access to the given repository, false
otherwise