Skip to content

feat(site): show org default roles in member role editor#26107

Open
Emyrk wants to merge 3 commits into
gateway-accounts/default-roles-uifrom
gateway-accounts/members-default-roles-ui
Open

feat(site): show org default roles in member role editor#26107
Emyrk wants to merge 3 commits into
gateway-accounts/default-roles-uifrom
gateway-accounts/members-default-roles-ui

Conversation

@Emyrk
Copy link
Copy Markdown
Member

@Emyrk Emyrk commented Jun 5, 2026

Refs #25936. Stacks on #26028.

Surfaces the org's default_org_member_roles inside the org members role editor. These roles are implied, not physically assigned to any member. Just like the member role.

Configured in the org settings.

Screenshot From 2026-06-05 12-41-39
Implementation notes
  • The previous MemberRole row was generalized into a small ImpliedRoleRow. Member is the first row; any additionalImpliedRoles follow in order. Both share the same disabled style.
  • The Roles page's DefaultRolesDialog deliberately does not pass additionalImpliedRoles. That editor is where defaults are configured, so showing them as implied there would be circular.
  • If a role is both explicitly assigned to a user and listed as a default, the existing assignment stays in the selected set on save (the checkbox just isn't visible). The set sent to the PATCH is unchanged, which keeps the backend authoritative for "default ∪ explicit".

Coder Agents on behalf of @Emyrk.

@Emyrk Emyrk marked this pull request as ready for review June 5, 2026 17:43
Comment thread site/src/modules/roles/RoleSelector.tsx Outdated
Comment thread site/src/modules/roles/RoleSelectorDialog.tsx Outdated
@Emyrk Emyrk force-pushed the gateway-accounts/members-default-roles-ui branch from d2af057 to a562e74 Compare June 5, 2026 18:05
@Emyrk Emyrk force-pushed the gateway-accounts/default-roles-ui branch from 9fa32a5 to a67d838 Compare June 5, 2026 18:59
@Emyrk Emyrk force-pushed the gateway-accounts/members-default-roles-ui branch from ff31cc0 to ba009dc Compare June 5, 2026 18:59
@Emyrk Emyrk force-pushed the gateway-accounts/default-roles-ui branch from a67d838 to 238f18b Compare June 5, 2026 19:20
@Emyrk Emyrk force-pushed the gateway-accounts/members-default-roles-ui branch from ba009dc to 7c41dd8 Compare June 5, 2026 19:20
@Emyrk Emyrk force-pushed the gateway-accounts/default-roles-ui branch from 238f18b to 8a535b1 Compare June 5, 2026 19:34
@Emyrk Emyrk force-pushed the gateway-accounts/members-default-roles-ui branch from 7c41dd8 to a7e73e1 Compare June 5, 2026 19:35
@Emyrk Emyrk force-pushed the gateway-accounts/default-roles-ui branch from 8a535b1 to 56220d5 Compare June 5, 2026 20:02
@Emyrk Emyrk force-pushed the gateway-accounts/members-default-roles-ui branch from a7e73e1 to fc88284 Compare June 5, 2026 20:03
@Emyrk Emyrk force-pushed the gateway-accounts/default-roles-ui branch from 56220d5 to 206014f Compare June 5, 2026 20:31
Emyrk added 3 commits June 5, 2026 20:32
When editing an organization member's roles, render the org's
`default_org_member_roles` as additional always-granted (implied)
rows below `Member`. The roles are also filtered out of the
selectable list since they cannot be toggled off.

Other surfaces (deployment users, user create, the org Roles
page's Default Roles editor) keep showing only `Member` as the
sole implied role.
Add a small italic caption "Sourced from organization default roles"
to each implied row that comes from the org's default member roles.
The `Member` row keeps its existing layout (no caption).
@Emyrk Emyrk force-pushed the gateway-accounts/default-roles-ui branch from 206014f to 3a0ec37 Compare June 5, 2026 20:32
@Emyrk Emyrk force-pushed the gateway-accounts/members-default-roles-ui branch from fc88284 to 0424249 Compare June 5, 2026 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants