-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
The default permissions are not set when creating new tenant #13457
Comments
I'm suggesting to add the administrator with |
Yes I already thought about this, see at the end of #13040 (comment), I don't remember all details but the
|
@jtkech We should mention in the release logs that a user MUST specify the roles they want to use in their setup recipe otherwise no roles will be created. You documented the change in the recipe's read-me file but not the release logs. https://docs.orchardcore.net/en/latest/docs/reference/modules/Recipes/ The docs states
However, we do not actually map all know permissions as per the document. This is something we should fix prior releasing 1.6. |
Yes, as introduced by your PR #12510, then what I did is #13040 to fix #13024 and #13035
I think we do as it is working for example with the blog recipe where we define Roles with empty permissions, but when the roles are created, in the handler default permissions based on enabled features are assigned. What I described above from memory is about the If part of a setup recipe as we are using with empty permissions, no problem, when creating the role the related handler will assign the default permissions depending on the currently enabled features. Finally, if part of a setup recipe but with some defined permissions as in your example, finally not sure need to be tried, normally the handler does a merge by taking into account the existing permissions, so normally it will not remove the ones defined in the step. |
Maybe I didn't understand the issue, in your setup recipe you define the |
@jtkech I have to try the blog recipe. But with my recipe, I did not supply any permissions. I simply supplied an empty array. When the role was created it did not include any permission. I am expecting the default permissions to be included. I'll try the blog recipe and see if there is something I am doing wrong on my side. |
Okay, and as I remember only the default permissions of the currently enabled features (e.g. by a previous recipe step); and if the role doesn't exist yet, otherwise as said currently the RoleStep will just overwrite them with what you define in the step. |
@jtkech the blog recipe indeed worked as expected. I am not sure why my custom startup recipe did not assign any permission during the setup. I'll try to reproduce the issue on my side and check the logs for possible errors. |
I updated the 1.6 release docs |
Have the same issue i think, |
@vitalybrandes it looks like your missing roles not permissions. Per the release notes, you need to define roles in your setup recipe. If you don't explicitly specify permissions for every role, the default permissions will be applies to each of the defined roles |
Describe the bug
When creating a tenant from a recipe like the one below, the
Administrator
is created without any permissions.To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
a workaround is to give the "Administrator" role the
SiteOwner
permission.@jtkech you worked on the permissions, maybe something way missed?
The text was updated successfully, but these errors were encountered: