Interface ISpacePolicy


public interface ISpacePolicy
Since:
3.23.10
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    canCreate(IContextId contextId, IFolder folder)
    Can the current user create a Space for the given context?
    boolean
    canDelete(IContextId contextId, IFolder folder)
    Can the current user delete a Space for the given context?
    boolean
    canManage(IContextId contextId, IFolder folder)
    Can the current user manage the Space for the given context?
    boolean
    canModify(IContextId contextId, IFolder folder)
    Can the current user modify the Space for the given context?
    boolean
    canRead(IContextId contextId, IFolder folder)
    Can the current user read the Space for the given context?
  • 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.