Skip to content

[5.7] Improve product permissions#4240

Draft
lukeholder wants to merge 5 commits into5.7from
feature/product-permissions
Draft

[5.7] Improve product permissions#4240
lukeholder wants to merge 5 commits into5.7from
feature/product-permissions

Conversation

@lukeholder
Copy link
Copy Markdown
Member

@lukeholder lukeholder commented Feb 26, 2026

Description

  • Product permissions have been separated into "View", "Create", "Save", and "Delete" permissions, just like entries.
  • Added craft\commerce\services\ProductTypes::getViewableProductTypes().
  • Added craft\commerce\services\ProductTypes::getViewableProductTypeIds().
  • Added craft\commerce\services\ProductTypes::getCreatableProductTypeIds().
  • Deprecated craft\commerce\services\ProductTypes::hasPermission(). Use $user->can() directly instead.

@lukeholder lukeholder changed the base branch from 5.x to 5.7 March 25, 2026 12:50
@lukeholder lukeholder changed the title [5.x] Improve product permissions [5.7] Improve product permissions Mar 25, 2026
@lukeholder lukeholder mentioned this pull request Mar 25, 2026
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant