public interface

PermissionCheck

com.atlassian.bitbucket.permission.PermissionCheck

Class Overview

The permission to check and optionally the resource on which to check it. Note: The resource could be an ID referencing the resource, or the resource itself.

Summary

Public Methods
@Nonnull Permission getPermission()
@Nonnull Optional<Object> getResource()
The resource that the permission check applies to.
@Nonnull PermissionVote getResult()

Public Methods

@Nonnull public Permission getPermission ()

Returns
  • The permission to check

@Nonnull public Optional<Object> getResource ()

The resource that the permission check applies to. This could be empty if the requested permission is global if the check is for permission on any resource.

Returns
  • an optional resource representing the resource that the permission check is applied to

@Nonnull public PermissionVote getResult ()

Returns
  • the (intermediate) result based on the voters that have been consulted so far