Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gelencsér Szabolcs
/
circlestack
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
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):
# template
if
user
.
has_perm
(
'vm.create_template'
):
context
[
'templates'
]
=
InstanceTemplate
.
get_objects_with_level
(
'operator'
,
user
)
.
all
()[:
5
]
'operator'
,
user
,
disregard_superuser
=
True
)
.
all
()[:
5
]
# toplist
if
settings
.
STORE_URL
:
...
...
@@ -1844,8 +1844,8 @@ class VmCreate(LoginRequiredMixin, TemplateView):
form_error
=
form
is
not
None
template
=
(
form
.
template
.
pk
if
form_error
else
request
.
GET
.
get
(
"template"
))
templates
=
InstanceTemplate
.
get_objects_with_level
(
'user'
,
request
.
user
)
templates
=
InstanceTemplate
.
get_objects_with_level
(
'user'
,
request
.
user
,
disregard_superuser
=
True
)
if
form
is
None
and
template
:
form
=
self
.
form_class
(
user
=
request
.
user
,
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