From c55e8f0cbde3cd37e2d2c4f876893154a22e2c93 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Wed, 17 Aug 2022 21:12:44 +0000 Subject: [PATCH] bugbug - was checking against bizadminfull role which no longer exists and sb just bizadmin, checked for any other cases similar using full but found none beyond what was fixed here. --- ayanova/src/api/authorizationroles.js | 2 ++ ayanova/src/api/initialize.js | 5 ++++- ayanova/src/components/pm-header.vue | 2 +- ayanova/src/components/quote-header.vue | 2 +- ayanova/src/components/work-order-header.vue | 2 +- 5 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ayanova/src/api/authorizationroles.js b/ayanova/src/api/authorizationroles.js index cec82b6d..a846ee89 100644 --- a/ayanova/src/api/authorizationroles.js +++ b/ayanova/src/api/authorizationroles.js @@ -49,6 +49,8 @@ export default { return false; } //array form? + // eslint-disable-next-line no-debugger + debugger; if (Array.isArray(desiredRole)) { //it's an array of roles, iterate and if any are present then return true for (let i = 0; i < desiredRole.length; i++) { diff --git a/ayanova/src/api/initialize.js b/ayanova/src/api/initialize.js index 0a536185..e24fecb9 100644 --- a/ayanova/src/api/initialize.js +++ b/ayanova/src/api/initialize.js @@ -611,7 +611,10 @@ function initNavPanel() { } // LICENSE - if (window.$gz.role.canOpen(window.$gz.type.License)) { + //special work around here as Integration addition requires all roles to read license but that exposes it in the UI so instead of checking by rights + //sb limited to BizAdmin full only + //if (window.$gz.role.canOpen(window.$gz.type.License)) { + if (window.$gz.role.hasRole([window.$gz.role.AUTHORIZATION_ROLES.BizAdmin])) { sub.push({ title: "HelpLicense", icon: "$ayiTicket", diff --git a/ayanova/src/components/pm-header.vue b/ayanova/src/components/pm-header.vue index 7255e2d1..52907a0d 100644 --- a/ayanova/src/components/pm-header.vue +++ b/ayanova/src/components/pm-header.vue @@ -483,7 +483,7 @@ export default { data() { return { canEditSerial: window.$gz.role.hasRole([ - window.$gz.role.AUTHORIZATION_ROLES.BizAdminFull + window.$gz.role.AUTHORIZATION_ROLES.BizAdmin ]) }; }, diff --git a/ayanova/src/components/quote-header.vue b/ayanova/src/components/quote-header.vue index 57253fb1..2a164df6 100644 --- a/ayanova/src/components/quote-header.vue +++ b/ayanova/src/components/quote-header.vue @@ -496,7 +496,7 @@ export default { data() { return { canEditSerial: window.$gz.role.hasRole([ - window.$gz.role.AUTHORIZATION_ROLES.BizAdminFull + window.$gz.role.AUTHORIZATION_ROLES.BizAdmin ]) }; }, diff --git a/ayanova/src/components/work-order-header.vue b/ayanova/src/components/work-order-header.vue index 7191d939..ab391a61 100644 --- a/ayanova/src/components/work-order-header.vue +++ b/ayanova/src/components/work-order-header.vue @@ -474,7 +474,7 @@ export default { data() { return { canEditSerial: window.$gz.role.hasRole([ - window.$gz.role.AUTHORIZATION_ROLES.BizAdminFull + window.$gz.role.AUTHORIZATION_ROLES.BizAdmin ]) }; },