[team] Add per-project role management to the team page#2161
Open
frankrousseau wants to merge 7 commits into
Open
[team] Add per-project role management to the team page#2161frankrousseau wants to merge 7 commits into
frankrousseau wants to merge 7 commits into
Conversation
Role select per team member showing the effective role: picking the person's global role back restores inheritance, admins stay text-only. Team roles live in the productions store (currentTeamRoles) and the page is gated by the new isCurrentUserProductionManager getter, so per-project managers get the team controls and demoted managers lose them. Team.vue and ProductionTeamList.vue converted to composition API on the way. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Blue accent on the role select and text plus a tooltip showing the person's global role whenever an explicit project role is set. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The blue border read poorly: a small Project role tag next to the select marks members whose project role overrides their global role, with the global role in the tooltip. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Ingest the project_roles map exposed by GET /data/user/context (cgwire/zou#1178) into the user store and derive currentUserEffectiveRole, isCurrentUserProductionManager and isCurrentUserProductionSupervisor from it. The Team page getter moves from the production team fetch to the context map, and changing your own role updates the map so the gating follows immediately. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
First migration wave from global role getters to per-production effective roles: entity lists, task lists and the metadata modal swap to isCurrentUserProductionManager / isCurrentUserProductionSupervisor. TaskInfo and ActionPanel also serve cross-production views (Todos, All Tasks, checks, notifications) where the current production can differ from the displayed task's one: they resolve the role through the new currentUserRoleForProduction(productionId) getter keyed on the task's production. AllTaskList keeps global getters (cross-production view). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Second wave: production-routed pages (task, playlist, task type, schedule, breakdown, entity pages and lists, production settings and brief, estimation helper, breakdown shot line) and the entity mixins swap to the per-production effective role getters. Task.vue is safe on currentProduction: the topbar route watcher syncs it on every navigation, including arrivals from Todos or notifications. Deferred with reasons (wave 3): PlaylistPlayer and PlaylistedEntity (temp playlists can mix productions, shared player runs unauthenticated), MetadataField, MetadataInput, TableMetadataSelectorMenu and the descriptors mixin (consumed by cross-production views), AssetLibrary (cross-production route, currentProduction never synced). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Third and last wave: comment and annotation affordances in the playlist player and the comment widgets resolve through the displayed entity or task production (temp playlists can mix productions); the metadata widgets and the search query list take the production from the entity or a productionId prop wired by production-scoped pages, with a global-role fallback preserving cross-production consumers. Playlist editing actions, the department combobox and the descriptors mixin stay on global gating, with reasons recorded in the wave report. The shared players remain untouched (unauthenticated). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Problem
Solution
isCurrentUserProductionManagergetter (project role first, global fallback)Team.vueandProductionTeamList.vueconverted to composition API on the way