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

Create System roles by default #17271

Open
Piedone opened this issue Dec 21, 2024 · 0 comments
Open

Create System roles by default #17271

Piedone opened this issue Dec 21, 2024 · 0 comments

Comments

@Piedone
Copy link
Member

Piedone commented Dec 21, 2024

Is your feature request related to a problem?

We have three default System roles coming from OrchardCore.Roles.Core, Anonymous, Authenticated, and Administrator (or a user-configured name for the same):

internal sealed class DefaultSystemRoleNameProvider : ISystemRoleNameProvider

Nevertheless, these roles need to be created for each site, with descriptions, usually from a setup recipe. This is repetition that if one uses something other than the built-in recipes, one also has to continue in custom recipes.

Describe the solution you'd like

Pre-create the three roles, e.g. from the OrchardCore.Roles module, with their default descriptions, and remove them from the built-in recipes.

Describe alternatives you've considered

Having something explicit, like a recipe command or some IServiceCollection extension, that would create these roles. However, since the System roles are already a default (and well, System ones, important ones), I'd rather create them already.

If one wants to override their descriptions, or in case of Anonymous and Authenticated, their permissions, they'll still be able to in much the same way, also from setup recipes.

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

No branches or pull requests

1 participant