diff --git a/.changeset/slow-lies-tan.md b/.changeset/slow-lies-tan.md new file mode 100644 index 0000000000..d96750ea7a --- /dev/null +++ b/.changeset/slow-lies-tan.md @@ -0,0 +1,5 @@ +--- +"@comet/cms-api": patch +--- + +Add missing `@RequiredPermission()` decorator to `FileLicensesResolver` diff --git a/packages/api/cms-api/src/dam/files/file-licenses.resolver.ts b/packages/api/cms-api/src/dam/files/file-licenses.resolver.ts index 7b7721f5a7..390170a777 100644 --- a/packages/api/cms-api/src/dam/files/file-licenses.resolver.ts +++ b/packages/api/cms-api/src/dam/files/file-licenses.resolver.ts @@ -1,9 +1,11 @@ import { Parent, ResolveField, Resolver } from "@nestjs/graphql"; import { add, differenceInCalendarDays, isAfter, isBefore } from "date-fns"; +import { RequiredPermission } from "../../user-permissions/decorators/required-permission.decorator"; import { License } from "./entities/license.embeddable"; @Resolver(() => License) +@RequiredPermission(["dam"]) export class FileLicensesResolver { // if durationTo = '2023-02-27T00:00:00.000Z' then the license is still valid on 27.03.2023 // and expires at '2023-02-28T00:00:00.000Z'