Skip to content

web: four share roles have no icon in the theme defaults #3991

Open

Description

@asaah262

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

  1. Enable one of the roles, e.g. GRAPH_AVAILABLE_ROLES including 8f4701d9-c68f-4109-a482-88e22ee32805 (SpaceEditorWithoutTrashbin).
  2. 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions