@directus/api
Version:
Directus is a real-time API and App dashboard for managing SQL database content
12 lines (11 loc) • 621 B
TypeScript
import type { Accountability, PrimaryKey, SchemaOverview } from '@directus/types';
import type { Knex } from 'knex';
/**
* Verify if a client has permissions to perform an action on the item.
* - `string[]`: List of fields the client has access to, empty if item exists but access is restricted.
* - `null`: Indicates the item doesn't exist.
*/
export declare function verifyPermissions(accountability: Accountability | null, collection: string, item: PrimaryKey | null, action: "create" | "read" | "update" | "delete" | undefined, options: {
knex: Knex;
schema: SchemaOverview;
}): Promise<string[] | null>;