RexSystem1 voteoriginally by @cproudlock on GitHub
Root cause:
Two-part bug across frontend and gateway:
Gateway (guild_members.erl::check_can_manage_roles): uses strict > comparison on role positions. When all non-everyone roles are at the same position (a common config), no admin can assign any role because their max position is never strictly greater than the target.
Frontend (PermissionUtils.tsx::isRoleHigher): uses an indexOf on a sorted role list. When positions tie, sort order is unstable and the comparison is unreliable. The frontend disables the role menu before any request is sent.
The gateway already has correct equal-position tiebreaker logic in can_manage_role (singular) - it just wasn't applied to can_manage_roles (plural).
Fix:
Gateway: add equal-position tiebreaker (lower role ID can manage equal-position role) to match the singular version
Frontend: replace indexOf comparison with direct position comparison + role ID tiebreaker
Thread
Comment by @cproudlock
guild_members.erl::check_can_manage_roles): uses strict>comparison on role positions. When all non-everyone roles are at the same position (a common config), no admin can assign any role because their max position is never strictly greater than the target.- Frontend (
The gateway already has correct equal-position tiebreaker logic inPermissionUtils.tsx::isRoleHigher): uses anindexOfon a sorted role list. When positions tie, sort order is unstable and the comparison is unreliable. The frontend disables the role menu before any request is sent.can_manage_role(singular) - it just wasn't applied tocan_manage_roles(plural). Fix:- Gateway: add equal-position tiebreaker (lower role ID can manage equal-position role) to match the singular version
- Frontend: replace
Verified working on a self-hosted instance.indexOfcomparison with direct position comparison + role ID tiebreaker