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

Product Type Permissions Broken #42

Closed
devkokov opened this issue Jul 17, 2019 · 3 comments
Closed

Product Type Permissions Broken #42

devkokov opened this issue Jul 17, 2019 · 3 comments

Comments

@devkokov
Copy link

devkokov commented Jul 17, 2019

Permissions specific to product types are saved as:

digitalProducts-manageProductType:productTypeId

but checked as:

$this->requirePermission('digitalProducts-manageProducts:' . $product->typeId);

This means that currently only super admins can create/edit products.

@andris-sevcenko
Copy link
Contributor

Yikes, thank you!

@devkokov
Copy link
Author

@andris-sevcenko thanks for the quick fix!

The permissions work fine now when trying to edit a product directly e.g. /admin/digital-products/products/productType/ID , but the main products listing page doesn't show any products or product types, and the button to add new products is missing from top right.

I've had a look at the DigitalProductsProductIndex.js file but couldn't decipher what's wrong.

@andris-sevcenko
Copy link
Contributor

Ugh, of course. Because Digital Products hasn't really been converted to using UIDs instead of IDs in the source keys. Hang on.

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

No branches or pull requests

2 participants