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
chore(sh-admin): alert the user while deleting users who are team owners #3937
Merged
AndrewBastin
merged 6 commits into
hoppscotch:release/2024.3.0
from
jamesgeorge007:sh-admin-user-deletion-updates
Mar 28, 2024
Merged
chore(sh-admin): alert the user while deleting users who are team owners #3937
AndrewBastin
merged 6 commits into
hoppscotch:release/2024.3.0
from
jamesgeorge007:sh-admin-user-deletion-updates
Mar 28, 2024
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
SH Admin user management.
jamesgeorge007
force-pushed
the
sh-admin-user-deletion-updates
branch
from
March 27, 2024 07:41
4ba94ed
to
17db483
Compare
jamesgeorge007
commented
Mar 27, 2024
jamesgeorge007
force-pushed
the
sh-admin-user-deletion-updates
branch
from
March 27, 2024 09:16
0cb540b
to
5eb047b
Compare
Action leading to a scenario where there are no users with Admin privileges.
jamesgeorge007
force-pushed
the
sh-admin-user-deletion-updates
branch
from
March 27, 2024 09:20
5eb047b
to
8a8cdcf
Compare
amk-dev
reviewed
Mar 27, 2024
amk-dev
reviewed
Mar 27, 2024
amk-dev
reviewed
Mar 27, 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.
do we need to show the success toast, when no user is deleted ? here we're showing a success toast "Number of deleted users 0".
Screenshare.-.2024-03-27.5_14_13.PM.mp4
nivedin
requested changes
Mar 28, 2024
- Implicitly infer the action type (bulk/individual) from the supplied deleted users list. - Display toast messages one after the other by relying on the native toast APIs refraining from the need to maintain timeouts separately. - Ensure the toast message about user deletion success/failure with the count is displayed only when above `0`. - Cleanup. Co-authored-by: amk-dev <akash.k.mohan98@gmail.com> Co-authored-by: nivedin <nivedinp@gmail.com>
jamesgeorge007
force-pushed
the
sh-admin-user-deletion-updates
branch
from
March 28, 2024 07:28
63ac2c3
to
dee7864
Compare
jamesgeorge007
commented
Mar 28, 2024
nivedin
approved these changes
Mar 28, 2024
amk-dev
reviewed
Mar 28, 2024
amk-dev
approved these changes
Mar 28, 2024
AndrewBastin
approved these changes
Mar 28, 2024
jamesgeorge007
commented
Mar 28, 2024
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
Attempting to delete users who are owners of at least one team from the Admin dashboard is an action that would fail. There wasn't any feedback previously while attempting to delete users from the list view/a user via the profile view. This PR adds an error toast that will be shown during the scenarios mentioned above.
Changes
/users
and profile/user/_id
views./users
page).handleUserDeletion()
underhelpers/userManagement.ts
.getI18n()
function exported from the i18n module for use outside components.Closes HFE-462.
Checks