Skip to content

Commit

Permalink
Merge pull request #106 from craftcms/feature/pt-2354-users-with-the-…
Browse files Browse the repository at this point in the history
…digital-products-manage-licenses-permissions

Fixed #105 incorrect check of manage licenses permission
  • Loading branch information
nfourtythree authored Feb 3, 2025
2 parents e85f636 + 5cbaf15 commit 3f3e256
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Release Notes for Digital Products

## Unreleased

- Fixed a bug where users with “Manage licenses” permission weren’t allowed to edit licenses. ([#105](https://github.com/craftcms/digital-products/issues/105))

## 3.2.3 - 2023-09-11

- Fixed an XSS vulnerability.
Expand Down
2 changes: 1 addition & 1 deletion src/elements/License.php
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,6 @@ private function _canManageProductType(User $user): bool
return false;
}

return $user->can('digitalProducts-manageLicenses:' . $productType->uid);
return $user->can('digitalProducts-manageLicenses');
}
}

0 comments on commit 3f3e256

Please sign in to comment.