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
32d12b7f
Commit
32d12b7f
authored
Nov 16, 2016
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update user group asset permission
parent
99c36f2a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
views.py
apps/audits/views.py
+4
-2
user_group_asset_permission.html
apps/users/templates/users/user_group_asset_permission.html
+1
-1
No files found.
apps/audits/views.py
View file @
32d12b7f
...
@@ -14,8 +14,9 @@ from .models import ProxyLog, CommandLog, LoginLog
...
@@ -14,8 +14,9 @@ from .models import ProxyLog, CommandLog, LoginLog
from
.hands
import
User
,
Asset
,
SystemUser
,
AdminUserRequiredMixin
from
.hands
import
User
,
Asset
,
SystemUser
,
AdminUserRequiredMixin
seven_days_ago_s
=
(
datetime
.
datetime
.
now
()
-
datetime
.
timedelta
(
7
))
.
strftime
(
'
%
m/
%
d/
%
Y'
)
date_now
=
timezone
.
localtime
(
timezone
.
now
())
now_s
=
datetime
.
datetime
.
now
()
.
strftime
(
'
%
m/
%
d/
%
Y'
)
now_s
=
date_now
.
strftime
(
'
%
m/
%
d/
%
Y'
)
seven_days_ago_s
=
(
date_now
-
timezone
.
timedelta
(
7
))
.
strftime
(
'
%
m/
%
d/
%
Y'
)
class
ProxyLogListView
(
AdminUserRequiredMixin
,
ListView
):
class
ProxyLogListView
(
AdminUserRequiredMixin
,
ListView
):
...
@@ -53,6 +54,7 @@ class ProxyLogListView(AdminUserRequiredMixin, ListView):
...
@@ -53,6 +54,7 @@ class ProxyLogListView(AdminUserRequiredMixin, ListView):
return
self
.
queryset
return
self
.
queryset
def
get_context_data
(
self
,
**
kwargs
):
def
get_context_data
(
self
,
**
kwargs
):
print
(
self
.
date_to_s
)
context
=
{
context
=
{
'app'
:
_
(
'Audits'
),
'app'
:
_
(
'Audits'
),
'action'
:
_
(
'Proxy log list'
),
'action'
:
_
(
'Proxy log list'
),
...
...
apps/users/templates/users/user_group_asset_permission.html
View file @
32d12b7f
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
<a
href=
"{% url 'users:user-group-asset-permission' pk=user_group.id %}"
class=
"text-center"
><i
class=
"fa fa-bar-chart-o"
></i>
{% trans 'Asset permission' %}
</a>
<a
href=
"{% url 'users:user-group-asset-permission' pk=user_group.id %}"
class=
"text-center"
><i
class=
"fa fa-bar-chart-o"
></i>
{% trans 'Asset permission' %}
</a>
</li>
</li>
<li>
<li>
<a
href=
"{% url 'users:user-granted-asset' pk=user_group.id %}"
class=
"text-center"
><i
class=
"fa fa-cubes"
></i>
{% trans 'Asset granted' %}
</a>
<a
href=
"{% url 'users:user-gr
oup-gr
anted-asset' pk=user_group.id %}"
class=
"text-center"
><i
class=
"fa fa-cubes"
></i>
{% trans 'Asset granted' %}
</a>
</li>
</li>
</ul>
</ul>
</div>
</div>
...
...
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