You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
web: four share roles have no icon in the theme defaults #3991
The theme defaults in services/web/pkg/theme/theme.go have no common.shareRoles entry for four built-in roles: EditorListGrantsWithVersions, SpaceEditorWithoutTrashbin, SpaceEditorWithoutVersionsWithoutTrashbin and FileEditorListGrantsWithVersions. The web client takes a role's icon only from that entry (getRoleIcon in packages/web-pkg/src/composables/piniaStores/theme.ts), so it shows its fallback icon user for these roles. The other editor roles show pencil.
All four roles are disabled by default, so this only shows up after an admin enables one of them with GRAPH_AVAILABLE_ROLES.
Steps to reproduce
Enable one of the roles, e.g. GRAPH_AVAILABLE_ROLES including 8f4701d9-c68f-4109-a482-88e22ee32805 (SpaceEditorWithoutTrashbin).
In the web UI, open the members of a project space and choose that role for a member.
Expected
The role is shown with the pencil icon, like the other editor and space editor roles.
Actual
The role is shown with the generic user icon.
Where
services/web/pkg/theme/theme.go: themeDefaults.common.shareRoles has entries for 17 of the 21 roles that unifiedrole.GetRoles(unifiedrole.RoleFilterAll()) returns.
Nothing makes sure a new role gets a theme entry. A unit test that checks every built-in role against the served theme would catch this.
Activity