Currently, in your application, an admin has the ability to delete a team owner. This could potentially leave a team without any owner, which is a problematic scenario as it could lead to management and access issues as the application grows.
I propose that you modify the permissions such that only a team owner can delete another team owner. This change would ensure that there is always at least one owner in a team at any given time, preventing teams from being left ownerless.
This issue affects the Members component in the members.tsx file, where the deletion functionality is implemented. The change would likely involve updating the logic in this component to check the role of the current user and the role of the user to be deleted before allowing the operation.
By implementing this change, we can prevent potential management issues and improve the robustness of our team handling.
Currently, in your application, an admin has the ability to delete a team owner. This could potentially leave a team without any owner, which is a problematic scenario as it could lead to management and access issues as the application grows.
I propose that you modify the permissions such that only a team owner can delete another team owner. This change would ensure that there is always at least one owner in a team at any given time, preventing teams from being left ownerless.
This issue affects the
Members
component in themembers.tsx
file, where the deletion functionality is implemented. The change would likely involve updating the logic in this component to check the role of the current user and the role of the user to be deleted before allowing the operation.By implementing this change, we can prevent potential management issues and improve the robustness of our team handling.