Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Form): If permitAllUsers is not set then no public access is granted #2070

Merged
merged 1 commit into from
Apr 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions lib/Db/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,15 @@ public function setAccess(array $access) {
// No further permissions -> 0
// Permit all users, but don't show in navigation -> 1
// Permit all users and show in navigation -> 2
if (!$access['permitAllUsers'] && !$access['showToAllUsers']) {
if (!$access['permitAllUsers']) {
// no permit means no public share
$value = Constants::FORM_ACCESS_NOPUBLICSHARE;
} elseif ($access['permitAllUsers'] && !$access['showToAllUsers']) {
$value = Constants::FORM_ACCESS_PERMITALLUSERS;
} else {
} elseif ($access['showToAllUsers']) {
// permit all + show to all
$value = Constants::FORM_ACCESS_SHOWTOALLUSERS;
} else {
// only permit all but not shown to all
$value = Constants::FORM_ACCESS_PERMITALLUSERS;
}

// If legacyLink add 3
Expand Down
Loading