update
This commit is contained in:
@@ -1006,10 +1006,13 @@ function SetPages() {
|
|||||||
if (PAGES[key].Esconder == true) {
|
if (PAGES[key].Esconder == true) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (typeof PAGES[key].HasAccess == "function") {
|
if (PAGES[key].HasAccess != undefined) {
|
||||||
if (PAGES[key].HasAccess() == false) {
|
var roles = SUB_LOGGED_IN_DETAILS.Roles || ""
|
||||||
return;
|
var rolesArr = roles.split(",")
|
||||||
|
if (rolesArr.includes(PAGES[key].HasAccess)) {
|
||||||
|
return true
|
||||||
}
|
}
|
||||||
|
return false
|
||||||
}
|
}
|
||||||
var a = document.createElement("a");
|
var a = document.createElement("a");
|
||||||
var img = document.createElement("img")
|
var img = document.createElement("img")
|
||||||
|
|||||||
@@ -1,14 +1,7 @@
|
|||||||
PAGES.dataman = {
|
PAGES.dataman = {
|
||||||
navcss: "btn1",
|
navcss: "btn1",
|
||||||
icon: "static/appico/Database.svg",
|
icon: "static/appico/Database.svg",
|
||||||
HasAccess: function () {
|
HasAccess: "ADMIN",
|
||||||
var roles = SUB_LOGGED_IN_DETAILS.Roles || ""
|
|
||||||
var rolesArr = roles.split(",")
|
|
||||||
if (rolesArr.includes("ADMIN")) {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
return false
|
|
||||||
},
|
|
||||||
Title: "Admin. Datos",
|
Title: "Admin. Datos",
|
||||||
edit: function(mid) {
|
edit: function(mid) {
|
||||||
switch (mid) {
|
switch (mid) {
|
||||||
|
|||||||
Reference in New Issue
Block a user