diff --git a/lib/shared/thread-utils.js b/lib/shared/thread-utils.js --- a/lib/shared/thread-utils.js +++ b/lib/shared/thread-utils.js @@ -1679,7 +1679,7 @@ // the set of permission literals for each role to user-facing permission enums // to help pre-populate the permission checkboxes when editing roles. function useRoleUserSurfacedPermissions( - threadInfo: LegacyThreadInfo, + threadInfo: ThreadInfo, ): RoleUserSurfacedPermissions { return React.useMemo(() => { const roleNamesToPermissions: { [string]: Set } = @@ -1687,7 +1687,12 @@ Object.keys(threadInfo.roles).forEach(roleID => { const roleName = threadInfo.roles[roleID].name; - const rolePermissions = Object.keys(threadInfo.roles[roleID].permissions); + const rolePermissions = threadInfo.minimallyEncoded + ? Object.keys( + decodeMinimallyEncodedRoleInfo(threadInfo.roles[roleID]) + .permissions, + ) + : Object.keys(threadInfo.roles[roleID].permissions); const setOfUserSurfacedPermissions = new Set(); rolePermissions.forEach(rolePermission => {