2024-05-11 03:22:01 +00:00
|
|
|
# Generated by Django 4.1.13 on 2024-05-09 03:16
|
2022-12-20 08:48:18 +00:00
|
|
|
|
2022-02-17 12:13:31 +00:00
|
|
|
import django.contrib.auth.models
|
|
|
|
import django.contrib.contenttypes.models
|
2022-12-20 08:48:18 +00:00
|
|
|
from django.db import migrations, models
|
2024-05-11 03:22:01 +00:00
|
|
|
import django.db.models.deletion
|
|
|
|
import uuid
|
2022-02-17 12:13:31 +00:00
|
|
|
|
|
|
|
|
2022-12-20 08:48:18 +00:00
|
|
|
class Migration(migrations.Migration):
|
2024-05-11 03:22:01 +00:00
|
|
|
|
2022-02-17 12:13:31 +00:00
|
|
|
initial = True
|
|
|
|
|
|
|
|
dependencies = [
|
|
|
|
('contenttypes', '0002_remove_content_type_name'),
|
2024-05-11 03:22:01 +00:00
|
|
|
('auth', '0012_alter_user_first_name_max_length'),
|
|
|
|
('orgs', '0001_initial'),
|
2022-02-17 12:13:31 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
operations = [
|
|
|
|
migrations.CreateModel(
|
|
|
|
name='MenuPermission',
|
|
|
|
fields=[
|
|
|
|
('id', models.UUIDField(default=uuid.uuid4, primary_key=True, serialize=False)),
|
|
|
|
],
|
|
|
|
options={
|
|
|
|
'verbose_name': 'Menu permission',
|
2024-05-11 03:22:01 +00:00
|
|
|
'permissions': [('view_console', 'Can view console view'), ('view_audit', 'Can view audit view'), ('view_workbench', 'Can view workbench view'), ('view_webterminal', 'Can view web terminal'), ('view_filemanager', 'Can view file manager'), ('view_systemtools', 'Can view System Tools')],
|
2022-02-17 12:13:31 +00:00
|
|
|
'default_permissions': [],
|
|
|
|
},
|
|
|
|
),
|
|
|
|
migrations.CreateModel(
|
|
|
|
name='Role',
|
|
|
|
fields=[
|
2024-05-11 03:22:01 +00:00
|
|
|
('created_by', models.CharField(blank=True, max_length=128, null=True, verbose_name='Created by')),
|
|
|
|
('updated_by', models.CharField(blank=True, max_length=128, null=True, verbose_name='Updated by')),
|
2022-02-17 12:13:31 +00:00
|
|
|
('date_created', models.DateTimeField(auto_now_add=True, null=True, verbose_name='Date created')),
|
|
|
|
('date_updated', models.DateTimeField(auto_now=True, verbose_name='Date updated')),
|
|
|
|
('id', models.UUIDField(default=uuid.uuid4, primary_key=True, serialize=False)),
|
|
|
|
('name', models.CharField(max_length=128, verbose_name='Name')),
|
2024-05-11 03:22:01 +00:00
|
|
|
('scope', models.CharField(choices=[('system', 'System'), ('org', 'Organization')], default='system', max_length=128, verbose_name='Scope')),
|
2022-12-20 08:48:18 +00:00
|
|
|
('builtin', models.BooleanField(default=False, verbose_name='Builtin')),
|
2022-02-17 12:13:31 +00:00
|
|
|
('comment', models.TextField(blank=True, default='', max_length=128, verbose_name='Comment')),
|
|
|
|
],
|
2024-05-11 03:22:01 +00:00
|
|
|
options={
|
|
|
|
'verbose_name': 'Role',
|
|
|
|
},
|
2022-02-17 12:13:31 +00:00
|
|
|
),
|
|
|
|
migrations.CreateModel(
|
|
|
|
name='ContentType',
|
|
|
|
fields=[
|
|
|
|
],
|
|
|
|
options={
|
|
|
|
'proxy': True,
|
|
|
|
'indexes': [],
|
|
|
|
'constraints': [],
|
|
|
|
},
|
|
|
|
bases=('contenttypes.contenttype',),
|
|
|
|
managers=[
|
|
|
|
('objects', django.contrib.contenttypes.models.ContentTypeManager()),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
migrations.CreateModel(
|
|
|
|
name='Permission',
|
|
|
|
fields=[
|
|
|
|
],
|
|
|
|
options={
|
2024-05-11 03:22:01 +00:00
|
|
|
'verbose_name': 'Permissions',
|
2022-02-17 12:13:31 +00:00
|
|
|
'proxy': True,
|
|
|
|
'indexes': [],
|
|
|
|
'constraints': [],
|
|
|
|
},
|
|
|
|
bases=('auth.permission',),
|
|
|
|
managers=[
|
|
|
|
('objects', django.contrib.auth.models.PermissionManager()),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
migrations.CreateModel(
|
|
|
|
name='RoleBinding',
|
|
|
|
fields=[
|
2024-05-11 03:22:01 +00:00
|
|
|
('created_by', models.CharField(blank=True, max_length=128, null=True, verbose_name='Created by')),
|
|
|
|
('updated_by', models.CharField(blank=True, max_length=128, null=True, verbose_name='Updated by')),
|
2022-02-17 12:13:31 +00:00
|
|
|
('date_created', models.DateTimeField(auto_now_add=True, null=True, verbose_name='Date created')),
|
|
|
|
('date_updated', models.DateTimeField(auto_now=True, verbose_name='Date updated')),
|
2024-05-11 03:22:01 +00:00
|
|
|
('comment', models.TextField(blank=True, default='', verbose_name='Comment')),
|
2022-02-17 12:13:31 +00:00
|
|
|
('id', models.UUIDField(default=uuid.uuid4, primary_key=True, serialize=False)),
|
2024-05-11 03:22:01 +00:00
|
|
|
('scope', models.CharField(choices=[('system', 'System'), ('org', 'Organization')], default='system', max_length=128, verbose_name='Scope')),
|
|
|
|
('org', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='role_bindings', to='orgs.organization', verbose_name='Organization')),
|
|
|
|
('role', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='role_bindings', to='rbac.role', verbose_name='Role')),
|
2022-02-17 12:13:31 +00:00
|
|
|
],
|
|
|
|
options={
|
|
|
|
'verbose_name': 'Role binding',
|
|
|
|
},
|
|
|
|
),
|
|
|
|
]
|