mirror of
https://github.com/dadosfera/maestro.git
synced 2026-09-21 09:34:49 +00:00
FIX: no permission needed for sharing data assets
This commit is contained in:
@@ -2,6 +2,7 @@ import {
|
||||
Body,
|
||||
Controller,
|
||||
Delete,
|
||||
ForbiddenException,
|
||||
Get,
|
||||
HttpException,
|
||||
Inject,
|
||||
@@ -21,6 +22,7 @@ import { RequestUser, User } from 'src/authentication/user.decorator';
|
||||
@ApiTags('Catalog')
|
||||
@Controller('catalog')
|
||||
@AuthenticateCondition((req, user) => {
|
||||
if (req.path.includes('/manage_permissions/')) return true;
|
||||
let action;
|
||||
|
||||
switch (req.method) {
|
||||
@@ -264,9 +266,8 @@ export class CatalogController {
|
||||
return res;
|
||||
}
|
||||
|
||||
throw new HttpException(
|
||||
throw new ForbiddenException(
|
||||
'You do not have permission to access this data asset.',
|
||||
403,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user