[bug] Fix access verification in decryptAttribute
This commit is contained in:
parent
25caed410e
commit
17bdcec317
@ -1057,11 +1057,13 @@ 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 (role.members.includes(pairingProcessId)) {
|
if (rule.fields.includes(attribute)) {
|
||||||
// We have access to this attribute
|
if (role.members.includes(pairingProcessId)) {
|
||||||
hasAccess = true;
|
// We have access to this attribute
|
||||||
break;
|
hasAccess = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user