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
3ac35816
Commit
3ac35816
authored
Jul 15, 2019
by
ibuler
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of github.com:jumpserver/jumpserver into dev
parents
dfcf0995
13ca70b3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
2 deletions
+28
-2
asset_permission_detail.html
apps/perms/templates/perms/asset_permission_detail.html
+1
-1
remote_app_permission_create_update.html
.../templates/perms/remote_app_permission_create_update.html
+24
-0
remote_app_permission.py
apps/perms/views/remote_app_permission.py
+3
-1
No files found.
apps/perms/templates/perms/asset_permission_detail.html
View file @
3ac35816
...
...
@@ -68,7 +68,7 @@
</tr>
<tr>
<td>
{% trans 'User group count' %}:
</td>
<td><b>
{{ object.users.count }}
</b></td>
<td><b>
{{ object.user
_group
s.count }}
</b></td>
</tr>
<tr>
<td>
{% trans 'Asset count' %}:
</td>
...
...
apps/perms/templates/perms/remote_app_permission_create_update.html
View file @
3ac35816
...
...
@@ -116,5 +116,28 @@ $(document).ready(function () {
$
(
'#date_start'
).
daterangepicker
(
dateOptions
);
$
(
'#date_expired'
).
daterangepicker
(
dateOptions
);
})
.
on
(
"submit"
,
"form"
,
function
(
evt
)
{
evt
.
preventDefault
();
var
form
=
$
(
"form"
);
var
data
=
form
.
serializeObject
();
var
method
=
"POST"
;
var
the_url
=
'{% url "api-perms:remote-app-permission-list" %}'
;
var
redirect_to
=
'{% url "perms:remote-app-permission-list" %}'
;
{
%
if
type
==
"update"
%
}
the_url
=
'{% url "api-perms:remote-app-permission-detail" pk=object.id %}'
;
method
=
"PUT"
;
{
%
endif
%
}
objectAttrsIsList
(
data
,
[
'users'
,
'user_groups'
,
'remote_apps'
]);
objectAttrsIsDatetime
(
data
,
[
'date_expired'
,
'date_start'
]);
objectAttrsIsBool
(
data
,
[
'is_active'
]);
var
props
=
{
url
:
the_url
,
data
:
data
,
method
:
method
,
form
:
form
,
redirect_to
:
redirect_to
};
formSubmit
(
props
);
})
</script>
{% endblock %}
\ No newline at end of file
apps/perms/views/remote_app_permission.py
View file @
3ac35816
...
...
@@ -48,6 +48,7 @@ class RemoteAppPermissionCreateView(PermissionsMixin, CreateView):
context
=
{
'app'
:
_
(
'Perms'
),
'action'
:
_
(
'Create RemoteApp permission'
),
'type'
:
'create'
}
kwargs
.
update
(
context
)
return
super
()
.
get_context_data
(
**
kwargs
)
...
...
@@ -63,7 +64,8 @@ class RemoteAppPermissionUpdateView(PermissionsMixin, UpdateView):
def
get_context_data
(
self
,
**
kwargs
):
context
=
{
'app'
:
_
(
'Perms'
),
'action'
:
_
(
'Update RemoteApp permission'
)
'action'
:
_
(
'Update RemoteApp permission'
),
'type'
:
'update'
}
kwargs
.
update
(
context
)
return
super
()
.
get_context_data
(
**
kwargs
)
...
...
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