Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.x]: Duplicate product doesn't respect permission #3838

Open
frederik-station opened this issue Jan 7, 2025 · 2 comments
Open

[5.x]: Duplicate product doesn't respect permission #3838

frederik-station opened this issue Jan 7, 2025 · 2 comments

Comments

@frederik-station
Copy link

What happened?

Description

Users that don't have the "Create products" permission for a product type can still create new products by duplicating existing ones in the products panel:
Image

Same issue on Craft Commerce 4.

Steps to reproduce

  1. Log in with a user that doesn't have permission to create a specific product
  2. Duplicate that product

Expected behavior

The user shouldn't be able to duplicate the product.

Actual behavior

The user is able to duplicate the product.

Craft CMS version

5.5.8

Craft Commerce version

5.2.11

PHP version

No response

Operating system and version

No response

Database type and version

No response

Image driver and version

No response

Installed plugins and versions

Copy link

linear bot commented Jan 7, 2025

@lukeholder
Copy link
Member

Thanks, this is fixed for the next release.

To get the fix early, change your craftcms/commerce requirement in composer.json to:

"require": {
  "craftcms/commerce": "5.x-dev#7df79773d118818bdc44fe2b5650da6e2ac89a3a as 5.2.11",
  "...": "..."
}

Then run composer update.

We will update this ticket once the release is out.

@lukeholder lukeholder reopened this Jan 8, 2025
@lukeholder lukeholder self-assigned this Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants