FIX: unitary permitting

This commit is contained in:
Victor Radael
2022-10-04 18:29:39 -03:00
parent b756cb5a1e
commit a6c58eb82d
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -196,7 +196,7 @@ export class CatalogController {
const dashboard = res.dashboard;
if (dashboard.owner === user_id) has_permission = true;
if (dashboard.owner === username) has_permission = true;
for (const role of user_roles) {
if (dashboard.p_roles.includes(role)) has_permission = true;
@@ -226,7 +226,7 @@ export class CatalogController {
user: user.user_id,
customer: user.customer_name,
});
const { user_id, customer_name, customer_id, permissions } = user;
const { user_id, customer_name, customer_id, permissions, username } = user;
const is_data_manager = permissions.includes(
PERMISSIONS_GROUPS.CATALOG.permissions.DATA_MANAGER.seqid,
);
@@ -250,7 +250,7 @@ export class CatalogController {
);
const table = res[0];
if (table.owner === user_id) has_permission = true;
if (table.owner === username) has_permission = true;
for (const role of user_roles) {
if (table.p_roles.includes(role)) has_permission = true;
+1 -1
View File
File diff suppressed because one or more lines are too long