Define user roles in Zitadel and use them in Musify. Each role has its own limit on the number of songs a user can upload.
Expected behavior
Roles are defined in the Zitadel project (e.g. user, premium, artist, admin; final names to be decided).
Roles are included in the token claims and read by the backend.
Each role has a configurable maximum number of uploaded songs.
When a user reaches their limit, the upload is rejected with a clear message, and the UI shows current usage (e.g. 12 / 50 songs).
Admins are not limited and can access admin-only features (see #5).
Considerations
Limits must be enforced server-side, not only in the frontend.
Keep the role → limit mapping configurable (config file or database) so it can change without redeploying.
Define behavior when a user is downgraded to a role with a lower limit (e.g. keep existing songs but block new uploads).
## Summary
Define user roles in Zitadel and use them in Musify. Each role has its own limit on the number of songs a user can upload.
## Expected behavior
- Roles are defined in the Zitadel project (e.g. `user`, `premium`, `artist`, `admin`; final names to be decided).
- Roles are included in the token claims and read by the backend.
- Each role has a configurable maximum number of uploaded songs.
- When a user reaches their limit, the upload is rejected with a clear message, and the UI shows current usage (e.g. `12 / 50 songs`).
- Admins are not limited and can access admin-only features (see #5).
## Considerations
- Limits must be enforced server-side, not only in the frontend.
- Keep the role → limit mapping configurable (config file or database) so it can change without redeploying.
- Define behavior when a user is downgraded to a role with a lower limit (e.g. keep existing songs but block new uploads).
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
Define user roles in Zitadel and use them in Musify. Each role has its own limit on the number of songs a user can upload.
Expected behavior
user,premium,artist,admin; final names to be decided).12 / 50 songs).Considerations