mirror of
https://github.com/dadosfera/maestro.git
synced 2026-11-27 07:00:06 +00:00
FIX: no permission needed for sharing data assets
This commit is contained in:
@@ -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
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user