Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gelencsér Szabolcs
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
69cf4530
authored
Oct 27, 2014
by
Guba Sándor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
views/node: add get function to properly return 403 on unathorized
access
parent
8316fe03
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletions
+4
-1
circle/dashboard/views/node.py
+4
-1
No files found.
circle/dashboard/views/node.py
View file @
69cf4530
...
@@ -82,9 +82,12 @@ class NodeDetailView(LoginRequiredMixin,
...
@@ -82,9 +82,12 @@ class NodeDetailView(LoginRequiredMixin,
form
=
None
form
=
None
form_class
=
TraitForm
form_class
=
TraitForm
def
get
_context_data
(
self
,
form
=
None
,
**
kwargs
):
def
get
(
self
,
*
args
,
**
kwargs
):
if
not
self
.
request
.
user
.
has_perm
(
'vm.view_statistics'
):
if
not
self
.
request
.
user
.
has_perm
(
'vm.view_statistics'
):
raise
PermissionDenied
()
raise
PermissionDenied
()
return
super
(
NodeDetailView
,
self
)
.
get
(
*
args
,
**
kwargs
)
def
get_context_data
(
self
,
form
=
None
,
**
kwargs
):
if
form
is
None
:
if
form
is
None
:
form
=
self
.
form_class
()
form
=
self
.
form_class
()
context
=
super
(
NodeDetailView
,
self
)
.
get_context_data
(
**
kwargs
)
context
=
super
(
NodeDetailView
,
self
)
.
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