Restrict superuser, eval mode offer bizadmin once it exists so evaluators can see all the things now restricted to superuser
This commit is contained in:
@@ -29,6 +29,7 @@ function initNavPanel() {
|
||||
const licenseState = window.$gz.store.state.globalSettings.licenseStatus;
|
||||
const useInventory = window.$gz.store.state.globalSettings.useInventory;
|
||||
const licenseLockout = window.$gz.store.state.l;
|
||||
const isSu = window.$gz.store.getters.isSuperUser == true;
|
||||
/*Service = 1,
|
||||
NotService = 2,
|
||||
Customer = 3,
|
||||
@@ -211,28 +212,30 @@ function initNavPanel() {
|
||||
//####### HOME GROUP
|
||||
if (!licenseLockout) {
|
||||
//DASHBOARD
|
||||
sub.push({
|
||||
title: "Dashboard",
|
||||
icon: "$ayiTachometer",
|
||||
route: "/home-dashboard",
|
||||
key: key++
|
||||
});
|
||||
if (!isSu) {
|
||||
sub.push({
|
||||
title: "Dashboard",
|
||||
icon: "$ayiTachometer",
|
||||
route: "/home-dashboard",
|
||||
key: key++
|
||||
});
|
||||
|
||||
//SEARCH
|
||||
sub.push({
|
||||
title: "Search",
|
||||
icon: "$ayiSearch",
|
||||
route: "/home-search",
|
||||
key: key++
|
||||
});
|
||||
//SEARCH
|
||||
sub.push({
|
||||
title: "Search",
|
||||
icon: "$ayiSearch",
|
||||
route: "/home-search",
|
||||
key: key++
|
||||
});
|
||||
|
||||
//SCHEDULE (personal)
|
||||
sub.push({
|
||||
title: "Schedule",
|
||||
icon: "$ayiCalendarDay",
|
||||
route: "/home-schedule",
|
||||
key: key++
|
||||
});
|
||||
//SCHEDULE (personal)
|
||||
sub.push({
|
||||
title: "Schedule",
|
||||
icon: "$ayiCalendarDay",
|
||||
route: "/home-schedule",
|
||||
key: key++
|
||||
});
|
||||
}
|
||||
|
||||
//MEMOS
|
||||
sub.push({
|
||||
@@ -242,22 +245,23 @@ function initNavPanel() {
|
||||
key: key++
|
||||
});
|
||||
|
||||
//REMINDERS
|
||||
sub.push({
|
||||
title: "ReminderList",
|
||||
icon: "$ayiStickyNote",
|
||||
route: "/home-reminders",
|
||||
key: key++
|
||||
});
|
||||
|
||||
//REVIEWS
|
||||
sub.push({
|
||||
title: "ReviewList",
|
||||
icon: "$ayiCalendarCheck",
|
||||
route: "/home-reviews",
|
||||
key: key++
|
||||
});
|
||||
if (!isSu) {
|
||||
//REMINDERS
|
||||
sub.push({
|
||||
title: "ReminderList",
|
||||
icon: "$ayiStickyNote",
|
||||
route: "/home-reminders",
|
||||
key: key++
|
||||
});
|
||||
|
||||
//REVIEWS
|
||||
sub.push({
|
||||
title: "ReviewList",
|
||||
icon: "$ayiCalendarCheck",
|
||||
route: "/home-reviews",
|
||||
key: key++
|
||||
});
|
||||
}
|
||||
//USER SETTINGS
|
||||
sub.push({
|
||||
title: "UserSettings",
|
||||
@@ -265,15 +269,15 @@ function initNavPanel() {
|
||||
route: "/home-user-settings",
|
||||
key: key++
|
||||
});
|
||||
|
||||
//USER NOTIFICATION SUBSCRIPTIONS
|
||||
sub.push({
|
||||
title: "NotifySubscriptionList",
|
||||
icon: "$ayiBullhorn",
|
||||
route: "/home-notify-subscriptions",
|
||||
key: key++
|
||||
});
|
||||
|
||||
if (!isSu) {
|
||||
//USER NOTIFICATION SUBSCRIPTIONS
|
||||
sub.push({
|
||||
title: "NotifySubscriptionList",
|
||||
icon: "$ayiBullhorn",
|
||||
route: "/home-notify-subscriptions",
|
||||
key: key++
|
||||
});
|
||||
}
|
||||
//HISTORY / MRU / ACTIVITY (personal)
|
||||
sub.push({
|
||||
title: "History",
|
||||
@@ -291,7 +295,7 @@ function initNavPanel() {
|
||||
}
|
||||
|
||||
//######### CUSTOMER GROUP
|
||||
if (window.$gz.role.canOpen(window.$gz.type.Customer)) {
|
||||
if (window.$gz.role.canOpen(window.$gz.type.Customer) && !isSu) {
|
||||
//these all require Customer rights so all in the same block
|
||||
|
||||
//clear sublevel array
|
||||
@@ -430,6 +434,7 @@ function initNavPanel() {
|
||||
//**** Service (TOP GROUP)
|
||||
if (
|
||||
sub.length > 0 &&
|
||||
!isSu &&
|
||||
!window.$gz.role.hasRole([
|
||||
window.$gz.role.AUTHORIZATION_ROLES.TechRestricted
|
||||
])
|
||||
@@ -522,12 +527,12 @@ function initNavPanel() {
|
||||
}
|
||||
|
||||
//**** INVENTORY (TOP GROUP)
|
||||
if (sub.length > 0) {
|
||||
if (sub.length > 0 && !isSu) {
|
||||
addNavItem("Inventory", "$ayiDolly", undefined, sub, key++, "inventory");
|
||||
}
|
||||
|
||||
//######### VENDORS (TOP GROUP)
|
||||
if (window.$gz.role.canOpen(window.$gz.type.Vendor)) {
|
||||
if (window.$gz.role.canOpen(window.$gz.type.Vendor) && !isSu ) {
|
||||
addNavItem("VendorList", "$ayiStore", "/vendors", [], key++, "vendor");
|
||||
}
|
||||
|
||||
@@ -584,7 +589,7 @@ function initNavPanel() {
|
||||
}
|
||||
|
||||
// ** ACCOUNTING (TOP)
|
||||
if (sub.length > 0) {
|
||||
if (sub.length > 0 && !isSu) {
|
||||
addNavItem(
|
||||
"Accounting",
|
||||
"$ayiCoins",
|
||||
|
||||
Reference in New Issue
Block a user