Bugs
In Progress

Cannot demote an Owner to Member/Moderator — 'last owner' error even when another owner exists

**EN** **What:** Trying to demote an **Owner** to Member (or Moderator) fails with "Cannot change role. You may be the last owner" — even when the org clearly has **another Owner**. **Evidence:** With an org that has **two Owners** (e.g. "Practical Philosophy" and "Alexis") plus a Member, the `change-role` request returns: `{ "ok": false, "code": "LAST_OWNER", "message": "Cannot change role. You may be the last owner" }` **Expected:** Demoting one Owner should be allowed whenever at least one other Owner remains. The last-owner guard should only block the change when it would leave the org with zero owners. **Where:** Organization → Members → change a member's role (demote an Owner). **Steps:** Open an org with 2+ Owners → demote one Owner to Member/Moderator → blocked with the "last owner" error. *Note: same LAST_OWNER guard as #71 (which is the promotion side) — this is the demotion case.* --- **FR** **Quoi :** Rétrograder un **Propriétaire (Owner)** en Membre (ou Modérateur) échoue avec « Cannot change role. You may be the last owner » — même quand l'organisation a clairement **un autre Propriétaire**. **Preuve :** Avec une organisation ayant **deux Propriétaires** (p. ex. « Practical Philosophy » et « Alexis ») plus un Membre, la requête `change-role` renvoie : `{ "ok": false, "code": "LAST_OWNER", "message": "Cannot change role. You may be the last owner" }` **Attendu :** Rétrograder un Propriétaire devrait être permis tant qu'il reste au moins un autre Propriétaire. Le garde-fou « dernier propriétaire » ne devrait bloquer que si le changement laisserait l'organisation sans aucun propriétaire. **Où :** Organisation → Membres → changer le rôle d'un membre (rétrograder un Propriétaire). **Étapes :** Ouvrir une organisation avec 2+ Propriétaires → rétrograder un Propriétaire en Membre/Modérateur → bloqué par l'erreur « last owner ». *Note : même garde-fou LAST_OWNER que #71 (côté promotion) — ici c'est le côté rétrogradation.*

0 Comments

Sign in to comment

No comments yet. Be the first to share your thoughts!