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
A prog2-höz tartozó friss repo anyagok itt elérhetőek:
https://git.iit.bme.hu/
Commit
071afcdd
authored
Aug 15, 2014
by
Őry Máté
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: show less templates for superusers
parent
d47bbafa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
circle/dashboard/views.py
+3
-3
No files found.
circle/dashboard/views.py
View file @
071afcdd
...
@@ -225,7 +225,7 @@ class IndexView(LoginRequiredMixin, TemplateView):
...
@@ -225,7 +225,7 @@ class IndexView(LoginRequiredMixin, TemplateView):
# template
# template
if
user
.
has_perm
(
'vm.create_template'
):
if
user
.
has_perm
(
'vm.create_template'
):
context
[
'templates'
]
=
InstanceTemplate
.
get_objects_with_level
(
context
[
'templates'
]
=
InstanceTemplate
.
get_objects_with_level
(
'operator'
,
user
)
.
all
()[:
5
]
'operator'
,
user
,
disregard_superuser
=
True
)
.
all
()[:
5
]
# toplist
# toplist
if
settings
.
STORE_URL
:
if
settings
.
STORE_URL
:
...
@@ -1844,8 +1844,8 @@ class VmCreate(LoginRequiredMixin, TemplateView):
...
@@ -1844,8 +1844,8 @@ class VmCreate(LoginRequiredMixin, TemplateView):
form_error
=
form
is
not
None
form_error
=
form
is
not
None
template
=
(
form
.
template
.
pk
if
form_error
template
=
(
form
.
template
.
pk
if
form_error
else
request
.
GET
.
get
(
"template"
))
else
request
.
GET
.
get
(
"template"
))
templates
=
InstanceTemplate
.
get_objects_with_level
(
'user'
,
templates
=
InstanceTemplate
.
get_objects_with_level
(
request
.
user
)
'user'
,
request
.
user
,
disregard_superuser
=
True
)
if
form
is
None
and
template
:
if
form
is
None
and
template
:
form
=
self
.
form_class
(
user
=
request
.
user
,
form
=
self
.
form_class
(
user
=
request
.
user
,
template
=
templates
.
get
(
pk
=
template
))
template
=
templates
.
get
(
pk
=
template
))
...
...
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