[Console] Simplify RBAC to fixed Admin and Editor user types
- Dominant language
- Java
- Stars
- 4.3k
- Forks
- 1.1k
- Avg merge
- 13h 35m
- Merged PRs (30d)
- 2
Description
## Background
StreamPark currently ships a configurable RBAC model based on roles, role-menu bindings, team membership, and a custom `@Permission` aspect for resource-level checks. This adds significant operational and maintenance overhead for most deployments, where only a small set of fixed capabilities is needed.
## Proposal
Simplify authorization to two built-in user types stored on `t_user.user_type`:
- **Admin** — full access (`*`)
- **Editor** — fixed permission set for job and development resources (app/sql/project/resource/etc.)
### Scope
1. Remove role/member/team management APIs, entities, mappers, and UI pages
2. Derive Shiro roles and permissions directly from `UserTypeEnum`
3. Remove the legacy `@Permission` annotation and `PermissionAspect`
4. Keep API authorization via Shiro `@RequiresPermissions`
5. Add MySQL/PostgreSQL `3.0.0` upgrade scripts to migrate legacy team-admin membership and drop obsolete RBAC tables
6. Update frontend permission checks and remove obsolete E2E cases
## Motivation
- Reduce complexity for operators and contributors
- Make authorization behavior predictable and easier to test
- Align with StreamPark 3.0 simplification goals
## Notes
Team identifiers remain in the data model for existing resources, but team/member/role administration is removed from the console.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by tracing UserTypeEnum, t_user.user_type, the legacy @Permission and PermissionAspect, and existing Shiro @RequiresPermissions checks. Then inspect the MySQL and PostgreSQL 3.0.0 upgrade scripts, frontend permission checks, and obsolete E2E cases. Done means the two user types enforce the stated permissions, legacy administration paths and tables are removed, migrations work, and tests reflect the new model.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, mysql, postgresql
- Domain
- authorization, backend, database, frontend
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100