Feature #1510
closedImplement internal user roles with ticket progression and assignment controls
100%
docs/superpowers/specs/2026-07-31-internal-roles-design.md
Description
### Problem
Currently, Pipeliner lacks role-based controls for internal users (e.g., CTOs, Developers) to manage ticket progression and assignments. This creates inefficiencies where:
- Developers cannot manually advance their assigned tickets.
- CTOs cannot assign tickets to Developers or move any ticket forward.
- Admins cannot configure these permissions without manual overrides.
### Context
To streamline workflows, Pipeliner needs:
1. **Internal user roles** (CTO, Developer) with distinct permissions:
- **CTO**: Can move **any** ticket forward to the next logical status **and** assign tickets to Developers.
- **Developer**: Can only move **their own assigned tickets** forward.
2. **UI controls** in the ticket panel:
- A "Move Forward" button (advances to next logical status).
- A "Change Status" dropdown (lets users pick any allowed status).
- An "Assign to Developer" dropdown (visible only to CTOs).
3. **Admin configuration**: Assign roles to internal users/teams in the existing admin dashboard.
4. **Integration**: All roles connect to Pipeliner with the same login flow as clients but with additional controls.
### Proposed Behaviour
- **Ticket Panel**: Add the following controls:
- "Move Forward" button (visible to CTOs and assigned Developers; disabled for others with a tooltip explaining permissions).
- "Change Status" dropdown (shows all allowed statuses; defaults to next logical status).
- "Assign to Developer" dropdown (visible only to CTOs; lists all Developers in the project/team).
- **Permissions**: Enforce role-based access server-side (e.g., 403 error if a Developer tries to move an unassigned ticket).
- **Admin Dashboard**: Extend the existing user management section to assign roles (CTO/Developer) to internal users or teams.
## Acceptance criteria
['- [ ] **Role-Based Permissions**: CTOs can move any ticket forward and assign tickets to Developers; Developers can only move their own assigned tickets forward.', '- [ ] **UI Controls in Ticket Panel**:\n - "Move Forward" button advances the ticket to the next logical status (visible to CTOs/assigned Developers; disabled for others with a tooltip).\n - "Change Status" dropdown lets users pick any allowed status (defaults to next logical status).\n - "Assign to Developer" dropdown (visible only to CTOs) lists all Developers in the project/team.', '- [ ] **Admin Role Assignment**: Admins can assign CTO/Developer roles to internal users or teams in the existing admin dashboard.', '- [ ] **Permission Enforcement**: Server-side validation returns a 403 error if a user attempts an unauthorized action (e.g., a Developer moving an unassigned ticket).', '- [ ] **Integration**: Internal users (CTO/Developer) log in via the same flow as clients but see additional controls (e.g., assignment dropdown).', '- [ ] **Testing**: Verify:\n - CTOs can move any ticket forward and assign tickets to Developers.\n - Developers can only move their own assigned tickets forward.\n - Admins can assign roles without errors.\n - Unauthorized actions trigger appropriate error messages/tooltips.']
## Classification
- feature
## Complexity
- 7/10 — Requires new role-based permission logic, UI controls, and admin configuration, but leverages existing auth and ticket management systems.