mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-26 01:06:00 +03:00
[PR #3937] [MERGED] chore(sh-admin): alert the user while deleting users who are team owners #4601
Labels
No labels
CodeDay
a11y
browser limited
bug
bug fix
cli
core
critical
design
desktop
discussion
docker
documentation
duplicate
enterprise
feature
feature
fosshack
future
good first issue
hacktoberfest
help wanted
i18n
invalid
major
minor
need information
need testing
not applicable to hoppscotch
not reproducible
pull-request
question
refactor
resolved
sandbox
self-host
spam
stale
testmu
wip
wont fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hoppscotch#4601
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/hoppscotch/hoppscotch/pull/3937
Author: @jamesgeorge007
Created: 3/26/2024
Status: ✅ Merged
Merged: 3/28/2024
Merged by: @AndrewBastin
Base:
release/2024.3.0← Head:sh-admin-user-deletion-updates📝 Commits (6)
80b9941chore: alert the user while deleting users who are team owners17db483refactor: leverage helpers8a8cdcfchore: more specific error message while removing Admin statusdee7864chore: address CR comments986a4b1refactor: remove metadata + simplify typesd6babaechore: redirect to users page only in error case after user deletion📊 Changes
6 files changed (+180 additions, -63 deletions)
View changed files
📝
packages/hoppscotch-sh-admin/locales/en.json(+3 -0)📝
packages/hoppscotch-sh-admin/src/helpers/errors.ts(+5 -2)➕
packages/hoppscotch-sh-admin/src/helpers/userManagement.ts(+119 -0)📝
packages/hoppscotch-sh-admin/src/modules/i18n.ts(+20 -1)📝
packages/hoppscotch-sh-admin/src/pages/users/_id.vue(+3 -9)📝
packages/hoppscotch-sh-admin/src/pages/users/index.vue(+30 -51)📄 Description
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
/usersand profile/user/_idviews./userspage).handleUserDeletion()underhelpers/userManagement.ts.getI18n()function exported from the i18n module for use outside components.Closes HFE-462.
Checks
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.