fix(ShareModal): ensure correct order of roles (Most powerfull first)

This commit is contained in:
Edouard Vanbelle
2026-05-31 23:05:05 +02:00
parent a0d9cd881b
commit 274cf9da11
+5 -1
View File
@@ -570,7 +570,11 @@ const shareModal = {
*/
_renderMemberGroupsInto(container) {
container.replaceChildren();
const groups = /** @type {ShareRoleEnum[]} */ (['viewer', 'editor', 'admin']);
// Highest-privilege role first ("Can manage" → "Can edit" → "Can view"),
// matching the UX contract and the kebab-menu / role-select dropdown
// order. Renaming the labels from "Manager"/"Editor"/"Viewer" to
// "Can manage"/"Can edit"/"Can view" left this iteration order stale.
const groups = /** @type {ShareRoleEnum[]} */ (['admin', 'editor', 'viewer']);
let memberIndex = 0;
for (const role of groups) {