OrchardCMS / OrchardCore

Orchard Core is an open-source modular and multi-tenant application framework built with ASP.NET Core, and a content management system (CMS) built on top of that framework.
https://orchardcore.net
BSD 3-Clause "New" or "Revised" License
7.38k stars 2.38k forks source link

Hide recipes from disabled themes #6543

Open JoeBerkley opened 4 years ago

JoeBerkley commented 4 years ago

We're making heavy use of multi-tenancy in a lot of our projects, and often the tenants will each have their own bespoke themes, with their own recipes for creating definitions, queries etc.

However when we need to run a recipe manually in the admin area, recipes for the other sites are showing, even though the themes for the other sites are disabled, so I don't think it makes sense that they're showing just because they exist.

ns8482e commented 4 years ago

Theme has open issue, Related #3539

I would use Modules for Recipe instead of themes

JoeBerkley commented 4 years ago

Theme has open issue, Related #3539

That seems to be about hiding themes themselves, which isn't the goal of this issue, its just about hiding recipes users can run if a theme isn't even enabled.

I would use Modules for Recipe instead of themes

I'm not a big fan of this approach, as then we have to have a module that has no functionality except for just housing recipes, which a theme already has support for, and just adds extra overhead to get around a restriction that seems arbitrary?

ns8482e commented 4 years ago

I'm not a big fan of this approach, as then we have to have a module that has no functionality except for just housing recipes,

I agree, it's just personal preference, I personally like to keep themes to target only UI & Layouts where as prefer content, content definition and migration managed in module - It gives better control.

sebastienros commented 4 years ago

When we setup a site we want to see all recipes, even from the ones which are not enabled. From the admin, we could hide them.