1
1
Fork 0

Fix permissionset query

This commit is contained in:
Michael 2019-09-28 20:42:33 +00:00
parent 83b00ef308
commit 7704758f9c

View file

@ -89,11 +89,9 @@ class PermissionSet extends BaseObject
$contact_str = '<' . $contact_id . '>';
$condition = ["`uid` = ? AND (`allow_cid` = '' OR`allow_cid` REGEXP ?)
AND (`deny_cid` = '' OR NOT `deny_cid` REGEXP ?)
AND (`allow_gid` = '' OR `allow_gid` REGEXP ?)
AND (`deny_gid` = '' OR NOT `deny_gid` REGEXP ?)",
$uid, $contact_str, $contact_str, $group_str, $group_str];
$condition = ["`uid` = ? AND (NOT (`deny_cid` REGEXP ? OR deny_gid REGEXP ?)
AND (allow_cid REGEXP ? OR allow_gid REGEXP ? OR (allow_cid = '' AND allow_gid = '')))",
$uid, $contact_str, $group_str, $contact_str, $group_str];
$ret = DBA::select('permissionset', ['id'], $condition);
$set = [];