-
Notifications
You must be signed in to change notification settings - Fork 672
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
MG - 1529 - User Removal #2122
Merged
Merged
MG - 1529 - User Removal #2122
Conversation
This file contains 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
1479343
to
88eafd0
Compare
88eafd0
to
ec64531
Compare
arvindh123
reviewed
Mar 21, 2024
arvindh123
reviewed
Mar 21, 2024
arvindh123
reviewed
Mar 21, 2024
arvindh123
reviewed
Mar 21, 2024
arvindh123
requested changes
Mar 21, 2024
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.
Hello @rodneyosodo left some comments for delete policies in auth service.
f13ec49
to
0d0c4ac
Compare
11e3133
to
3d13f69
Compare
38bf43d
to
fdf8bbb
Compare
a690465
to
1249fd4
Compare
dborovcanin
requested changes
Jun 26, 2024
This commit adds a new method to delete a client with a given ID in the repository package. The implementation of this method uses a SQL query to delete the client from the database. Additionally, test cases have been added for the delete method to ensure its functionality. These test cases include assertions for handling expected errors. These changes enhance the functionality of the codebase by allowing clients to be deleted from the database. Note: This commit does not include any breaking changes or additional modifications to other files. Signed-off-by: Rodney Osodo <[email protected]>
This commit adds a new command to the CLI for deleting a user. The command can be accessed by running `cli delete <user_id>`, where `<user_id>` is the ID of the user to be deleted. The code changes include the addition of a new method in the SDK interface, `deleteUser`, which constructs a URL and makes a HTTP DELETE request to delete a user. Additionally, a mock implementation of the method has been included for testing purposes. These changes enhance the functionality of the application by allowing users to delete user records directly from the CLI. Signed-off-by: Rodney Osodo <[email protected]>
- Add new handlers for deleting and changing the status of a client in the users API - Improve logging in the users API - Update response types in the users API - Update the Service interface in the users API Add new functionality for deleting a client: - Add a constant, event type, and method in the eventStore - Implement the DeleteClient method in the service file - The DeleteClient method disables a client by deleting its policies and checking for authorization - Trace the operation by starting a span and calling the DeleteClient function of the wrapped service. Signed-off-by: Rodney Osodo <[email protected]>
- Add new handlers for deleting and changing the status of a client in the users API - Improve logging in the users API - Update response types in the users API - Update the Service interface in the users API Add new functionality for deleting a client: - Add a constant, event type, and method in the eventStore - Implement the DeleteClient method in the service file - The DeleteClient method disables a client by deleting its policies and checking for authorization - Trace the operation by starting a span and calling the DeleteClient function of the wrapped service. Signed-off-by: Rodney Osodo <[email protected]>
Add a method to delete entity's policies for example things or users. This helps reduced network communication between users and auth service Signed-off-by: Rodney Osodo <[email protected]>
Signed-off-by: Rodney Osodo <[email protected]>
Check if domainsURL, invitationsURL and HostURL are empty to default to defURL Signed-off-by: Rodney Osodo <[email protected]>
Signed-off-by: Rodney Osodo <[email protected]>
Signed-off-by: Rodney Osodo <[email protected]>
Signed-off-by: Rodney Osodo <[email protected]>
Signed-off-by: Rodney Osodo <[email protected]>
Add users as a background job after a specified period of being deleted Signed-off-by: Rodney Osodo <[email protected]>
Signed-off-by: Rodney Osodo <[email protected]>
Signed-off-by: Rodney Osodo <[email protected]>
Add coumentation for the delete handler cron job based on what it does and why Signed-off-by: Rodney Osodo <[email protected]>
dborovcanin
approved these changes
Jun 28, 2024
Closed
andychao217
pushed a commit
to andychao217/magistrala
that referenced
this pull request
Sep 23, 2024
MG-2142 - Consume Things connect/disconnect event in Bootstrap (absmach#2192) NOISSUE - add CreatedAt and UpdatedAt fields for mgclients.Client (absmach#2306) NOISSUE - Fix failed log message (absmach#2307) MF-2299 - Update influxdb2 volumes path (absmach#2300) NOISSUE - Remove redundant relation check (absmach#2197) NOISSUE - Add domain events for Auth service (absmach#2313) NOISSUE - Update CI tools (absmach#2314) MG-888 - Update consumers SDK tests (absmach#2271) MG-888 - Add bootstrap SDK tests (absmach#2261) MG-2026 - Fix JSON page response key from groups to channels (absmach#2298) MG-1965 - Process Event Logs (absmach#2057) MG-1529 - User Removal (absmach#2122)
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.
What type of PR is this?
This is a feature because it adds user removal
What does this do?
This PR adds a new method to delete a user with a given ID in the repository package. The implementation of this method uses an SQL query to delete the client from the database.
Additionally, an extra method has been added to the gRPC auth service to handle entity deletion. This is useful because it reduces network trips back and forth from the client microservices to the auth microservice. Test cases have been added for the delete method to ensure its functionality.
Which issue(s) does this PR fix/relate to?
Have you included tests for your changes?
Yes, I have included tests for my changes.
Did you document any new/modified feature?
Yes, I have updated the documentation for the new feature.
Notes