Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gyuricska Milán
/
cloud
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
fa1e0e22
authored
Jan 09, 2014
by
Őry Máté
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: add permissions
parent
c529f9c6
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletions
+9
-1
circle/dashboard/templates/dashboard/index.html
+6
-0
circle/vm/models/instance.py
+3
-1
No files found.
circle/dashboard/templates/dashboard/index.html
View file @
fa1e0e22
...
@@ -7,9 +7,11 @@
...
@@ -7,9 +7,11 @@
<div
class=
"body-content dashboard-index"
>
<div
class=
"body-content dashboard-index"
>
<div
class=
"row"
>
<div
class=
"row"
>
{% if perms.vm %}
<div
class=
"col-lg-4 col-md-6"
>
<div
class=
"col-lg-4 col-md-6"
>
{% include "dashboard/index-vm.html" %}
{% include "dashboard/index-vm.html" %}
</div>
</div>
{% endif %}
<div
class=
"col-lg-4 col-md-6"
>
<div
class=
"col-lg-4 col-md-6"
>
{% include "dashboard/index-groups.html" %}
{% include "dashboard/index-groups.html" %}
...
@@ -19,13 +21,17 @@
...
@@ -19,13 +21,17 @@
{% include "dashboard/index-files.html" %}
{% include "dashboard/index-files.html" %}
</div>
</div>
{% if perms.vm.create_template %}
<div
class=
"col-lg-4 col-md-6"
>
<div
class=
"col-lg-4 col-md-6"
>
{% include "dashboard/index-templates.html" %}
{% include "dashboard/index-templates.html" %}
</div>
</div>
{% endif %}
{% if user.is_superuser %}
<div
class=
"col-lg-4 col-md-6"
>
<div
class=
"col-lg-4 col-md-6"
>
{% include "dashboard/index-nodes.html" %}
{% include "dashboard/index-nodes.html" %}
</div>
</div>
{% endif %}
</div>
</div>
</div>
</div>
{% endblock %}
{% endblock %}
...
...
circle/vm/models/instance.py
View file @
fa1e0e22
...
@@ -117,7 +117,9 @@ class InstanceTemplate(VirtualMachineDescModel, TimeStampedModel):
...
@@ -117,7 +117,9 @@ class InstanceTemplate(VirtualMachineDescModel, TimeStampedModel):
app_label
=
'vm'
app_label
=
'vm'
db_table
=
'vm_instancetemplate'
db_table
=
'vm_instancetemplate'
ordering
=
[
'name'
,
]
ordering
=
[
'name'
,
]
permissions
=
()
permissions
=
(
(
'create_template'
,
_
(
'Can create an instance template.'
)),
)
verbose_name
=
_
(
'template'
)
verbose_name
=
_
(
'template'
)
verbose_name_plural
=
_
(
'templates'
)
verbose_name_plural
=
_
(
'templates'
)
...
...
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