Skip to content

Commit

Permalink
Add missing @RequiredPermission() decorator to `FileLicensesResolve…
Browse files Browse the repository at this point in the history
…r` (#1670)
  • Loading branch information
johnnyomair authored Feb 8, 2024
1 parent 08e0da0 commit 8e158f8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/slow-lies-tan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@comet/cms-api": patch
---

Add missing `@RequiredPermission()` decorator to `FileLicensesResolver`
2 changes: 2 additions & 0 deletions packages/api/cms-api/src/dam/files/file-licenses.resolver.ts
Original file line number Diff line number Diff line change
@@ -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'
Expand Down

0 comments on commit 8e158f8

Please sign in to comment.