mirror of https://github.com/jumpserver/jumpserver
fix: 修复社区版跳转问题
parent
a6d61721dd
commit
d25cde1bd5
|
@ -1,6 +1,7 @@
|
||||||
from django.utils.translation import gettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
from django.db import models
|
from django.db import models
|
||||||
from django.db.models import Q
|
from django.db.models import Q
|
||||||
|
from django.conf import settings
|
||||||
from django.core.exceptions import ValidationError
|
from django.core.exceptions import ValidationError
|
||||||
from rest_framework.serializers import ValidationError
|
from rest_framework.serializers import ValidationError
|
||||||
|
|
||||||
|
@ -115,6 +116,9 @@ class RoleBinding(JMSModel):
|
||||||
else:
|
else:
|
||||||
all_orgs = Organization.objects.all()
|
all_orgs = Organization.objects.all()
|
||||||
|
|
||||||
|
if not settings.XPACK_ENABLED:
|
||||||
|
all_orgs = all_orgs.filter(id=Organization.DEFAULT_ID)
|
||||||
|
|
||||||
# 有系统级别的绑定,就代表在所有组织有这个权限
|
# 有系统级别的绑定,就代表在所有组织有这个权限
|
||||||
if system_bindings:
|
if system_bindings:
|
||||||
orgs = all_orgs
|
orgs = all_orgs
|
||||||
|
|
Loading…
Reference in New Issue