28222d634d
- Add role field to UserProfile (superadmin/admin/trainer) - Add role-based permission classes - Create UserManagementViewSet with CRUD and password change - Add API types and components for user management - Create users management page in settings - Only superadmins can manage users
27 lines
628 B
Python
27 lines
628 B
Python
# Generated by Django 4.2.29 on 2026-03-26 15:35
|
|
|
|
from django.db import migrations, models
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
("auth_app", "0004_userprofile"),
|
|
]
|
|
|
|
operations = [
|
|
migrations.AddField(
|
|
model_name="userprofile",
|
|
name="role",
|
|
field=models.CharField(
|
|
choices=[
|
|
("superadmin", "Super Admin"),
|
|
("admin", "Admin"),
|
|
("trainer", "Trainer"),
|
|
],
|
|
default="trainer",
|
|
max_length=20,
|
|
),
|
|
),
|
|
]
|