-
Notifications
You must be signed in to change notification settings - Fork 356
Description
The problem
According to the following code:
https://github.com/matrix-org/matrix-rust-sdk/blob/main/crates/matrix-sdk-ui/src/spaces/leave.rs#L66
We check if the user that is leaving a room is the last admin, and if we so we prevent them to leave so that client can prompt them to promote another admin in their place, and then leave.
This would be fine for any room version below v12, because since v12 being an admin is not sufficient anymore, since a new role called Creator (with infinite power level) has been introduced and the upgrade room state event can now only be sent by people that have PL >= 150 as stated here
Short term solution
The simplest short term solution is to have the Leave Handle check if the last user has PL >= 150 if we are on a v12 room (for previous versions we can leave it as it right now), and then have clients prompt the user to promote someone to that specific power level
Long term solution
I think to avoid this issue from happening again we should introduce a new role level, called Owner (as EX and EC already do client side) to differentiate an admin with PL 100 from one with PL 150. Sadly as of right now there is no spec for such role, but I think this would make things more clear, and avoid mistakes like this in the future.