Class AbstractPermissionsDelegate<TARGET>

    • Constructor Detail

      • AbstractPermissionsDelegate

        public AbstractPermissionsDelegate()
    • Method Detail

      • setSpacePermissionManager

        public void setSpacePermissionManager​(SpacePermissionManager spacePermissionManager)
      • hasSpaceLevelPermission

        protected boolean hasSpaceLevelPermission​(String permission,
                                                  com.atlassian.user.User user,
                                                  Object target)
      • canView

        public boolean canView​(com.atlassian.user.User user)
        Specified by:
        canView in interface PermissionDelegate<TARGET>
        Returns:
        true if the user can view all instances of targets handled by this permission delegate
      • canCreateInTarget

        public boolean canCreateInTarget​(com.atlassian.user.User user,
                                         Class typeToCreate)
        Specified by:
        canCreateInTarget in interface PermissionDelegate<TARGET>
        Parameters:
        user - the user performing the create
        typeToCreate - the class of the entity to create
        Returns:
        true if the specified user can create new instances of the specified typeToCreate within instances of target handled by this PermissionDelegate.
      • getSpaceFrom

        protected abstract Space getSpaceFrom​(Object target)
        Parameters:
        target - an entity object from which we want to extract a space container
        Returns:
        Space container of the given target if available