Skip to content

Commit

Permalink
db
Browse files Browse the repository at this point in the history
  • Loading branch information
susnux committed Jan 10, 2025
1 parent 8b73723 commit 910f946
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/Db/FormMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,14 +134,14 @@ public function findSharedForms(string $userId, array $groups = [], array $teams
}

// build expression for publicly shared forms (default only directly shown)
if ($filterShown) {
// Only shown forms
if ($this->configService->getAllowShowToAll()) {
if ($this->configService->getAllowPermitAll()) {
if ($filterShown && $this->configService->getAllowShowToAll()) {
// Only shown forms
$access = $qbShares->expr()->in('access_enum', $qbShares->createNamedParameter(Constants::FORM_ACCESS_ARRAY_SHOWN, IQueryBuilder::PARAM_INT_ARRAY, ':access_shown'));
} elseif ($filterShown === false) {
// All
$access = $qbShares->expr()->neq('access_enum', $qbShares->createNamedParameter(Constants::FORM_ACCESS_NOPUBLICSHARE, IQueryBuilder::PARAM_INT, ':access_nopublicshare'));
}
} elseif ($this->configService->getAllowPermitAll()) {
// All
$access = $qbShares->expr()->neq('access_enum', $qbShares->createNamedParameter(Constants::FORM_ACCESS_NOPUBLICSHARE, IQueryBuilder::PARAM_INT, ':access_nopublicshare'));
}

// Build the where clause for membership or public access
Expand Down

0 comments on commit 910f946

Please sign in to comment.