Skip to content

Commit

Permalink
Admin and full customer user must have access to all versions
Browse files Browse the repository at this point in the history
  • Loading branch information
vtsykun committed Sep 14, 2024
1 parent 1d885f2 commit 4810b89
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion config/packages/security.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ security:
ROLE_UPDATE_PACKAGES: ~
ROLE_DELETE_PACKAGES: ~
ROLE_EDIT_PACKAGES: ~

ROLE_FULL_CUSTOMER: [ ROLE_USER ] # Access to all packages without ACL group restriction
ROLE_MAINTAINER: [ ROLE_FULL_CUSTOMER, ROLE_USER, ROLE_UPDATE_PACKAGES ]
ROLE_ADMIN: [ ROLE_MAINTAINER, ROLE_EDIT_PACKAGES, ROLE_DELETE_PACKAGES ]
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/ZipballController.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public function zipballAction(#[Vars('name')] Package $package, string $hash): R
return $this->createNotFound();
}

$isGranted = $this->isGranted('VIEW_ALL_VERSION', $package);
$isGranted = $this->isGranted('VIEW_ALL_VERSION', $package) || $this->isGranted('ROLE_FULL_CUSTOMER', $package);
foreach ($package->getAllVersionsByReference($reference) as $version) {
$isGranted |= $this->isGranted('ROLE_FULL_CUSTOMER', $version);
}
Expand Down

0 comments on commit 4810b89

Please sign in to comment.