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:
Markus Mäkelä 2017-08-17 23:40:19 +03:00
parent 19bae79784
commit 727b4baa86

View File

@ -662,9 +662,8 @@ static bool rule_run_common_checks(json_t* pRule,
}
// Set the account rules
if (pApplies_to && pExempted &&
(!get_accounts(KEY_APPLIES_TO, pApplies_to, *applies_to) ||
!get_accounts(KEY_EXEMPTED, pExempted, *exempted)))
if ((pApplies_to && !get_accounts(KEY_APPLIES_TO, pApplies_to, *applies_to)) ||
(pExempted && !get_accounts(KEY_EXEMPTED, pExempted, *exempted)))
{
return false;
}