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

Detailed permissions #1869

Closed
wants to merge 26 commits into from
Closed

Conversation

pdaleramirez
Copy link
Contributor

@pdaleramirez pdaleramirez commented Nov 12, 2020

  • Renamed manage product type to edit product type permission.
  • Created create and delete product permission.
  • Implemented edit, create and delete production permission in action methods and templates.
  • Created migration for manage product type to edit, create and delete product type permission.

Split Manage Promotions

  • Edit Sales
  • Create Sales
  • Delete Sales
  • Edit Discounts
  • Create Discounts
  • Delete Discounts

Split Manage Subscriptions

  • Edit Subscriptions
  • Create Subscriptions
  • Delete Subscriptions

Split Manage Customer

Split Manage Orders

  • Determine the things that this permission does below...
  • ...
  • ...

Keep Shipping and Tax as is.
Keep Manage Store as is.

…ssions for each product type.

- Created \craft\commerce\services\Products::hasPermission method that deny or allow user production permission with ProductPermissionTest unit test.
Implement hasPermission on edit, delete and save production action methods
Added create product permission in action edit product page
…es::getEditableProductTypeIds method

Removed commerce nav Products manage product permission condition.
… permission.

- Created ProductTypes::getCreatableProductTypes that gets only products based on  permission.
- Added delete, create and edit permission on Product element defineActions.
Added create product permission on action save product
… type permission to detailed product type edit, create and delete products permission.
@pdaleramirez pdaleramirez self-assigned this Nov 12, 2020
@pdaleramirez pdaleramirez requested review from nfourtythree and removed request for nfourtythree November 12, 2020 09:55
@codecov
Copy link

codecov bot commented Dec 1, 2020

Codecov Report

❗ No coverage uploaded for pull request base (4.0@09169ff). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff           @@
##             4.0    #1869   +/-   ##
======================================
  Coverage       ?   16.27%           
  Complexity     ?     5577           
======================================
  Files          ?      273           
  Lines          ?    18147           
  Branches       ?        0           
======================================
  Hits           ?     2954           
  Misses         ?    15193           
  Partials       ?        0           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 09169ff...682442b. Read the comment docs.

@lukeholder lukeholder changed the base branch from develop to 4.0 December 2, 2020 05:15
@lukeholder
Copy link
Member

Will resolve #174

@lukeholder lukeholder changed the title Product detailed permission Detailed permissions Dec 2, 2020
@lukeholder lukeholder self-requested a review December 2, 2020 05:42
@lukeholder lukeholder closed this Dec 2, 2020
@lukeholder lukeholder deleted the feature/edit-delete-product-permission branch December 2, 2020 07:05
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.

2 participants