import { type CrudAction } from "../../../fd-toolbox/enums/enums";
/**
 * Access configuration for a resource.
 * Used as part of {@link ResourceMeta} to determine if a resource can be accessed
 * without explicit permissions when certain conditions are met.
 */
export interface ResourceMetaAuth {
    /**
     * Crud operations allowed when the userId property of the resource matches the current user's id,
     * even if the user doesn't have explicit permissions.
     */
    belowLevelAllowedCrudByUserId: CrudAction[];
    /**
     * When true, enables access to resources whose userId property matches the current user's id
     * without requiring explicit permissions.
     */
    accessByUserId: boolean;
    /**
     * Crud operations allowed when the workspaceId property of the resource matches the current workspace's id,
     * even if the user doesn't have explicit permissions.
     */
    belowLevelAllowedCrudByWorkspaceId: CrudAction[];
    /**
     * When true, enables access to resources whose workspaceId property matches the current workspace's id
     * without requiring explicit permissions.
     */
    accessByWorkspaceId: boolean;
}
