This commit is contained in:
@@ -45,8 +45,19 @@ export default {
|
||||
}
|
||||
return (store.state.roles & desiredRole) != 0;
|
||||
},
|
||||
/////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
// Get a default empty rights object so that it can be present when a
|
||||
// form first loads
|
||||
//
|
||||
defaultRightsObject() {
|
||||
return {
|
||||
change: false,
|
||||
read: false,
|
||||
delete: false
|
||||
};
|
||||
},
|
||||
/////////////////////////////////
|
||||
// oType is the name of the object type as defined in ayatype.js
|
||||
//
|
||||
getRights(vm, oType) {
|
||||
//from bizroles.cs:
|
||||
@@ -58,11 +69,7 @@ export default {
|
||||
//DELETE = SAME AS CHANGE FOR NOW (There is no specific delete right for now though it's checked for by routes in Authorized.cs in case we want to add it in future as a separate right from create.)
|
||||
//NOTE: biz rules can supersede this, this is just for general rights purposes, if an object has restrictive business rules they will take precedence every time.
|
||||
|
||||
var ret = {
|
||||
change: false,
|
||||
read: false,
|
||||
delete: false
|
||||
};
|
||||
var ret = this.defaultRightsObject();
|
||||
|
||||
//Get the type name from the type enum value
|
||||
var typeName = _.findKey(vm.$gztype, function(o) {
|
||||
|
||||
Reference in New Issue
Block a user