|
|
@@ -270,17 +270,17 @@ class AclQueryFeatures {
|
|
|
public function parseSpecialFilterAccess() {
|
|
|
$userLogin = User::getLogin();
|
|
|
$usrAclGroups = User::getLdapGroupsNames();
|
|
|
- DBG::log(['login'=>$userLogin, 'groups'=>$usrAclGroups, 'hasFieldWrite'=>$this->_acl->hasField('A_ADM_COMPANY'), 'hasFieldRead'=>$this->_acl->hasField('A_CLASSIFIED'), 'acl'=>$this->_acl], 'array', "parse SpecialFilter Access");
|
|
|
+ DBG::log(['ns'=>$this->_acl->getNamespace(), 'login'=>$userLogin, 'hasWriteField'=>$this->_acl->hasWriteGroupField(), 'hasReadField'=>$this->_acl->hasReadGroupField(), 'hasOwnerField'=>$this->_acl->hasOwnerField(), 'groups'=>$usrAclGroups], 'array', "parse SpecialFilter Access");
|
|
|
$orWhere = [];
|
|
|
- if ($this->_acl->hasField('A_ADM_COMPANY')) {
|
|
|
+ if ($this->_acl->hasWriteGroupField()) {
|
|
|
$orWhere[] = ['A_ADM_COMPANY', '=', ''];// TODO: allow empty for everyone?
|
|
|
foreach ($usrAclGroups as $group) $orWhere[] = ['A_ADM_COMPANY', '=', $group];
|
|
|
}
|
|
|
- if ($this->_acl->hasField('A_CLASSIFIED')) {
|
|
|
+ if ($this->_acl->hasReadGroupField()) {
|
|
|
$orWhere[] = ['A_CLASSIFIED', '=', ''];// TODO: allow empty for everyone?
|
|
|
foreach ($usrAclGroups as $group) $orWhere[] = ['A_CLASSIFIED', '=', $group];
|
|
|
}
|
|
|
- if (!empty($orWhere) && $this->_acl->hasField('L_APPOITMENT_USER')) {
|
|
|
+ if (!empty($orWhere) && $this->_acl->hasOwnerField()) {
|
|
|
$orWhere[] = ['L_APPOITMENT_USER', '=', $userLogin];
|
|
|
}
|
|
|
return (!empty($orWhere)) ? [null, 'or', $orWhere] : null;
|