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
ff62968b
Commit
ff62968b
authored
5 years ago
by
BaiJiangjie
Committed by
BaiJiangJie
5 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Update] 登录日志导出按照组织进行过滤
parent
4e1e6004
master
gengmei
wph
No related merge requests found
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
models.py
apps/audits/models.py
+4
-0
No files found.
apps/audits/models.py
View file @
ff62968b
...
...
@@ -6,6 +6,7 @@ from django.utils.translation import ugettext_lazy as _
from
django.utils
import
timezone
from
orgs.mixins.models
import
OrgModelMixin
from
orgs.utils
import
current_org
__all__
=
[
'FTPLog'
,
'OperateLog'
,
'PasswordChangeLog'
,
'UserLoginLog'
,
...
...
@@ -104,6 +105,9 @@ class UserLoginLog(models.Model):
Q
(
city__contains
=
keyword
)
|
Q
(
username__contains
=
keyword
)
)
if
not
current_org
.
is_root
():
username_list
=
current_org
.
get_org_members
()
.
values_list
(
'username'
,
flat
=
True
)
login_logs
=
login_logs
.
filter
(
username__in
=
username_list
)
return
login_logs
class
Meta
:
...
...
This diff is collapsed.
Click to expand it.
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