[PR #4508] [MERGED] HSB-497 chore: user deletetion if not solo team owner #4836

Closed
opened 2026-03-17 02:20:19 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hoppscotch/hoppscotch/pull/4508
Author: @mirarifhasan
Created: 11/3/2024
Status: Merged
Merged: 11/5/2024
Merged by: @AndrewBastin

Base: patchHead: feat/user-delete-condition


📝 Commits (2)

  • 86ccefc chore: user delete if not solo owner
  • ef48f67 refactor: isUserSoleOwnerInAnyTeam func

📊 Changes

2 files changed (+32 additions, -19 deletions)

View changed files

📝 packages/hoppscotch-backend/src/admin/admin.service.ts (+6 -9)
📝 packages/hoppscotch-backend/src/team/team.service.ts (+26 -10)

📄 Description

Closes HSB-497

What's changed

This PR updated the user deletion. Previously if a user a team owner, that user can not be deleted.
Now, a user can be deleted if he is not solo team owner in any of teams.

Notes to reviewers

3 ways a user can be deleted.

  1. User can delete himself
  2. User can delete by admin
  3. User can delete via API

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/hoppscotch/hoppscotch/pull/4508 **Author:** [@mirarifhasan](https://github.com/mirarifhasan) **Created:** 11/3/2024 **Status:** ✅ Merged **Merged:** 11/5/2024 **Merged by:** [@AndrewBastin](https://github.com/AndrewBastin) **Base:** `patch` ← **Head:** `feat/user-delete-condition` --- ### 📝 Commits (2) - [`86ccefc`](https://github.com/hoppscotch/hoppscotch/commit/86ccefc48ac18c7e4043052d2978a3bda4cbc437) chore: user delete if not solo owner - [`ef48f67`](https://github.com/hoppscotch/hoppscotch/commit/ef48f6770dcefb8995decc349f7860c752e5cc0d) refactor: isUserSoleOwnerInAnyTeam func ### 📊 Changes **2 files changed** (+32 additions, -19 deletions) <details> <summary>View changed files</summary> 📝 `packages/hoppscotch-backend/src/admin/admin.service.ts` (+6 -9) 📝 `packages/hoppscotch-backend/src/team/team.service.ts` (+26 -10) </details> ### 📄 Description <!-- Thanks for creating this pull request 🤗 Please make sure that the pull request is limited to one type (docs, feature, etc.) and keep it as small as possible. You can open multiple prs instead of opening a huge one. --> <!-- If this pull request closes an issue, please mention the issue number below --> <!-- Issue # here --> Closes HSB-497 <!-- Add an introduction into what this PR tries to solve in a couple of sentences --> ### What's changed <!-- Describe point by point the different things you have changed in this PR --> This PR updated the user deletion. Previously if a user a team owner, that user can not be deleted. Now, a user can be deleted if he is not solo team owner in any of teams. <!-- You can also choose to add a list of changes and if they have been completed or not by using the markdown to-do list syntax - [ ] Not Completed - [x] Completed --> ### Notes to reviewers <!-- Any information you feel the reviewer should know about when reviewing your PR --> 3 ways a user can be deleted. 1. User can delete himself 2. User can delete by admin 3. User can delete via API --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-17 02:20:19 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#4836
No description provided.