Uses of Enum Class
com.atlassian.bitbucket.permission.Permission
Package
Description
-
Uses of Permission in com.atlassian.bitbucket.event.permission
Modifier and TypeMethodDescriptionAbstractGlobalPermissionModificationEvent.getNewValue()
AbstractProjectPermissionModificationEvent.getNewValue()
AbstractRepositoryPermissionModificationEvent.getNewValue()
PermissionModificationRequestedEvent.getNewValue()
PermissionModifiedEvent.getNewValue()
AbstractGlobalPermissionModificationEvent.getOldValue()
AbstractProjectPermissionModificationEvent.getOldValue()
AbstractRepositoryPermissionModificationEvent.getOldValue()
PermissionModificationRequestedEvent.getOldValue()
PermissionModifiedEvent.getOldValue()
PermissionEvent.getPermission()
PermissionGrantedEvent.getPermission()
PermissionRevocationRequestedEvent.getPermission()
PermissionRevokedEvent.getPermission()
ModifierConstructorDescriptionprotected
AbstractGlobalPermissionModificationEvent
(Object source, Permission oldValue, Permission newValue, String affectedGroup, ApplicationUser affectedUser) protected
AbstractProjectPermissionModificationEvent
(Object source, Permission oldValue, Permission newValue, Project project, String affectedGroup, ApplicationUser affectedUser) protected
AbstractRepositoryPermissionModificationEvent
(Object source, Permission oldValue, Permission newValue, Repository repository, String affectedGroup, ApplicationUser affectedUser) protected
GlobalPermissionEvent
(Object source, Permission permission, String affectedGroup, ApplicationUser affectedUser) GlobalPermissionGrantedEvent
(Object source, Permission permission, String affectedGroup, ApplicationUser affectedUser) GlobalPermissionGrantRequestedEvent
(Object source, Permission permission, String affectedGroup, ApplicationUser affectedUser, CancelState cancelState) GlobalPermissionModificationRequestedEvent
(Object source, Permission oldValue, Permission newValue, String affectedGroup, ApplicationUser affectedUser, CancelState cancelState) GlobalPermissionModifiedEvent
(Object source, Permission oldValue, Permission newValue, String affectedGroup, ApplicationUser affectedUser) GlobalPermissionRevocationRequestedEvent
(Object source, Permission permission, String affectedGroup, ApplicationUser affectedUser, CancelState cancelState) GlobalPermissionRevokedEvent
(Object source, Permission permission, String affectedGroup, ApplicationUser affectedUser) protected
PermissionEvent
(Object source, Permission permission, String affectedGroup, ApplicationUser affectedUser) protected
ProjectPermissionEvent
(Object source, Permission permission, Project project, String affectedGroup, ApplicationUser affectedUser) ProjectPermissionGrantedEvent
(Object source, Permission permission, Project project, String affectedGroup, ApplicationUser affectedUser) ProjectPermissionGrantRequestedEvent
(Object source, Permission permission, Project project, String affectedGroup, ApplicationUser affectedUser, CancelState cancelState) ProjectPermissionModificationRequestedEvent
(Object source, Permission oldValue, Permission newValue, Project project, String affectedGroup, ApplicationUser affectedUser, CancelState cancelState) ProjectPermissionModifiedEvent
(Object source, Permission oldValue, Permission newValue, Project project, String affectedGroup, ApplicationUser affectedUser) ProjectPermissionRevocationRequestedEvent
(Object source, Permission permission, Project project, String affectedGroup, ApplicationUser affectedUser, CancelState cancelState) ProjectPermissionRevokedEvent
(Object source, Permission permission, Project project, String affectedGroup, ApplicationUser affectedUser) protected
RepositoryPermissionEvent
(Object source, Permission permission, Repository repository, String affectedGroup, ApplicationUser affectedUser) RepositoryPermissionGrantedEvent
(Object source, Permission permission, Repository repository, String affectedGroup, ApplicationUser affectedUser) RepositoryPermissionGrantRequestedEvent
(Object source, Permission permission, Repository repository, String affectedGroup, ApplicationUser affectedUser, CancelState cancelState) RepositoryPermissionModificationRequestedEvent
(Object source, Permission oldValue, Permission newValue, Repository repository, String affectedGroup, ApplicationUser affectedUser, CancelState cancelState) RepositoryPermissionModifiedEvent
(Object source, Permission oldValue, Permission newValue, Repository repository, String affectedGroup, ApplicationUser affectedUser) RepositoryPermissionRevocationRequestedEvent
(Object source, Permission permission, Repository repository, String affectedGroup, ApplicationUser affectedUser, CancelState cancelState) RepositoryPermissionRevokedEvent
(Object source, Permission permission, Repository repository, String affectedGroup, ApplicationUser affectedUser) -
Uses of Permission in com.atlassian.bitbucket.event.repository
ModifierConstructorDescriptionRepositoryDeleteBlockedEvent
(Object source, Repository repository, Permission userRole, boolean isPersonalRepo, boolean isPublicRepo) -
Uses of Permission in com.atlassian.bitbucket.license
Modifier and TypeMethodDescriptionvoid
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 -
Uses of Permission in com.atlassian.bitbucket.permission
Modifier and TypeMethodDescriptionstatic Permission
Permission.fromId
(int id) Gets a permission by its id.static Permission
Permission.fromWeight
(int weight) Gets a permission by its weight.PermissionService.getHighestGlobalGroupPermission
(String groupName) Get the highest global permission for a group.PermissionService.getHighestGlobalPermission
(ApplicationUser user) Get the highest global permission for a user.PermissionService.getHighestGlobalPermission
(String username) Get the highest global permission for a user.PermissionRequest.getPermission()
PermittedGroup.getPermission()
Retrieves the permission which has been granted to the group.PermittedUser.getPermission()
Retrieves the permission which has been granted to the user.SetPermissionRequest.getPermission()
static Permission
Permission.max
(Permission p1, Permission p2) Gets the permission with the maximumweigth
.static Permission
Returns the enum constant of this class with the specified name.static Permission[]
Permission.values()
Returns an array containing the constants of this enum class, in the order they are declared.Modifier and TypeMethodDescriptionstatic Set<Permission>
Permission.getGlobalPermissions()
Gets all the global permissions.Permission.getImplyingPermissions()
Get the set of permissions that inherit this permission (excluding this permission).Permission.getInheritedPermissions()
Gets all permissions this permission inherits.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 TypeMethodDescriptionPermissionPredicateFactory.createProjectPermissionPredicate
(Permission permission) PermissionPredicateFactory.createPullRequestPermissionPredicate
(Permission permission) Retrieves aPredicate
which applies a check to ensure the current user has the specified permission with regards toPullRequest
s.PermissionPredicateFactory.createRepositoryPermissionPredicate
(Permission permission) PermissionService.getGrantedGroups
(Permission permission, PageRequest request) Get the groups which are granted a permissionPermissionService.getGrantedUsers
(Permission permission, PageRequest request) Get the users which are granted a permissionPermissionService.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.globalPermission
(Permission permission) void
PermissionAdminService.grantAllProjectPermission
(Permission permission, Project project) Grant a project permission to all users usersboolean
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
(Permission permission) boolean
PermissionService.hasAnyUserPermission
(ApplicationUser user, 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
(Permission permission) boolean
PermissionService.hasGlobalPermission
(ApplicationUser user, Permission permission) Will return true if the user isactive
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 ofboolean
PermissionService.hasGlobalPermission
(String username, Permission permission) Will return true if the user isactive
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 ofboolean
PermissionService.hasGlobalPermissionThroughGroupMembership
(Permission permission, Set<String> excludedGroups) boolean
PermissionService.hasProjectPermission
(int projectId, Permission permission) boolean
PermissionService.hasProjectPermission
(Project project, Permission permission) boolean
PermissionService.hasProjectPermission
(ApplicationUser user, int projectId, Permission permission) boolean
PermissionService.hasProjectPermission
(ApplicationUser user, Project project, Permission permission) Will return true if the user isactive
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 ispublicly accessible
and the permission is implied as a result the given user is directly grantedadministration rights
A group the given user is a member of is grantedadministration rights
boolean
PermissionService.hasProjectPermissionThroughGroupMembership
(Project project, Permission permission, Set<String> excludedGroups) boolean
PermissionService.hasRepositoryPermission
(int repositoryId, Permission permission) boolean
PermissionService.hasRepositoryPermission
(Repository repository, Permission permission) boolean
PermissionService.hasRepositoryPermission
(ApplicationUser user, int repositoryId, Permission permission) boolean
PermissionService.hasRepositoryPermission
(ApplicationUser user, Repository repository, Permission permission) Will return true if the user isactive
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 ispublicly accessible
and the permission is implied as a result the given user is directly grantedadministration rights
A group the given user is a member of is grantedadministration rights
This method will always returnfalse
if theuser
given isnull
as anonymous users cannot be granted permissions by definition.boolean
PermissionService.hasRepositoryPermissionThroughGroupMembership
(Repository repository, Permission permission, Set<String> excludedGroups) boolean
PermissionService.hasUserPermission
(int targetUserId, Permission permission) boolean
PermissionService.hasUserPermission
(Permission permission) boolean
PermissionService.hasUserPermission
(ApplicationUser user, int targetUserId, Permission permission) boolean
PermissionService.hasUserPermission
(ApplicationUser targetUser, Permission permission) boolean
PermissionService.hasUserPermission
(ApplicationUser user, ApplicationUser targetUser, Permission permission) static Permission
Permission.max
(Permission p1, Permission p2) Gets the permission with the maximumweigth
.SetPermissionRequest.Builder.projectPermission
(Permission permission, Project project) SetPermissionRequest.Builder.repositoryPermission
(Permission permission, Repository repository) void
PermissionAdminService.revokeAllProjectPermission
(Permission permission, Project project) Revoked a project permission from all users usersvoid
PermissionValidationService.validateForGlobal
(Permission permission) Validate that the current user has the specified global permissionvoid
PermissionValidationService.validateForProject
(int projectId, Permission permission) Validate that the current user has the specified permission for the projectvoid
PermissionValidationService.validateForProject
(Project project, Permission permission) Validate that the current user has the specified permission for the projectvoid
PermissionValidationService.validateForRepository
(int repositoryId, Permission permission) Validate that the current user has the specified permission for the repositoryvoid
PermissionValidationService.validateForRepository
(Repository repository, Permission permission) Validate that the current user has the specified permission for the repositoryvoid
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 itselfvoid
PermissionValidationService.validateForUser
(ApplicationUser targetUser, Permission permission) Validate that the current user has the specified permission for the target user. -
Uses of Permission in com.atlassian.bitbucket.project
Modifier and TypeMethodDescriptionProjectSearchRequest.getPermission()
When set, limits returnedprojects
to only those for which the current user has the requiredPermission
.Modifier and TypeMethodDescriptionProjectSearchRequest.Builder.permission
(Permission value) When set, limits returnedprojects
to only those for which the current user has the requiredPermission
. -
Uses of Permission in com.atlassian.bitbucket.repository
Modifier and TypeMethodDescriptionRepositorySearchRequest.getPermission()
When set, limits returnedrepositories
to only those for which the current user has the requiredPermission
.Modifier and TypeMethodDescriptionRepositorySearchRequest.Builder.permission
(Permission value) Set the permission level for the resultingrequest
instance. -
Uses of Permission in com.atlassian.bitbucket.user
Modifier and TypeMethodDescriptionRecentlyAccessedRepositoriesService.findByCurrentUser
(Permission permission, PageRequest pageRequest) Returns a page of repositories accessed most recently by the current user.UserSearchRequest.Builder.permission
(Permission permission) Set the global permission filter for the resultingrequest
.UserSearchRequest.Builder.projectPermission
(int projectId, Permission permission) Set the project permission filter for the resultingrequest
.UserSearchRequest.Builder.projectPermission
(Project project, Permission permission) Set the project permission filter for the resultingrequest
.UserSearchRequest.Builder.repositoryPermission
(int repositoryId, Permission permission) Set the repository permission filter for the resultingrequest
.UserSearchRequest.Builder.repositoryPermission
(Repository repository, Permission permission) Set the repository permission filter for the resultingrequest
.EscalatedSecurityContext.withPermission
(Permission permission) Adds permissions to the set of elevated permissions.EscalatedSecurityContext.withPermission
(Object resource, Permission permission) Adds permissions on a particular resource to the set of elevated permissions.SecurityService.withPermission
(Permission permission, Object resource, String reason) Creates a custom security context with elevated permissions that can be used to perform operations.SecurityService.withPermission
(Permission permission, String reason) Creates a custom security context with elevated permissions that can be used to perform operations.Modifier and TypeMethodDescriptionEscalatedSecurityContext.withPermissions
(Set<Permission> permissions) Adds permissions to the set of elevated permissions.SecurityService.withPermissions
(Set<Permission> permissions, String reason) Creates a custom security context with elevated permissions that can be used to perform operations.