v0.2.0
Multi-User RBAC
Bandeira now supports multiple user accounts with role-based access control, replacing the single admin password.
What's New
- Email/password authentication — users log in with email + password (bcrypt hashed)
- Three roles —
admin(full access),editor(manage flags/projects),viewer(read-only) - User management — admins can create, edit, and delete users from
/users - Role-based UI — mutation buttons and toggles are hidden for viewers
- Role-based API — mutation routes (POST/PUT/DELETE) return 403 for viewers
Upgrading from v0.1.0
No action required for existing deployments. On first startup after upgrade:
- The
userstable is auto-created by Ent migration - An admin user is seeded using your existing
BANDEIRA_AUTH_ADMINPASSWORD - If
BANDEIRA_AUTH_ADMINEMAILis not set, it defaults toadmin@bandeira.local
Log in with:
- Email:
admin@bandeira.local(or yourBANDEIRA_AUTH_ADMINEMAIL) - Password: your existing
BANDEIRA_AUTH_ADMINPASSWORD
New Environment Variables
| Variable | Default | Description |
|---|---|---|
BANDEIRA_AUTH_ADMINEMAIL |
admin@bandeira.local |
Email for the initial admin user |
BANDEIRA_AUTH_ADMINPASSWORD remains unchanged. Both variables are only used to seed the first user on initial startup.
Breaking Changes
- The login page now requires email + password instead of password only
pkg/session.SetAuthenticated()replaced bySetAuthenticatedUser(ctx, userID)(internal API)
Full Changelog: v0.1.0...v0.2.0