From 4a7ccc8178cb6d51e3e98fc9367f3046e37de2ef Mon Sep 17 00:00:00 2001 From: Philip Molares Date: Sun, 21 Nov 2021 17:16:12 +0100 Subject: [PATCH] feat: create permission enum This enum makes it possible which permissions a user needs to hold to access a specific resource Signed-off-by: Philip Molares --- src/permissions/permissions.enum.ts | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/permissions/permissions.enum.ts diff --git a/src/permissions/permissions.enum.ts b/src/permissions/permissions.enum.ts new file mode 100644 index 000000000..5d90367cc --- /dev/null +++ b/src/permissions/permissions.enum.ts @@ -0,0 +1,21 @@ +/* + * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) + * + * SPDX-License-Identifier: AGPL-3.0-only + */ + +/* + * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) + * + * SPDX-License-Identifier: AGPL-3.0-only + */ + +/** + * Represents the Permissions a user may hold in a request + */ +export enum Permission { + READ = 'read', + WRITE = 'write', + CREATE = 'create', + OWNER = 'owner', +}