Interface ISpacePolicy


public interface ISpacePolicy
Since:
3.23.10
  • Method Details

    • canRead

      boolean canRead(@Nullable IContextId contextId, @Nullable IFolder folder)
      Can the current user read the Space for the given context?
      Parameters:
      contextId - context id (can be null for Global administration)
      folder - (can be null if it is the root Space.)
      Returns:
      true if the current user is allowed to read the Space for the given context.
    • canCreate

      boolean canCreate(@Nullable IContextId contextId, @Nullable IFolder folder)
      Can the current user create a Space for the given context?
      Parameters:
      contextId - context id (can be null for global administration)
      folder - (can be null if it is the root Space.)
      Returns:
      true if the current user is allowed to create Spaces in the given context.
    • canDelete

      boolean canDelete(@Nullable IContextId contextId, @Nullable IFolder folder)
      Can the current user delete a Space for the given context?
      Parameters:
      contextId - context ID (can be null for Global administration)
      folder - (can be null if it is the root Space.)
      Returns:
      true if the current user is allowed to delete Spaces in the given context.
    • canModify

      boolean canModify(@Nullable IContextId contextId, @Nullable IFolder folder)
      Can the current user modify the Space for the given context?
      Parameters:
      contextId - context id (can be null for global administration)
      folder - (can be null if it is the root Space.)
      Returns:
      true if the current user is allowed to modify Spaces in the given context.
    • canManage

      boolean canManage(@Nullable IContextId contextId, @Nullable IFolder folder)
      Can the current user manage the Space for the given context?
      Parameters:
      contextId - context id (can be null for global administration)
      folder - (can be null if it is the root Space.)
      Returns:
      true if the current user is allowed to manage Spaces in the given context.
    • canRead

      boolean canRead(@Nullable IContextId contextId, @Nullable IFolder folder, @NotNull String userId)
      Parameters:
      contextId - context id (can be null for Global administration)
      folder - (can be null if it is the root Space.)
      userId - (cannot be null.)
      Returns:
      true if the given user is allowed to read the Space for the given context.
      Since:
      3.24.4 Can the given user read the Space for the given context?