Add automatic role assignment for new and existing users
- Implemented auto-assignment of the 'private' role for new users upon first login, ensuring they have access to products. - Added a safety check to assign the 'private' role to existing users without roles during login. - Updated relevant documentation to reflect these changes in role management and visibility patterns.
This commit is contained in:
@@ -1544,6 +1544,11 @@ try {
|
||||
**Automatische Rollen-Zuweisung (MVP):**
|
||||
- Neue User erhalten bei erster Anmeldung automatisch die Rolle `private` (Status: `approved`)
|
||||
- Implementierung in `server/api/auth/login.post.ts` nach User-Profile-Erstellung
|
||||
- Safety-Check: Bestehende User ohne Rollen erhalten ebenfalls `private` Rolle
|
||||
|
||||
**Opt-in Sichtbarkeit:**
|
||||
- Produkte OHNE `product_role_visibility` Einträge sind für NIEMANDEN sichtbar
|
||||
- Produkte MIT Einträgen sind nur für User mit passender `approved` Rolle sichtbar
|
||||
|
||||
### 4.2 Drizzle Schema Definition
|
||||
|
||||
|
||||
Reference in New Issue
Block a user