Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
94
Merge Requests
10
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
4de937ac
authored
Feb 20, 2013
by
Dányi Bence
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
webui: permission check for key management
parent
165539ab
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
2 deletions
+1
-2
one/views.py
+1
-2
No files found.
one/views.py
View file @
4de937ac
...
@@ -457,8 +457,7 @@ def key_add(request):
...
@@ -457,8 +457,7 @@ def key_add(request):
@require_POST
@require_POST
def
key_ajax_delete
(
request
):
def
key_ajax_delete
(
request
):
try
:
try
:
#TODO: permission check
key
=
get_object_or_404
(
SshKey
,
id
=
request
.
POST
[
'id'
],
user
=
request
.
user
)
key
=
get_object_or_404
(
SshKey
,
id
=
request
.
POST
[
'id'
])
key
.
delete
()
key
.
delete
()
except
:
except
:
messages
.
error
(
request
,
_
(
'Failed to delete public key'
))
messages
.
error
(
request
,
_
(
'Failed to delete public key'
))
...
...
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