Files
directus/api/src/exceptions/forbidden.ts
Rijk van Zanten ef3d618d6c Add support for app-required field state (#7166)
* Add "required" option to fields

* Move some exceptions to shared

* Do client side validation for required

* Add conditional required support
2021-08-03 23:04:24 +02:00

15 lines
533 B
TypeScript

import { BaseException } from '@directus/shared/exceptions';
export class ForbiddenException extends BaseException {
constructor() {
super(`You don't have permission to access this.`, 403, 'FORBIDDEN');
/**
* We currently don't show the reason for a forbidden exception in the API output, as that
* has the potential to leak schema information (eg a "No permission" vs "No permission to files"
* would leak that a thing called "files" exists.
* Ref https://github.com/directus/directus/discussions/4368
*/
}
}