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

Refactor MaintenanceController to use annotations #12099

Merged
merged 2 commits into from Jan 21, 2019

Conversation

@matks
Copy link
Contributor

matks commented Jan 9, 2019

Questions Answers
Branch? develop
Description? Refactor Controller to use latest conventions about annotations and fix access rules
Type? improvement
Category? BO
BC breaks? no
Deprecations? no
Fixed ticket?
How to test? Page "Configure > Shop Parameters > General > Maintenance" should behave like before, but access rules have been fixed. See below.

Access rules changes:

  • before, anybody could see it
  • before, someone with either read, create, update or delete right could modify it
  • now (with the PR) you need read right to see the page
  • now, you need either create, update or delete right to modify the page

This change is Reviewable

@mickaelandrieu mickaelandrieu added this to the 1.7.6.0 milestone Jan 15, 2019

@@ -42,8 +42,10 @@ class MaintenanceController extends FrameworkBundleAdminController
const CONTROLLER_NAME = 'AdminMaintenance';
/**
* @var FormInterface
* @Template("@PrestaShop/Admin/Configure/ShopParameters/maintenance.html.twig")
* @AdminSecurity("is_granted(['read', 'update', 'create', 'delete'], request.get('_legacy_controller'))")

This comment has been minimized.

@Quetzacoalt91

Quetzacoalt91 Jan 15, 2019

Member

I figured out I approved this PR, but we have the same discussion as in #12098 ><

This comment has been minimized.

@matks

matks Jan 15, 2019

Author Contributor

So we agreed to go for "read" only. I need to update this PR.

@matks matks dismissed stale reviews from PierreRambaud, mickaelandrieu, and Quetzacoalt91 via e6c75eb Jan 19, 2019

@matks

This comment has been minimized.

Copy link
Contributor Author

matks commented Jan 19, 2019

@Quetzacoalt91 PR updated following our new security rules

@mbadrani mbadrani self-assigned this Jan 21, 2019

@mbadrani mbadrani added QA ✔️ and removed waiting for QA labels Jan 21, 2019

@PierreRambaud PierreRambaud merged commit 6af57bf into PrestaShop:develop Jan 21, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@PierreRambaud

This comment has been minimized.

Copy link
Contributor

PierreRambaud commented Jan 21, 2019

Thanks @matks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment