Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
l y
Jumpserver
Commits
6e42a970
Commit
6e42a970
authored
3 years ago
by
feng626
Committed by
Jiangjie.Bai
3 years ago
Browse files
Options
Download
Email Patches
Plain Diff
fix: 修复xpack引入包问题
parent
15cdd44c
v2.15
v2.15.5
v2.15.4
v2.15.3
v2.15.2
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
apps/acls/serializers/login_acl.py
+2
-2
apps/acls/serializers/login_acl.py
with
2 additions
and
2 deletions
+2
-2
apps/acls/serializers/login_acl.py
+
2
-
2
View file @
6e42a970
...
...
@@ -2,6 +2,7 @@ from django.utils.translation import ugettext as _
from
rest_framework
import
serializers
from
common.drf.serializers
import
BulkModelSerializer
from
common.drf.serializers
import
MethodSerializer
from
jumpserver.utils
import
has_valid_xpack_license
from
..models
import
LoginACL
from
.rules
import
RuleSerializer
...
...
@@ -40,12 +41,11 @@ class LoginACLSerializer(BulkModelSerializer):
self
.
set_action_choices
()
def
set_action_choices
(
self
):
from
xpack.plugins.license.models
import
License
action
=
self
.
fields
.
get
(
'action'
)
if
not
action
:
return
choices
=
action
.
_choices
if
not
License
.
has_valid_license
():
if
not
has_valid_
xpack_
license
():
choices
.
pop
(
LoginACL
.
ActionChoices
.
confirm
,
None
)
action
.
_choices
=
choices
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help