This commit is contained in:
@@ -140,7 +140,9 @@ export default {
|
||||
//calculate the effective rights
|
||||
//a non zero result of the bitwise calculation means true and zero means false so using !! to force it into a boolean value
|
||||
//(contrary to some style guides that say !! is obscure but I say it saves a lot of typing)
|
||||
|
||||
const canChange = !!(userRole & objectRoleRights.Change);
|
||||
|
||||
//sometimes rights to read are false if change is true since change trumps read anyway so accordingly:
|
||||
let canReadFullRecord = canChange;
|
||||
if (!canReadFullRecord) {
|
||||
@@ -152,6 +154,13 @@ export default {
|
||||
ret.delete = ret.change; //FOR NOW
|
||||
ret.read = canReadFullRecord;
|
||||
|
||||
// console.log("authorizationroles::canOpen", {
|
||||
// typeName: typeName,
|
||||
// userRole: userRole,
|
||||
// objectRoleRights: objectRoleRights,
|
||||
// retResultIs: ret
|
||||
// });
|
||||
|
||||
return ret;
|
||||
},
|
||||
/////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user