mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-16 15:28:38 +00:00
merge: with v3
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
from django.utils.translation import ugettext_lazy as _, gettext
|
||||
from django.db import models
|
||||
|
||||
from common.db.models import JMSModel
|
||||
from common.db.models import JMSBaseModel
|
||||
from common.utils import lazyproperty
|
||||
from .permission import Permission
|
||||
from ..builtin import BuiltinRole
|
||||
@@ -22,7 +22,7 @@ class OrgRoleManager(models.Manager):
|
||||
return queryset.filter(scope=const.Scope.org)
|
||||
|
||||
|
||||
class Role(JMSModel):
|
||||
class Role(JMSBaseModel):
|
||||
""" 定义 角色 | 角色-权限 关系 """
|
||||
Scope = const.Scope
|
||||
|
||||
|
@@ -5,7 +5,7 @@ from django.conf import settings
|
||||
from django.core.exceptions import ValidationError
|
||||
from rest_framework.serializers import ValidationError
|
||||
|
||||
from common.db.models import JMSModel, CASCADE_SIGNAL_SKIP
|
||||
from common.db.models import JMSBaseModel, CASCADE_SIGNAL_SKIP
|
||||
from common.utils import lazyproperty
|
||||
from orgs.utils import current_org, tmp_to_root_org
|
||||
from .role import Role
|
||||
@@ -30,7 +30,7 @@ class RoleBindingManager(models.Manager):
|
||||
return self.get_queryset()
|
||||
|
||||
|
||||
class RoleBinding(JMSModel):
|
||||
class RoleBinding(JMSBaseModel):
|
||||
Scope = Scope
|
||||
""" 定义 用户-角色 关系 """
|
||||
scope = models.CharField(
|
||||
|
Reference in New Issue
Block a user