user acl fixes
This commit is contained in:
@@ -40,6 +40,14 @@ class User extends \Espo\Core\SelectManagers\Base
|
||||
'isActive' => true
|
||||
);
|
||||
}
|
||||
if ($this->getAcl()->get('portalPermission') !== 'yes') {
|
||||
$result['whereClause'][] = array(
|
||||
'OR' => [
|
||||
['isPortalUser' => false],
|
||||
['id' => $this->getUser()->id]
|
||||
]
|
||||
);
|
||||
}
|
||||
$result['whereClause'][] = array(
|
||||
'isSuperAdmin' => false
|
||||
);
|
||||
@@ -91,6 +99,13 @@ class User extends \Espo\Core\SelectManagers\Base
|
||||
);
|
||||
}
|
||||
|
||||
protected function accessPortalOnlyOwn(&$result)
|
||||
{
|
||||
$result['whereClause'][] = array(
|
||||
'id' => $this->getUser()->id
|
||||
);
|
||||
}
|
||||
|
||||
protected function accessOnlyTeam(&$result)
|
||||
{
|
||||
$this->setDistinct(true, $result);
|
||||
|
||||
Reference in New Issue
Block a user