FIX: Permissions and paths

This commit is contained in:
Victor Radael
2022-10-05 16:58:02 -03:00
parent 8a11eda24d
commit 5073b2e188
15 changed files with 31 additions and 10 deletions
+5 -1
View File
@@ -12,7 +12,10 @@ import {
Query,
} from '@nestjs/common';
import { ApiTags } from '@nestjs/swagger';
import { AuthenticateCondition } from '../../authentication/authentication.decorator';
import {
AuthenticateCondition,
Authenticated,
} from '../../authentication/authentication.decorator';
import { PERMISSIONS_GROUPS } from '../../authentication/permissions.enum';
import { CatalogService } from './catalog.service';
import { DadosferaLogger } from '@dadosfera/dadosfera-logs';
@@ -21,6 +24,7 @@ import { RequestUser, User } from 'src/authentication/user.decorator';
@ApiTags('Catalog')
@Controller('catalog')
@Authenticated()
@AuthenticateCondition((req, user) => {
if (req.path.includes('/manage_permissions/')) return true;
let action;