mirror of
https://github.com/directus/directus.git
synced 2026-02-03 18:05:29 -05:00
16 lines
426 B
TypeScript
16 lines
426 B
TypeScript
import { BaseException } from './base';
|
|
import { Permission } from '../types';
|
|
|
|
type Extensions = {
|
|
field?: string;
|
|
collection?: string;
|
|
item?: string | number | (string | number)[];
|
|
action?: Permission['action'];
|
|
};
|
|
|
|
export class ForbiddenException extends BaseException {
|
|
constructor(message = `You don't have permission to access this.`, extensions?: Extensions) {
|
|
super(message, 403, 'FORBIDDEN', extensions);
|
|
}
|
|
}
|