refactor(ui): Improve Teams page as per design - #194
Merged
Conversation
Contributor
Confidence Score: 5/5Safe to merge. The backend is well-guarded (duplicate-grant validation, Owner-protection checks, status preserved on full-replace) and the new tests cover the added paths. The multi-role model is consistently handled end-to-end: the migration backfills existing rows, the uniqueness validator was updated, _validate_sensitive_member_changes correctly compares frozensets of the new grant tuples, and the frontend mirrors the same semantics. No data-loss or permission-bypass paths were found. Files Needing Attention: No files require special attention. Reviews (8): Last reviewed commit: "Merge remote-tracking branch 'origin/dev..." | Re-trigger Greptile |
Team Member now supports several (role, resource) grants per user instead of one team-wide role, so a member can e.g. hold Billing on All Servers plus Admin on a specific server. resource_type/resource_name are stored and surfaced but not yet enforced per-resource (can() stays team-wide). - Team Member gains resource_type/resource_name fields, backfilled via patch - Team.set_member_role -> set_member_roles (full-replace), status/removal now loop every row a user holds instead of assuming exactly one - central.iam needed no changes: resolve_user_grants already unions capabilities across every role a user holds in a team - list_team_members groups rows into a roles[] array per user
Comment on lines
18
to
+32
| if (!props.canManage || props.member.is_owner) return [] | ||
|
|
||
| const items: DropdownOptions = [] | ||
| if (assignableRoles.value.length) { | ||
| items.push({ | ||
| group: 'Change role', | ||
| options: assignableRoles.value.map((role) => ({ | ||
| label: role.role_name, | ||
| onClick: () => emit('setRole', props.member.user, role.name), | ||
| })), | ||
| }) | ||
| } | ||
|
|
||
| items.push({ | ||
| group: 'Membership', | ||
| options: [ | ||
| { | ||
| label: props.member.status === 'Active' ? 'Suspend' : 'Reactivate', | ||
| icon: | ||
| props.member.status === 'Active' | ||
| ? 'lucide-circle-pause' | ||
| : 'lucide-circle-play', | ||
| onClick: () => | ||
| emit( | ||
| 'setStatus', | ||
| props.member.user, | ||
| props.member.status === 'Active' ? 'Suspended' : 'Active', | ||
| ), | ||
| }, | ||
| { | ||
| label: 'Remove', | ||
| icon: 'lucide-user-x', | ||
| theme: 'red', | ||
| onClick: () => emit('remove', props.member.user), | ||
| }, | ||
| ], | ||
| }) | ||
| return items | ||
| return [ | ||
| { | ||
| label: 'Manage roles', | ||
| icon: 'lucide-shield', | ||
| onClick: () => emit('manageRoles', props.member), | ||
| }, | ||
| { | ||
| label: 'Remove from team', | ||
| icon: 'lucide-user-x', | ||
| theme: 'red', | ||
| onClick: () => emit('removeRequested', props.member), | ||
| }, | ||
| ] |
Contributor
There was a problem hiding this comment.
siduck
force-pushed
the
fix-ui
branch
2 times, most recently
from
July 28, 2026 10:47
0c37d2d to
59721c1
Compare
# Conflicts: # dashboard/src/components/team/RoleMatrix.vue
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Teams page
Manage roles dialog
simplescreenrecorder-2026-07-26_20.01.17.mp4
Better cell component syntax
h()function aloneBefore
After