-
Notifications
You must be signed in to change notification settings - Fork 64
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
New Feature: Only show orders placed in current_store in current_store admin #45
New Feature: Only show orders placed in current_store in current_store admin #45
Conversation
Love the contribution and can definitely understand the desire for this particular feature. As currently written, I'm concerned this change will be too restrictive. I know of a couple of stores that run a single Solidus app to power localized versions of their store. In that scenario, it's often valuable for admins to be able to view all orders. I think that instead of always filtering to the current store, it would be better to provide a way to search for orders belonging to a specific store. It would be easy enough to add that functionality in to core, since core already has some hidden support for multiple stores. Once that search filter is implemented, we could add the ability to link admins to specific stores and limiting their ability to only manage models associated with that store. |
I second @adammathys here. It shouldn't be too hard to add another select input to the order |
Even though core has this functionality hidden, I feel its better placed place with the multi domain gem. I like the approach @mamhoff suggested the addition of a select filter. Would the ability to then lock a specific admin user to only see the current store's orders sit well within a CanCan permission? |
I had a tiny bit of downtime between talks so I tossed together a PR to add searching for orders based on store to Solidus: solidusio/solidus#1140 And I think this sits particularly well within CanCan permissions. At the very least, it makes it easily configurable so that stores can decide how they want to handle things themselves. |
Hi @adammathys , Nice work on the PR (solidusio/solidus#1140) during SolidusConf! I'm just not convinced a store select filter should live in core - the functionality is hidden [in core], so should it not remain that way? It also adds a bit of superfluous UI, which could ultimately confuse a non-technical user. Is it not be better to add this filter via a admin deface within this gem? |
Hey @SebAshton, while there's not currently any interface built in to Solidus for easily managing multiple stores, the logic for connecting an order to a store is entirely contained within core. There's logic currently used to pick a current store. All of the logic for assigning an order to a store is in core. (Here and here.) I can understand the argument for trying to keep as much as possible out of core. But if it's actually possible for a user to create orders belonging to different stores without the use of this extension I believe they should have ability to filter them in the order admin. |
This functionality is now available in Solidus: solidusio/solidus#1140. Closing this PR. Thanks again for prompting the discussion and the initial PR, @SebAshton. |
No description provided.