Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Fukász Rómeó Ervin
/
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
f2ad812f
authored
Mar 09, 2014
by
Bach Dániel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: restrict lease views to superuser
parent
b0ff5771
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
circle/dashboard/views.py
+4
-2
No files found.
circle/dashboard/views.py
View file @
f2ad812f
...
...
@@ -1405,7 +1405,8 @@ class VmMassDelete(LoginRequiredMixin, View):
return
redirect
(
next
if
next
else
reverse_lazy
(
'dashboard.index'
))
class
LeaseCreate
(
SuccessMessageMixin
,
CreateView
):
class
LeaseCreate
(
LoginRequiredMixin
,
SuperuserRequiredMixin
,
SuccessMessageMixin
,
CreateView
):
model
=
Lease
form_class
=
LeaseForm
template_name
=
"dashboard/lease-create.html"
...
...
@@ -1415,7 +1416,8 @@ class LeaseCreate(SuccessMessageMixin, CreateView):
return
reverse_lazy
(
"dashboard.views.template-list"
)
class
LeaseDetail
(
LoginRequiredMixin
,
SuccessMessageMixin
,
UpdateView
):
class
LeaseDetail
(
LoginRequiredMixin
,
SuperuserRequiredMixin
,
SuccessMessageMixin
,
UpdateView
):
model
=
Lease
form_class
=
LeaseForm
template_name
=
"dashboard/lease-edit.html"
...
...
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