diff --git a/src/api/private/notes/notes.controller.ts b/src/api/private/notes/notes.controller.ts index 6541b6454..95cbecead 100644 --- a/src/api/private/notes/notes.controller.ts +++ b/src/api/private/notes/notes.controller.ts @@ -32,7 +32,6 @@ import { NoteDto } from '../../../notes/note.dto'; import { Note } from '../../../notes/note.entity'; import { NoteMediaDeletionDto } from '../../../notes/note.media-deletion.dto'; import { NotesService } from '../../../notes/notes.service'; -import { Permissions } from '../../../permissions/permissions.decorator'; import { Permission } from '../../../permissions/permissions.enum'; import { RevisionMetadataDto } from '../../../revisions/revision-metadata.dto'; import { RevisionDto } from '../../../revisions/revision.dto'; @@ -48,6 +47,7 @@ import { } from '../../utils/descriptions'; import { GetNoteInterceptor } from '../../utils/get-note.interceptor'; import { MarkdownBody } from '../../utils/markdownbody-decorator'; +import { Permissions } from '../../utils/permissions.decorator'; import { PermissionsGuard } from '../../utils/permissions.guard'; import { RequestNote } from '../../utils/request-note.decorator'; import { RequestUser } from '../../utils/request-user.decorator'; diff --git a/src/api/public/notes/notes.controller.ts b/src/api/public/notes/notes.controller.ts index 8480e4f69..05405bfe6 100644 --- a/src/api/public/notes/notes.controller.ts +++ b/src/api/public/notes/notes.controller.ts @@ -44,7 +44,6 @@ import { NoteDto } from '../../../notes/note.dto'; import { Note } from '../../../notes/note.entity'; import { NoteMediaDeletionDto } from '../../../notes/note.media-deletion.dto'; import { NotesService } from '../../../notes/notes.service'; -import { Permissions } from '../../../permissions/permissions.decorator'; import { Permission } from '../../../permissions/permissions.enum'; import { RevisionMetadataDto } from '../../../revisions/revision-metadata.dto'; import { RevisionDto } from '../../../revisions/revision.dto'; @@ -61,6 +60,7 @@ import { import { FullApi } from '../../utils/fullapi-decorator'; import { GetNoteInterceptor } from '../../utils/get-note.interceptor'; import { MarkdownBody } from '../../utils/markdownbody-decorator'; +import { Permissions } from '../../utils/permissions.decorator'; import { PermissionsGuard } from '../../utils/permissions.guard'; import { RequestNote } from '../../utils/request-note.decorator'; import { RequestUser } from '../../utils/request-user.decorator'; diff --git a/src/permissions/permissions.decorator.ts b/src/api/utils/permissions.decorator.ts similarity index 81% rename from src/permissions/permissions.decorator.ts rename to src/api/utils/permissions.decorator.ts index 87e7d18de..9cc6e9ab0 100644 --- a/src/permissions/permissions.decorator.ts +++ b/src/api/utils/permissions.decorator.ts @@ -1,11 +1,11 @@ /* - * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) + * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) * * SPDX-License-Identifier: AGPL-3.0-only */ import { CustomDecorator, SetMetadata } from '@nestjs/common'; -import { Permission } from './permissions.enum'; +import { Permission } from '../../permissions/permissions.enum'; /** * This decorator gathers the {@link Permission Permission} a user must hold for the {@link PermissionsGuard}