Skip to content

Commit

Permalink
Merge pull request #297 from secultce/develop
Browse files Browse the repository at this point in the history
Merge develop to homolog
  • Loading branch information
Junior-Shyko authored Nov 4, 2024
2 parents a986f4c + 47e0c88 commit 653cd90
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/protected/application/lib/MapasCulturais/ApiQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -1865,7 +1865,7 @@ protected function _addFilterByPermissions($value) {
$pkey = $this->addSingleParam($this->_permission);
$_uid = $user->id;

if(($this->_permission != 'view' || $class::isPrivateEntity()) && (!$this->usesOriginSubsite || !$this->adminInSubsites)) {
if(($this->_permission != 'view' || $class::isPrivateEntity()) && (!$this->usesOriginSubsite)) {
$this->joins .= " JOIN e.__permissionsCache $alias WITH $alias.action = $pkey AND $alias.userId = $_uid ";

} else {
Expand All @@ -1890,6 +1890,8 @@ protected function _addFilterByPermissions($value) {

$admin_where = implode(' OR ', $admin_where);
$admin_where = "OR ($admin_where)";
} else {
$admin_where = "OR (e._subsiteId IS NULL)";
}

if($this->usesStatus && $this->_permission == 'view' && !$class::isPrivateEntity()) {
Expand Down

0 comments on commit 653cd90

Please sign in to comment.