Fix application and exemption of masking rules to users
The applies_to and exempted values were only evaluated if both of them were present.
This commit is contained in:
@ -662,9 +662,8 @@ static bool rule_run_common_checks(json_t* pRule,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Set the account rules
|
// Set the account rules
|
||||||
if (pApplies_to && pExempted &&
|
if ((pApplies_to && !get_accounts(KEY_APPLIES_TO, pApplies_to, *applies_to)) ||
|
||||||
(!get_accounts(KEY_APPLIES_TO, pApplies_to, *applies_to) ||
|
(pExempted && !get_accounts(KEY_EXEMPTED, pExempted, *exempted)))
|
||||||
!get_accounts(KEY_EXEMPTED, pExempted, *exempted)))
|
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user