add permission list api view
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
# Generated by Django 5.2.4 on 2025-08-06 16:17
|
||||
|
||||
import uuid
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('accounts', '0007_remove_role_permissions_tab_and_more'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='PermissionToAction',
|
||||
fields=[
|
||||
('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False, unique=True)),
|
||||
('created_at', models.DateTimeField(auto_now_add=True)),
|
||||
('updated_at', models.DateTimeField(auto_now=True)),
|
||||
('name', models.CharField(max_length=200)),
|
||||
('code', models.CharField(max_length=100, unique=True)),
|
||||
],
|
||||
options={
|
||||
'verbose_name': 'Harakatlar uchun ruxsatnoma',
|
||||
'verbose_name_plural': 'Harakatlar uchun ruxsatnomalar',
|
||||
},
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='permissiontotab',
|
||||
name='permission_to_actions',
|
||||
field=models.ManyToManyField(related_name='permission_to_tabs', to='accounts.permissiontoaction'),
|
||||
),
|
||||
]
|
||||
@@ -0,0 +1,23 @@
|
||||
# Generated by Django 5.2.4 on 2025-08-06 16:22
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('accounts', '0008_permissiontoaction_and_more'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='role',
|
||||
name='permission_to_actions',
|
||||
field=models.ManyToManyField(blank=True, related_name='roles', to='accounts.permissiontoaction'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='role',
|
||||
name='permission_to_tabs',
|
||||
field=models.ManyToManyField(blank=True, related_name='roles', to='accounts.permissiontotab'),
|
||||
),
|
||||
]
|
||||
18
core/apps/accounts/migrations/0010_role_comment.py
Normal file
18
core/apps/accounts/migrations/0010_role_comment.py
Normal file
@@ -0,0 +1,18 @@
|
||||
# Generated by Django 5.2.4 on 2025-08-06 16:31
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('accounts', '0009_role_permission_to_actions_role_permission_to_tabs'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='role',
|
||||
name='comment',
|
||||
field=models.CharField(blank=True, max_length=200, null=True),
|
||||
),
|
||||
]
|
||||
19
core/apps/accounts/migrations/0011_alter_user_role.py
Normal file
19
core/apps/accounts/migrations/0011_alter_user_role.py
Normal file
@@ -0,0 +1,19 @@
|
||||
# Generated by Django 5.2.4 on 2025-08-06 16:48
|
||||
|
||||
import django.db.models.deletion
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('accounts', '0010_role_comment'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='user',
|
||||
name='role',
|
||||
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='users', to='accounts.role'),
|
||||
),
|
||||
]
|
||||
Reference in New Issue
Block a user