| Modifier and Type | Method and Description | 
|---|---|
Permission | 
PermissionModifiedEvent.getNewValue()  | 
Permission | 
AbstractGlobalPermissionModificationEvent.getNewValue()  | 
Permission | 
PermissionModificationRequestedEvent.getNewValue()  | 
Permission | 
AbstractRepositoryPermissionModificationEvent.getNewValue()  | 
Permission | 
AbstractProjectPermissionModificationEvent.getNewValue()  | 
Permission | 
PermissionModifiedEvent.getOldValue()  | 
Permission | 
AbstractGlobalPermissionModificationEvent.getOldValue()  | 
Permission | 
PermissionModificationRequestedEvent.getOldValue()  | 
Permission | 
AbstractRepositoryPermissionModificationEvent.getOldValue()  | 
Permission | 
AbstractProjectPermissionModificationEvent.getOldValue()  | 
Permission | 
PermissionEvent.getPermission()  | 
Permission | 
PermissionRevocationRequestedEvent.getPermission()  | 
Permission | 
PermissionRevokedEvent.getPermission()  | 
Permission | 
PermissionGrantedEvent.getPermission()  | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
LicenseService.validateCanLicenseGroup(String group,
                       Permission permission)
Validate if the specified group can be licensed without violating license limits. 
 | 
void | 
LicenseService.validateCanLicenseUser(ApplicationUser user,
                      Permission permission)
Validate if the given user can be licensed without violating license limits 
 | 
| Modifier and Type | Method and Description | 
|---|---|
static Permission | 
Permission.fromId(int id)
Gets a permission by its id. 
 | 
static Permission | 
Permission.fromWeight(int weight)
Gets a permission by its weight. 
 | 
Permission | 
PermissionService.getHighestGlobalGroupPermission(String groupName)
Get the highest global permission for a group. 
 | 
Permission | 
PermissionService.getHighestGlobalPermission(ApplicationUser user)
Get the highest global permission for a user. 
 | 
Permission | 
PermissionService.getHighestGlobalPermission(String username)
Get the highest global permission for a user. 
 | 
Permission | 
PermissionRequest.getPermission()  | 
Permission | 
PermittedUser.getPermission()
Retrieves the permission which has been granted to the user. 
 | 
Permission | 
SetPermissionRequest.getPermission()  | 
Permission | 
PermittedGroup.getPermission()
Retrieves the permission which has been granted to the group. 
 | 
static Permission | 
Permission.max(Permission p1,
   Permission p2)
Gets the permission with the maximum  
weigth. | 
static Permission | 
Permission.valueOf(String name)
Returns the enum constant of this type with the specified name. 
 | 
static Permission[] | 
Permission.values()
Returns an array containing the constants of this enum type, in
the order they are declared. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
static Set<Permission> | 
Permission.getGlobalPermissions()
Gets all the global permissions. 
 | 
Set<Permission> | 
Permission.getImplyingPermissions()
Get the set of permissions that inherit this permission (excluding this permission). 
 | 
Set<Permission> | 
Permission.getInheritedPermissions()
Gets all permissions this permission inherits. 
 | 
Set<Permission> | 
Permission.getInheritingPermissions()
Gets all permissions that inherit this permission (including this permission). 
 | 
static Set<Permission> | 
Permission.getPermissionsOn(Class<?> resourceClass)
Gets all the permissions associated with a resource. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
Predicate<Project> | 
PermissionPredicateFactory.createProjectPermissionPredicate(Permission permission)  | 
Predicate<PullRequest> | 
PermissionPredicateFactory.createPullRequestPermissionPredicate(Permission permission)
Retrieves a  
Predicate which applies a check to ensure the current user has the specified permission with
 regards to PullRequests. | 
Predicate<Repository> | 
PermissionPredicateFactory.createRepositoryPermissionPredicate(Permission permission)  | 
Page<String> | 
PermissionService.getGrantedGroups(Permission permission,
                PageRequest request)
Get the groups which are granted a permission 
 | 
Page<ApplicationUser> | 
PermissionService.getGrantedUsers(Permission permission,
               PageRequest request)
Get the users which are granted a permission 
 | 
Set<String> | 
PermissionService.getUsersWithPermission(Permission permission)
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. 
 | 
SetPermissionRequest.Builder | 
SetPermissionRequest.Builder.globalPermission(Permission permission)  | 
void | 
PermissionAdminService.grantAllProjectPermission(Permission permission,
                         Project project)
Grant a project permission to all users users 
 | 
boolean | 
PermissionAdminService.hasAllProjectPermission(Permission permission,
                       Project project)
Check if the given project permission has been granted to every logged in user for the given project. 
 | 
boolean | 
PermissionService.hasAnyUserPermission(ApplicationUser user,
                    Permission permission)  | 
boolean | 
PermissionService.hasAnyUserPermission(Permission permission)  | 
boolean | 
PermissionService.hasDirectGlobalUserPermission(Permission permission)  | 
boolean | 
PermissionService.hasDirectProjectUserPermission(Project project,
                              Permission permission)  | 
boolean | 
PermissionService.hasDirectRepositoryUserPermission(Repository repository,
                                 Permission permission)  | 
boolean | 
PermissionService.hasGlobalGroupPermission(Permission permission,
                        String group)  | 
boolean | 
PermissionService.hasGlobalPermission(ApplicationUser user,
                   Permission permission)
Will return true if the user is  
active and one of the following conditions
  is met:
  
      permission is granted directly for the given user
      permission is granted to a group the given user is a member of
   | 
boolean | 
PermissionService.hasGlobalPermission(Permission permission)  | 
boolean | 
PermissionService.hasGlobalPermission(String username,
                   Permission permission)
Will return true if the user is  
active and one of the following conditions
  is met:
  
      permission is granted directly for the given user
      permission is granted to a group the given user is a member of
   | 
boolean | 
PermissionService.hasGlobalPermissionThroughGroupMembership(Permission permission,
                                         Set<String> excludedGroups)  | 
boolean | 
PermissionService.hasProjectPermission(ApplicationUser user,
                    int projectId,
                    Permission permission)  | 
boolean | 
PermissionService.hasProjectPermission(ApplicationUser user,
                    Project project,
                    Permission permission)
Will return true if the user is  
active and one of the following conditions
 is met:
 
     permission is granted directly for the given user on the given project
     permission is granted for all logged in users on the given project
     permission is granted to a group the given user is a member of on the given project
     The given user is directly granted a permission on at least one repository within the given project
     and the given permission is implied as a result
     A group the given user is a member of is granted a permission on at least one repository within the
         given project and the given permission is implied as a result
     The given project is publicly accessible and the permission is
         implied as a result
     the given user is directly granted administration rights
     A group the given user is a member of is granted administration rights
  | 
boolean | 
PermissionService.hasProjectPermission(int projectId,
                    Permission permission)  | 
boolean | 
PermissionService.hasProjectPermission(Project project,
                    Permission permission)  | 
boolean | 
PermissionService.hasProjectPermissionThroughGroupMembership(Project project,
                                          Permission permission,
                                          Set<String> excludedGroups)  | 
boolean | 
PermissionService.hasRepositoryPermission(ApplicationUser user,
                       int repositoryId,
                       Permission permission)  | 
boolean | 
PermissionService.hasRepositoryPermission(ApplicationUser user,
                       Repository repository,
                       Permission permission)
Will return true if the user is  
active and one of the following conditions
 is met:
 
     permission is granted directly for the given user on the given repository
     permission is granted to a group the given user is a member of on the given repository
     The given user is directly granted a permission on the containing project and the given permission is
         implied as a result
     A group the given user is a member of is granted a permission on the containing project and the given
         permission is implied as a result
     All logged in users are granted a permission to the containing project and the given permission is
         implied as a result
     The given repository is publicly accessible and the permission
         is implied as a result
     the given user is directly granted administration rights
     A group the given user is a member of is granted administration rights
 
 This method will always return false if the user given is null as
 anonymous users cannot be granted permissions by definition. | 
boolean | 
PermissionService.hasRepositoryPermission(int repositoryId,
                       Permission permission)  | 
boolean | 
PermissionService.hasRepositoryPermission(Repository repository,
                       Permission permission)  | 
boolean | 
PermissionService.hasRepositoryPermissionThroughGroupMembership(Repository repository,
                                             Permission permission,
                                             Set<String> excludedGroups)  | 
boolean | 
PermissionService.hasUserPermission(ApplicationUser user,
                 ApplicationUser targetUser,
                 Permission permission)  | 
boolean | 
PermissionService.hasUserPermission(ApplicationUser user,
                 int targetUserId,
                 Permission permission)  | 
boolean | 
PermissionService.hasUserPermission(ApplicationUser targetUser,
                 Permission permission)  | 
boolean | 
PermissionService.hasUserPermission(int targetUserId,
                 Permission permission)  | 
boolean | 
PermissionService.hasUserPermission(Permission permission)  | 
static Permission | 
Permission.max(Permission p1,
   Permission p2)
Gets the permission with the maximum  
weigth. | 
SetPermissionRequest.Builder | 
SetPermissionRequest.Builder.projectPermission(Permission permission,
                 Project project)  | 
SetPermissionRequest.Builder | 
SetPermissionRequest.Builder.repositoryPermission(Permission permission,
                    Repository repository)  | 
void | 
PermissionAdminService.revokeAllProjectPermission(Permission permission,
                          Project project)
Revoked a project permission from all users users 
 | 
void | 
PermissionValidationService.validateForGlobal(Permission permission)
Validate that the current user has the specified global permission 
 | 
void | 
PermissionValidationService.validateForProject(int projectId,
                  Permission permission)
Validate that the current user has the specified permission for the project 
 | 
void | 
PermissionValidationService.validateForProject(Project project,
                  Permission permission)
Validate that the current user has the specified permission for the project 
 | 
void | 
PermissionValidationService.validateForRepository(int repositoryId,
                     Permission permission)
Validate that the current user has the specified permission for the repository 
 | 
void | 
PermissionValidationService.validateForRepository(Repository repository,
                     Permission permission)
Validate that the current user has the specified permission for the repository 
 | 
void | 
PermissionValidationService.validateForUser(ApplicationUser targetUser,
               Permission permission)
Validate that the current user has the specified permission for the target user. 
 | 
void | 
PermissionValidationService.validateForUser(int targetUserId,
               Permission permission)
Validate that the current user has the specified permission for the target user. 
 | 
void | 
PermissionValidationService.validateForUser(Permission permission)
Validate that the current user has the specified permission for itself 
 | 
| Constructor and Description | 
|---|
Builder(Permission permission)  | 
| Modifier and Type | Method and Description | 
|---|---|
Permission | 
ProjectSearchRequest.getPermission()
When set, limits returned  
projects to only those for which the current user has the required
 Permission. | 
| Modifier and Type | Method and Description | 
|---|---|
ProjectSearchRequest.Builder | 
ProjectSearchRequest.Builder.permission(Permission value)
When set, limits returned  
projects to only those for which the current user has the required
 Permission. | 
| Modifier and Type | Method and Description | 
|---|---|
Permission | 
RepositorySearchRequest.getPermission()
When set, limits returned  
repositories to only those for which the current user has the
 required Permission. | 
| Modifier and Type | Method and Description | 
|---|---|
RepositorySearchRequest.Builder | 
RepositorySearchRequest.Builder.permission(Permission value)
Set the permission level for the resulting  
request instance. | 
| Modifier and Type | Method and Description | 
|---|---|
Page<Repository> | 
RecentlyAccessedRepositoriesService.findByCurrentUser(Permission permission,
                 PageRequest pageRequest)
Returns a page of repositories accessed most recently by the current user. 
 | 
UserSearchRequest.Builder | 
UserSearchRequest.Builder.permission(Permission permission)
Set the global permission filter for the resulting  
request. | 
UserSearchRequest.Builder | 
UserSearchRequest.Builder.projectPermission(int projectId,
                 Permission permission)
Set the project permission filter for the resulting  
request. | 
UserSearchRequest.Builder | 
UserSearchRequest.Builder.projectPermission(Project project,
                 Permission permission)
Set the project permission filter for the resulting  
request. | 
UserSearchRequest.Builder | 
UserSearchRequest.Builder.repositoryPermission(int repositoryId,
                    Permission permission)
Set the repository permission filter for the resulting  
request. | 
UserSearchRequest.Builder | 
UserSearchRequest.Builder.repositoryPermission(Repository repository,
                    Permission permission)
Set the repository permission filter for the resulting  
request. | 
EscalatedSecurityContext | 
EscalatedSecurityContext.withPermission(Object resource,
              Permission permission)
Adds permissions on a particular resource to the set of elevated permissions. 
 | 
EscalatedSecurityContext | 
EscalatedSecurityContext.withPermission(Permission permission)
Adds permissions to the set of elevated permissions. 
 | 
EscalatedSecurityContext | 
SecurityService.withPermission(Permission permission,
              Object resource,
              String reason)
Creates a custom security context with elevated permissions that can be used to perform operations. 
 | 
EscalatedSecurityContext | 
SecurityService.withPermission(Permission permission,
              String reason)
Creates a custom security context with elevated permissions that can be used to perform operations. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
EscalatedSecurityContext | 
EscalatedSecurityContext.withPermissions(Set<Permission> permissions)
Adds permissions to the set of elevated permissions. 
 | 
EscalatedSecurityContext | 
SecurityService.withPermissions(Set<Permission> permissions,
               String reason)
Creates a custom security context with elevated permissions that can be used to perform operations. 
 | 
Copyright © 2019 Atlassian. All rights reserved.