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

Refacto of module permission checks #8269

Merged
merged 6 commits into from Oct 9, 2017

Conversation

Projects
None yet
5 participants
@Quetzacoalt91
Member

Quetzacoalt91 commented Aug 23, 2017

Questions Answers
Branch? develop
Description? It appeared some module actions were displayed even if the employee was not allowed to use it.In this PR, we merge the permissions checks for the links to display and for the action execution. This means if a button is not displayed, I can be sure the action would not pass if called manually. This PR also updated the upgrade action, which is now related to "add".
Type? bug fix
Category? BO
BC breaks? Nope
Deprecations? Yes
Fixed ticket? /
How to test? Play with the permissions related to the modules and checks the available actions on the module page are properly updated. ping @rGaillard

@Quetzacoalt91 Quetzacoalt91 changed the title from Display links for allowed actions only to Refacto of module permission checks Aug 23, 2017

Show outdated Hide outdated src/Adapter/Module/AdminModuleDataProvider.php
Show outdated Hide outdated src/Adapter/Module/AdminModuleDataProvider.php
Show outdated Hide outdated src/Adapter/Module/AdminModuleDataProvider.php
Show outdated Hide outdated src/Adapter/Module/AdminModuleDataProvider.php
Show outdated Hide outdated ...taShopBundle/Resources/views/Admin/Module/Includes/action_menu.html.twig
@@ -38,6 +38,7 @@ class AdminModuleDataProviderTest extends UnitTestCase
private $addonsDataProviderS;
private $categoriesProviderS;
private $adminModuleDataProvider;
private $moduleDataProviderS;

This comment has been minimized.

@eternoendless

eternoendless Sep 4, 2017

Member

Why is there a capital S in the end? 🤔

@eternoendless

eternoendless Sep 4, 2017

Member

Why is there a capital S in the end? 🤔

This comment has been minimized.

@Quetzacoalt91

Quetzacoalt91 Sep 4, 2017

Member

S stands for stub.

@Quetzacoalt91

Quetzacoalt91 Sep 4, 2017

Member

S stands for stub.

@eternoendless eternoendless added this to the 1.7.3.0 milestone Sep 4, 2017

@eternoendless

This comment has been minimized.

Show comment
Hide comment
@eternoendless
Member

eternoendless commented Oct 9, 2017

Thank you @Quetzacoalt91

@eternoendless eternoendless merged commit 95e8493 into PrestaShop:develop Oct 9, 2017

2 checks passed

codacy/pr Good work! A positive pull request.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment