feat: Integrate One Identity Manager Proposal Management#287
Merged
Conversation
Junjiequan
approved these changes
Mar 11, 2024
Contributor
Junjiequan
left a comment
There was a problem hiding this comment.
Looks good to me. It seems the unit tests covered most of the features 👍
| `ContactEmail='${user.email}'` | ||
| ); | ||
|
|
||
| // In tehorie there should be only one person with the same email, but the 1IM.Person table has no unique constraint on ContactEmail. |
Comment on lines
+27
to
+30
| for (const [envVar, QueueConsumer] of Object.entries(queueConsumers)) { | ||
| if (str2Bool(process.env[envVar] as string)) { | ||
| new QueueConsumer(messageBroker); | ||
| } |
Contributor
martin-trajanovski
left a comment
There was a problem hiding this comment.
In general looks good but I left some comments that you can look into.
| } | ||
|
|
||
| onMessage: ConsumerCallback = async (type, message) => { | ||
| if (!EVENTS_FOR_HANDLING.includes(type as Event)) { |
Contributor
There was a problem hiding this comment.
Can't we use the hasTriggeringType and validateProposalMessage helper functions here instead?
| } | ||
|
|
||
| // Method to collect users from the proposal | ||
| function collectUsersFromProposal( |
Contributor
There was a problem hiding this comment.
Maybe this is more like utility function and can be moved to a util file or something similar and name it collectUsersFromProposalMessage or something like that. I was thinking that it might be reused in some other consumers.
… and event checking
…and used in `oneIdentityIntegrationHandler`
Contributor
Author
|
@martin-trajanovski Thank you for the useful comments. I have updated the PR based on your feedback. |
martin-trajanovski
approved these changes
Mar 19, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
A new message consumer,
OneIdentityIntegrationQueueConsumer, has been implemented to manage proposals and their users in the One Identity Manager application server. This consumer handles the registration of accepted proposals as new System Roles, along with assigning their members and the proposer to the newly created Role. Additionally, it manages proposal updates such as member addition and removal.Motivation and Context
The addition of this message consumer addresses the need to seamlessly integrate proposal management functionalities within the One Identity Manager application server. By automating the process of registering accepted proposals and managing proposal updates.
How Has This Been Tested
Changes
OneIdentityIntegrationQueueConsumer.