Skip to content
New issue

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

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

Already on GitHub? # to your account

[data_release] Permission not added to unversioned files if version specified #8768

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
5 changes: 2 additions & 3 deletions modules/data_release/php/permissions.class.inc
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,7 @@ class Permissions extends \NDB_Page
);
} elseif (empty($releaseid) && !empty($version)) {
// If there is no release id but there is a version, give
// access to every file with that version AND every file
// where there is no version.
// access to every file with that version.
if ($version == 'Unversioned') {
$IDs = $DB->pselectCol(
"SELECT id FROM data_release WHERE
Expand All @@ -154,7 +153,7 @@ class Permissions extends \NDB_Page
} else {
$IDs = $DB->pselectCol(
"SELECT id FROM data_release WHERE
version IS NULL OR version=:drv",
version=:drv",
['drv' => $posted['data_release_version']],
);
}
Expand Down