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

[RFC] SyliusACLBundle #84

Closed
dyjo opened this issue May 17, 2013 · 1 comment
Closed

[RFC] SyliusACLBundle #84

dyjo opened this issue May 17, 2013 · 1 comment
Labels
Feature New feature proposals. RFC Discussions about potential changes or new features.

Comments

@dyjo
Copy link

dyjo commented May 17, 2013

One of the projects I'm working on is a paid content model. The application itself is very complex and as such should be decoupled as much as possible from Sylius (it will probably live in a different Kernel).

We want to use Sylius as the "store", but are trying to figure out a way to facilitate the ACL rules for the content. The content is currently produced using Sonata with a bunch of different ContentProvider classes that include things like basic CKEditor, impress.js editor, pdf generator, etc.

The current plan using existing Sylius functionality:

  1. add a product_id to the Content model
  2. add a Product form type to the Content Admin form type.
  3. manage the Product entity in lifecycle events of Content
  4. when an order is paid for, dispatch an event. The Content bundle has a listener that creates ACL entries for any Contents with corresponding product_id.

This feels really clunky. Using all of the Sonata bundles is really heavy. There's two different administration panels. The app itself is not decoupled at all from Sylius, because it needs to listen for those events. It's just a mess.

Enter SyliusACLBundle! (and/or SyliusPaidContentBundle?).

The idea I have is to add something like an accessControls property to Product. So instead of having to do the whole event and listener deal, it would just be a function of a completed order to check if it should create any ACL entries.

A simple AccessControllableInterface in SyliusACLBundle would be created, implemented by any class that contains paid content.

This way, there would be 3 kernels: a BaseKernel that contains all of the bundles shared between Sylius and MyApp, the SyliusKernel, and MyAppKernel. Assets would be properly separated. The list of benefits goes on.

So... I know there are a lot of other things that need to be completed with the existing set of bundles. But does anybody see a purpose for this sort of bundle? Or maybe a better way to make this happen?

@stloyd
Copy link
Contributor

stloyd commented Mar 18, 2015

@pjedrzejewski I guess this can be closed as we have RBAC support now...

CoderMaggie pushed a commit to CoderMaggie/Sylius that referenced this issue Jun 1, 2016
…he-ladder

[CJMAX-76] Relocated the update cart button
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New feature proposals. RFC Discussions about potential changes or new features.
Projects
None yet
Development

No branches or pull requests

3 participants