Skip to content

Commit ed151a8

Browse files
author
Sean Harvey
committed
Merge pull request #34 from tractorcow/pulls/permissions
API Allow group-based permissions to be applied
2 parents 690da83 + ef2916b commit ed151a8

6 files changed

Lines changed: 407 additions & 97 deletions

File tree

code/model/DNDataArchive.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,8 @@ public function canMoveTo($targetEnv, $member = null) {
228228

229229
// Hooks into ArchiveUploaders permission to prevent proliferation of permission checkboxes.
230230
// Bypasses the quota check - we don't need to check for it as long as we move the snapshot within the project.
231-
return (bool)($targetEnv->ArchiveUploaders()->byID($member->ID));
231+
return $targetEnv->ArchiveUploaders()->byID($member->ID)
232+
|| $member->inGroups($targetEnv->ArchiveUploaderGroups());
232233
}
233234

234235
/**

0 commit comments

Comments
 (0)