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

Move role creation into the recipe instead of feature activation #12510

Merged
merged 3 commits into from
Dec 8, 2022

Conversation

MikeAlhayek
Copy link
Member

@MikeAlhayek MikeAlhayek commented Sep 26, 2022

Fix #12425

@jtkech please check this out when your time permits since we chatted about this in the issue.

Here is a summary of the enhancements this PR brings

  1. We can now use recipe step to explicitly list the roles we want to use for the site. We are no longer forced to use the default roles.
  2. If a role is deleted, it wont come back at some point after installing new features. Currently, even if we delete a role, it could come back after installing more features.
  3. If the Roles feature is disabled, and re-enabled later, we keep track of permissions history to automatically assign any permission that would not have been assigned previously while the Roles feature is disabled.
  4. If an enabled feature introduces new permissions, it'll now get assigned to the proper roles by default "if these roles exists".

@MikeAlhayek MikeAlhayek added this to the 1.x milestone Oct 13, 2022
@MikeAlhayek MikeAlhayek added the breaking change 💥 Issues or pull requests that introduces breaking change(s) label Oct 13, 2022
@MikeAlhayek
Copy link
Member Author

@sebastienros this is ready for a quick review.

@MikeAlhayek MikeAlhayek modified the milestones: 1.x, 1.6 Dec 5, 2022
@MikeAlhayek MikeAlhayek merged commit ab7b3af into OrchardCMS:main Dec 8, 2022
@MikeAlhayek MikeAlhayek deleted the AddRoleOptions branch December 28, 2022 01:48
@gvkries
Copy link
Contributor

gvkries commented Jan 2, 2023

This PR breaks the permissions feature. Manually removed permissions are added back when the site restarts.

@MikeAlhayek
Copy link
Member Author

@gvkries please open a new issue with steps to reproduce the issue. You can reference this PR in the new issue.

@hyzx86
Copy link
Contributor

hyzx86 commented Jan 3, 2023

@MikeAlhayek here: #13024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change 💥 Issues or pull requests that introduces breaking change(s) needs triage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move role creation into the recipe instead of feature activation
4 participants