Skip to content

Commit baac2f4

Browse files
authored
[data_release] Permission not added to unversioned files if version specified (#8768)
When adding version permissions for a user, permissions for unversioned files are no longer added. Resolves #8741
1 parent aeea588 commit baac2f4

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

modules/data_release/php/permissions.class.inc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,7 @@ class Permissions extends \NDB_Page
143143
);
144144
} elseif (empty($releaseid) && !empty($version)) {
145145
// If there is no release id but there is a version, give
146-
// access to every file with that version AND every file
147-
// where there is no version.
146+
// access to every file with that version.
148147
if ($version == 'Unversioned') {
149148
$IDs = $DB->pselectCol(
150149
"SELECT id FROM data_release WHERE
@@ -154,7 +153,7 @@ class Permissions extends \NDB_Page
154153
} else {
155154
$IDs = $DB->pselectCol(
156155
"SELECT id FROM data_release WHERE
157-
version IS NULL OR version=:drv",
156+
version=:drv",
158157
['drv' => $posted['data_release_version']],
159158
);
160159
}

0 commit comments

Comments
 (0)