Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
J
jumpserver
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ops
jumpserver
Commits
c163427d
Unverified
Commit
c163427d
authored
Oct 29, 2019
by
BaiJiangJie
Committed by
GitHub
Oct 29, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3397 from jumpserver/dev_bai
Dev bai
parents
c29381e6
c7ecfd79
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
1 deletion
+6
-1
signals_handlers.py
apps/authentication/signals_handlers.py
+1
-1
user_remote_app_permission.py
apps/perms/api/user_remote_app_permission.py
+2
-0
command.py
apps/terminal/api/command.py
+3
-0
No files found.
apps/authentication/signals_handlers.py
View file @
c163427d
...
@@ -47,7 +47,7 @@ def on_openid_login_success(sender, user=None, request=None, **kwargs):
...
@@ -47,7 +47,7 @@ def on_openid_login_success(sender, user=None, request=None, **kwargs):
@receiver
(
populate_user
)
@receiver
(
populate_user
)
def
on_ldap_create_user
(
sender
,
user
,
ldap_user
,
**
kwargs
):
def
on_ldap_create_user
(
sender
,
user
,
ldap_user
,
**
kwargs
):
if
user
and
user
.
name
!=
'admin'
:
if
user
and
user
.
user
name
!=
'admin'
:
user
.
source
=
user
.
SOURCE_LDAP
user
.
source
=
user
.
SOURCE_LDAP
user
.
save
()
user
.
save
()
...
...
apps/perms/api/user_remote_app_permission.py
View file @
c163427d
...
@@ -53,6 +53,8 @@ class UserGrantedRemoteAppsAsTreeApi(UserGrantedRemoteAppsApi):
...
@@ -53,6 +53,8 @@ class UserGrantedRemoteAppsAsTreeApi(UserGrantedRemoteAppsApi):
permission_classes
=
(
IsOrgAdminOrAppUser
,)
permission_classes
=
(
IsOrgAdminOrAppUser
,)
def
get_serializer
(
self
,
remote_apps
=
None
,
*
args
,
**
kwargs
):
def
get_serializer
(
self
,
remote_apps
=
None
,
*
args
,
**
kwargs
):
if
remote_apps
is
None
:
remote_apps
=
[]
only_remote_app
=
self
.
request
.
query_params
.
get
(
'only'
,
'0'
)
==
'1'
only_remote_app
=
self
.
request
.
query_params
.
get
(
'only'
,
'0'
)
==
'1'
tree_root
=
None
tree_root
=
None
data
=
[]
data
=
[]
...
...
apps/terminal/api/command.py
View file @
c163427d
...
@@ -29,6 +29,9 @@ class CommandQueryMixin:
...
@@ -29,6 +29,9 @@ class CommandQueryMixin:
default_days_ago
=
5
default_days_ago
=
5
def
get_queryset
(
self
):
def
get_queryset
(
self
):
# 解决访问 /docs/ 问题
if
hasattr
(
self
,
'swagger_fake_view'
):
return
self
.
command_store
.
model
.
objects
.
none
()
date_from
,
date_to
=
self
.
get_date_range
()
date_from
,
date_to
=
self
.
get_date_range
()
q
=
self
.
request
.
query_params
q
=
self
.
request
.
query_params
multi_command_storage
=
get_multi_command_storage
()
multi_command_storage
=
get_multi_command_storage
()
...
...
Write
Preview
Markdown
is supported
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