FIX: no permission needed for sharing data assets

This commit is contained in:
Gabriel Rosa
2022-10-05 14:45:06 -03:00
parent 8af9c638ef
commit 4be3ffe3a2
2 changed files with 4 additions and 3 deletions
+3 -2
View File
@@ -2,6 +2,7 @@ import {
Body, Body,
Controller, Controller,
Delete, Delete,
ForbiddenException,
Get, Get,
HttpException, HttpException,
Inject, Inject,
@@ -21,6 +22,7 @@ import { RequestUser, User } from 'src/authentication/user.decorator';
@ApiTags('Catalog') @ApiTags('Catalog')
@Controller('catalog') @Controller('catalog')
@AuthenticateCondition((req, user) => { @AuthenticateCondition((req, user) => {
if (req.path.includes('/manage_permissions/')) return true;
let action; let action;
switch (req.method) { switch (req.method) {
@@ -264,9 +266,8 @@ export class CatalogController {
return res; return res;
} }
throw new HttpException( throw new ForbiddenException(
'You do not have permission to access this data asset.', 'You do not have permission to access this data asset.',
403,
); );
} }
} }
+1 -1
View File
File diff suppressed because one or more lines are too long