mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-21 11:28:38 +00:00
feat: 用户授权应用树按组织节点进行区分
This commit is contained in:
@@ -8,7 +8,7 @@ from django.core.exceptions import ValidationError
|
||||
from common.utils import get_logger
|
||||
from ..utils import (
|
||||
set_current_org, get_current_org, current_org,
|
||||
filter_org_queryset, get_org_name_by_id
|
||||
filter_org_queryset, get_org_by_id, get_org_name_by_id
|
||||
)
|
||||
from ..models import Organization
|
||||
|
||||
@@ -70,9 +70,7 @@ class OrgModelMixin(models.Model):
|
||||
|
||||
@property
|
||||
def org(self):
|
||||
from orgs.models import Organization
|
||||
org = Organization.get_instance(self.org_id)
|
||||
return org
|
||||
return get_org_by_id(self.org_id)
|
||||
|
||||
@property
|
||||
def org_name(self):
|
||||
|
Reference in New Issue
Block a user