fix: remove redundant permission guard annotations

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
Tilman Vatteroth 2023-05-14 00:59:57 +02:00
parent 1122a02f10
commit 22f0abbfbe

View file

@ -200,7 +200,6 @@ export class NotesController {
@OpenApi(200, 403, 404) @OpenApi(200, 403, 404)
@UseInterceptors(GetNoteInterceptor) @UseInterceptors(GetNoteInterceptor)
@Permissions(Permission.OWNER) @Permissions(Permission.OWNER)
@UseGuards(PermissionsGuard)
async setUserPermission( async setUserPermission(
@RequestUser() user: User, @RequestUser() user: User,
@RequestNote() note: Note, @RequestNote() note: Note,
@ -218,7 +217,6 @@ export class NotesController {
@UseInterceptors(GetNoteInterceptor) @UseInterceptors(GetNoteInterceptor)
@Permissions(Permission.OWNER) @Permissions(Permission.OWNER)
@UseGuards(PermissionsGuard)
@Delete(':noteIdOrAlias/metadata/permissions/users/:userName') @Delete(':noteIdOrAlias/metadata/permissions/users/:userName')
async removeUserPermission( async removeUserPermission(
@RequestUser() user: User, @RequestUser() user: User,
@ -244,7 +242,6 @@ export class NotesController {
@UseInterceptors(GetNoteInterceptor) @UseInterceptors(GetNoteInterceptor)
@Permissions(Permission.OWNER) @Permissions(Permission.OWNER)
@UseGuards(PermissionsGuard)
@Put(':noteIdOrAlias/metadata/permissions/groups/:groupName') @Put(':noteIdOrAlias/metadata/permissions/groups/:groupName')
async setGroupPermission( async setGroupPermission(
@RequestUser() user: User, @RequestUser() user: User,
@ -280,7 +277,6 @@ export class NotesController {
@UseInterceptors(GetNoteInterceptor) @UseInterceptors(GetNoteInterceptor)
@Permissions(Permission.OWNER) @Permissions(Permission.OWNER)
@UseGuards(PermissionsGuard)
@Put(':noteIdOrAlias/metadata/permissions/owner') @Put(':noteIdOrAlias/metadata/permissions/owner')
async changeOwner( async changeOwner(
@RequestUser() user: User, @RequestUser() user: User,