[bug] Fix access verification in decryptAttribute
This commit is contained in:
parent
25caed410e
commit
17bdcec317
@ -1057,7 +1057,8 @@ export default class Services {
|
|||||||
let hasAccess = false;
|
let hasAccess = false;
|
||||||
// If we're not supposed to have access to this attribute, ignore
|
// If we're not supposed to have access to this attribute, ignore
|
||||||
for (const role of Object.values(roles)) {
|
for (const role of Object.values(roles)) {
|
||||||
if (role.validation_rules.includes(attribute)) {
|
for (const rule of Object.values(role.validation_rules)) {
|
||||||
|
if (rule.fields.includes(attribute)) {
|
||||||
if (role.members.includes(pairingProcessId)) {
|
if (role.members.includes(pairingProcessId)) {
|
||||||
// We have access to this attribute
|
// We have access to this attribute
|
||||||
hasAccess = true;
|
hasAccess = true;
|
||||||
@ -1065,6 +1066,7 @@ export default class Services {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!hasAccess) return null;
|
if (!hasAccess) return null;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user