This commit is contained in:
@@ -63,6 +63,16 @@ export default {
|
||||
return (window.$gz.store.state.roles & desiredRole) != 0;
|
||||
}
|
||||
},
|
||||
//////////////////////////////////////////////////////////
|
||||
// Does current logged in user have *ANY* role?
|
||||
//
|
||||
//
|
||||
hasAnyRole() {
|
||||
if (!window.$gz.store.state.roles || window.$gz.store.state.roles === 0) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
// Get a default empty rights object so that it can be present when a
|
||||
// form first loads
|
||||
@@ -151,15 +161,12 @@ export default {
|
||||
},
|
||||
/////////////////////////////////
|
||||
// convenience method for forms that deal with multiple object types
|
||||
// (i.e. grids, history etc)
|
||||
// (i.e. grids, history etc, initialization of main menu etc)
|
||||
//
|
||||
canOpen(oType) {
|
||||
let r = this.getRights(oType);
|
||||
// //Am seeing where change is true but read is false, change trumps read so ...
|
||||
// if (r.change == true) {
|
||||
// return true;
|
||||
// }
|
||||
return r.read;
|
||||
//convention is change might be defined but not read so canOpen is true eitehr way
|
||||
return r.change == true || r.read == true;
|
||||
}
|
||||
};
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user