-
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
OpenID Recipes: use step model instead of view model, support update #10136
OpenID Recipes: use step model instead of view model, support update #10136
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are the new step models the same as the old viewmodels that were used?
i.e. is it non breaking on existing recipes, or?
But awesome looks really good thanks
@kaipm we just need to understand if it is breaking anything so we can document the upgrade steps accordingly. |
Yes, they are. I did unit tests before making any changes, to make sure I match the old structure. However, there is a small difference in the behaviour: The following example was necessary to add role1 before the PR, it still works after the PR:
The following two examples did not add role1 before the PR. But after the PR they will add role1 because
Edit: I forgot, OpenID Scopes were not imported at all, so those were newly added. I made them similar to the role entries, to be a little consistent:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, after removing the extra whitespaces
src/OrchardCore.Modules/OrchardCore.OpenId/Recipes/OpenIdApplicationStep.cs
Outdated
Show resolved
Hide resolved
src/OrchardCore.Modules/OrchardCore.OpenId/Recipes/OpenIdApplicationStepModel.cs
Show resolved
Hide resolved
src/OrchardCore.Modules/OrchardCore.OpenId/Recipes/OpenIdScopeStep.cs
Outdated
Show resolved
Hide resolved
test/OrchardCore.Tests/Modules/OrchardCore.OpenId/OpenIdApplicationStepTests.cs
Show resolved
Hide resolved
test/OrchardCore.Tests/Modules/OrchardCore.OpenId/OpenIdApplicationStepTests.cs
Outdated
Show resolved
Hide resolved
@hishamco, I did all the proposed changes. I also removed some line breaks between IF-statements too, because most were without already. I hope that's fine! |
Thanks @kaipm for the PR, we will merge this ASAP |
Changes in the pull request
OpenIdScopeStepViewModel
withOpenIdScopeStepModel
in recipeCreateOpenIdApplicationViewModel
withOpenIdApplicationStepModel
in recipeOpenIdScopeStep
to supportupdate
OpenIdApplicationStep
to supportupdate
OpenIdApplicationStep
to include importing scopes, which were not imported beforeThis is another part of #6364