Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
[PM-19332] Create InitPendingOrganizationCommand #5584
base: main
Are you sure you want to change the base?
[PM-19332] Create InitPendingOrganizationCommand #5584
Changes from 4 commits
e9222e7
89f6d42
b4cb84b
dd6adf2
2f381ec
7ddc9fd
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Check warning on line 319 in src/Api/AdminConsole/Controllers/OrganizationUsersController.cs
src/Api/AdminConsole/Controllers/OrganizationUsersController.cs#L319
Check warning on line 28 in src/Core/AdminConsole/OrganizationFeatures/Organizations/InitPendingOrganizationCommand.cs
src/Core/AdminConsole/OrganizationFeatures/Organizations/InitPendingOrganizationCommand.cs#L19-L28
Check warning on line 32 in src/Core/AdminConsole/OrganizationFeatures/Organizations/InitPendingOrganizationCommand.cs
src/Core/AdminConsole/OrganizationFeatures/Organizations/InitPendingOrganizationCommand.cs#L31-L32
Check warning on line 34 in src/Core/AdminConsole/OrganizationFeatures/Organizations/InitPendingOrganizationCommand.cs
src/Core/AdminConsole/OrganizationFeatures/Organizations/InitPendingOrganizationCommand.cs#L34
Check warning on line 38 in src/Core/AdminConsole/OrganizationFeatures/Organizations/InitPendingOrganizationCommand.cs
src/Core/AdminConsole/OrganizationFeatures/Organizations/InitPendingOrganizationCommand.cs#L37-L38
Check warning on line 43 in src/Core/AdminConsole/OrganizationFeatures/Organizations/InitPendingOrganizationCommand.cs
src/Core/AdminConsole/OrganizationFeatures/Organizations/InitPendingOrganizationCommand.cs#L42-L43
Check warning on line 48 in src/Core/AdminConsole/OrganizationFeatures/Organizations/InitPendingOrganizationCommand.cs
src/Core/AdminConsole/OrganizationFeatures/Organizations/InitPendingOrganizationCommand.cs#L47-L48
Check warning on line 53 in src/Core/AdminConsole/OrganizationFeatures/Organizations/InitPendingOrganizationCommand.cs
src/Core/AdminConsole/OrganizationFeatures/Organizations/InitPendingOrganizationCommand.cs#L52-L53
Check warning on line 59 in src/Core/AdminConsole/OrganizationFeatures/Organizations/InitPendingOrganizationCommand.cs
src/Core/AdminConsole/OrganizationFeatures/Organizations/InitPendingOrganizationCommand.cs#L56-L59
Check warning on line 61 in src/Core/AdminConsole/OrganizationFeatures/Organizations/InitPendingOrganizationCommand.cs
src/Core/AdminConsole/OrganizationFeatures/Organizations/InitPendingOrganizationCommand.cs#L61
Check warning on line 64 in src/Core/AdminConsole/OrganizationFeatures/Organizations/InitPendingOrganizationCommand.cs
src/Core/AdminConsole/OrganizationFeatures/Organizations/InitPendingOrganizationCommand.cs#L64
Check warning on line 67 in src/Core/AdminConsole/OrganizationFeatures/Organizations/InitPendingOrganizationCommand.cs
src/Core/AdminConsole/OrganizationFeatures/Organizations/InitPendingOrganizationCommand.cs#L66-L67
Check warning on line 75 in src/Core/AdminConsole/OrganizationFeatures/Organizations/InitPendingOrganizationCommand.cs
src/Core/AdminConsole/OrganizationFeatures/Organizations/InitPendingOrganizationCommand.cs#L69-L75
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.
If you're going to return a CommandResult. Then I would suggest you return a
Success<InitializePendingOrganizationResponse>
and create a new empty record modelInitializePendingOrganizationResponse
.This way if we want to return something later, we can simply add a property to the model and populate it.
Check warning on line 78 in src/Core/AdminConsole/OrganizationFeatures/Organizations/InitPendingOrganizationCommand.cs
src/Core/AdminConsole/OrganizationFeatures/Organizations/InitPendingOrganizationCommand.cs#L77-L78
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.
This method is just a single policy check - I don't think it needs to be reused. I suggest copying it into the new command rather than exposing it as public here. One less tie back to OrganizationService. (It's also what we did in the cloud org signup command)