mirror of https://github.com/jumpserver/jumpserver
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
96 lines
4.4 KiB
96 lines
4.4 KiB
# Generated by Django 4.1.13 on 2024-05-09 03:16
|
|
|
|
import django.contrib.auth.models
|
|
import django.contrib.contenttypes.models
|
|
from django.db import migrations, models
|
|
import django.db.models.deletion
|
|
import uuid
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
initial = True
|
|
|
|
dependencies = [
|
|
('contenttypes', '0002_remove_content_type_name'),
|
|
('auth', '0012_alter_user_first_name_max_length'),
|
|
('orgs', '0001_initial'),
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name='MenuPermission',
|
|
fields=[
|
|
('id', models.UUIDField(default=uuid.uuid4, primary_key=True, serialize=False)),
|
|
],
|
|
options={
|
|
'verbose_name': 'Menu permission',
|
|
'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')],
|
|
'default_permissions': [],
|
|
},
|
|
),
|
|
migrations.CreateModel(
|
|
name='Role',
|
|
fields=[
|
|
('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')),
|
|
('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')),
|
|
('scope', models.CharField(choices=[('system', 'System'), ('org', 'Organization')], default='system', max_length=128, verbose_name='Scope')),
|
|
('builtin', models.BooleanField(default=False, verbose_name='Builtin')),
|
|
('comment', models.TextField(blank=True, default='', max_length=128, verbose_name='Comment')),
|
|
],
|
|
options={
|
|
'verbose_name': 'Role',
|
|
},
|
|
),
|
|
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={
|
|
'verbose_name': 'Permissions',
|
|
'proxy': True,
|
|
'indexes': [],
|
|
'constraints': [],
|
|
},
|
|
bases=('auth.permission',),
|
|
managers=[
|
|
('objects', django.contrib.auth.models.PermissionManager()),
|
|
],
|
|
),
|
|
migrations.CreateModel(
|
|
name='RoleBinding',
|
|
fields=[
|
|
('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')),
|
|
('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')),
|
|
('comment', models.TextField(blank=True, default='', verbose_name='Comment')),
|
|
('id', models.UUIDField(default=uuid.uuid4, primary_key=True, serialize=False)),
|
|
('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')),
|
|
],
|
|
options={
|
|
'verbose_name': 'Role binding',
|
|
},
|
|
),
|
|
]
|