Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
guo xiaoyong
Jumpserver
Commits
c0560ad3
Unverified
Commit
c0560ad3
authored
3 years ago
by
Jiangjie.Bai
Committed by
GitHub
3 years ago
Browse files
Options
Download
Plain Diff
Merge pull request #6464 from jumpserver/dev
v2.12.0 rc5
parents
3aea998b
c318762f
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
apps/assets/models/authbook.py
+0
-1
apps/assets/models/authbook.py
apps/assets/models/user.py
+1
-0
apps/assets/models/user.py
apps/assets/serializers/account.py
+4
-0
apps/assets/serializers/account.py
apps/assets/serializers/asset.py
+1
-1
apps/assets/serializers/asset.py
apps/assets/tasks/account_connectivity.py
+1
-0
apps/assets/tasks/account_connectivity.py
with
7 additions
and
2 deletions
+7
-2
apps/assets/models/authbook.py
+
0
-
1
View file @
c0560ad3
...
...
@@ -27,7 +27,6 @@ class AuthBook(BaseUser, AbsConnectivity):
def
__init__
(
self
,
*
args
,
**
kwargs
):
super
().
__init__
(
*
args
,
**
kwargs
)
self
.
auth_snapshot
=
{}
self
.
load_auth
()
def
get_or_systemuser_attr
(
self
,
attr
):
val
=
getattr
(
self
,
attr
,
None
)
...
...
This diff is collapsed.
Click to expand it.
apps/assets/models/user.py
+
1
-
0
View file @
c0560ad3
...
...
@@ -141,6 +141,7 @@ class AuthMixin:
else
:
authbooks
.
sort
(
key
=
lambda
x
:
1
if
x
.
username
==
username
else
0
,
reverse
=
True
)
authbook
=
authbooks
[
0
]
authbook
.
load_auth
()
self
.
password
=
authbook
.
password
self
.
private_key
=
authbook
.
private_key
self
.
public_key
=
authbook
.
public_key
...
...
This diff is collapsed.
Click to expand it.
apps/assets/serializers/account.py
+
4
-
0
View file @
c0560ad3
...
...
@@ -32,6 +32,10 @@ class AccountSerializer(AuthSerializerMixin, BulkOrgResourceModelSerializer):
queryset
=
queryset
.
prefetch_related
(
'systemuser'
,
'asset'
)
return
queryset
def
to_representation
(
self
,
instance
):
instance
.
load_auth
()
return
super
().
to_representation
(
instance
)
class
AccountSecretSerializer
(
AccountSerializer
):
class
Meta
(
AccountSerializer
.
Meta
):
...
...
This diff is collapsed.
Click to expand it.
apps/assets/serializers/asset.py
+
1
-
1
View file @
c0560ad3
...
...
@@ -95,7 +95,7 @@ class AssetSerializer(BulkOrgResourceModelSerializer):
'port'
:
{
'write_only'
:
True
},
'hardware_info'
:
{
'label'
:
_
(
'Hardware info'
)},
'org_name'
:
{
'label'
:
_
(
'Org name'
)},
'admin_user_display'
:
{
'label'
,
_
(
'Admin user display'
)}
'admin_user_display'
:
{
'label'
:
_
(
'Admin user display'
)}
}
def
get_fields
(
self
):
...
...
This diff is collapsed.
Click to expand it.
apps/assets/tasks/account_connectivity.py
+
1
-
0
View file @
c0560ad3
...
...
@@ -81,6 +81,7 @@ def test_account_connectivity_util(account, task_name):
if
not
check_asset_can_run_ansible
(
account
.
asset
):
return
account
.
load_auth
()
try
:
raw
,
summary
=
test_user_connectivity
(
task_name
=
task_name
,
asset
=
account
.
asset
,
...
...
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