mirror of https://github.com/jumpserver/jumpserver
修改组管理model
parent
30cfa8a5f4
commit
c6e0429584
|
@ -1,6 +1,6 @@
|
|||
import datetime
|
||||
from django.db import models
|
||||
from juser.models import Group as UserGroup
|
||||
from juser.models import UserGroup
|
||||
|
||||
|
||||
class IDC(models.Model):
|
||||
|
@ -11,7 +11,7 @@ class IDC(models.Model):
|
|||
return self.name
|
||||
|
||||
|
||||
class Group(models.Model):
|
||||
class BisGroup(models.Model):
|
||||
name = models.CharField(max_length=80, unique=True)
|
||||
comment = models.CharField(max_length=160, blank=True, null=True)
|
||||
|
||||
|
@ -30,7 +30,7 @@ class Asset(models.Model):
|
|||
port = models.SmallIntegerField(max_length=5)
|
||||
idc = models.ForeignKey(IDC)
|
||||
user_group = models.ManyToManyField(UserGroup)
|
||||
bis_group = models.ManyToManyField(Group)
|
||||
bis_group = models.ManyToManyField(BisGroup)
|
||||
login_type = models.CharField(max_length=1, choices=LOGIN_TYPE_CHOICES, default='L')
|
||||
username_common = models.CharField(max_length=20, blank=True, null=True)
|
||||
password_common = models.CharField(max_length=80, blank=True, null=True)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
from django.db import models
|
||||
|
||||
|
||||
class Group(models.Model):
|
||||
class UserGroup(models.Model):
|
||||
name = models.CharField(max_length=80, unique=True)
|
||||
comment = models.CharField(max_length=160, blank=True, null=True)
|
||||
|
||||
|
@ -20,7 +20,7 @@ class User(models.Model):
|
|||
name = models.CharField(max_length=80)
|
||||
email = models.EmailField(max_length=75, null=True, blank=True)
|
||||
role = models.CharField(max_length=2, choices=USER_ROLE_CHOICES, default='CU')
|
||||
group = models.ManyToManyField(Group)
|
||||
user_group = models.ManyToManyField(UserGroup)
|
||||
ldap_pwd = models.CharField(max_length=100)
|
||||
ssh_key_pwd1 = models.CharField(max_length=100)
|
||||
ssh_key_pwd2 = models.CharField(max_length=100)
|
||||
|
|
Loading鈥
Reference in New Issue