User roles via Zitadel with per-role upload limits #16

Open
opened 2026-09-23 21:48:06 +00:00 by NotS1mp · 0 comments
Owner

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).
## 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).
NotS1mp added the Kind/Security
Priority
Medium
3
Kind/Feature
labels 2026-09-23 21:48:06 +00:00
Sign in to join this conversation.