Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
94
Merge Requests
10
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
19235ec6
authored
Mar 06, 2014
by
Kálmán Viktor
3
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: enable raw data in templates only for superusers
parent
7df6dd21
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletions
+4
-1
circle/dashboard/forms.py
+4
-1
No files found.
circle/dashboard/forms.py
View file @
19235ec6
...
@@ -512,6 +512,9 @@ class TemplateForm(forms.ModelForm):
...
@@ -512,6 +512,9 @@ class TemplateForm(forms.ModelForm):
@property
@property
def
helper
(
self
):
def
helper
(
self
):
kwargs_raw_data
=
{}
if
not
self
.
user
.
is_superuser
:
kwargs_raw_data
[
'readonly'
]
=
None
helper
=
FormHelper
()
helper
=
FormHelper
()
helper
.
layout
=
Layout
(
helper
.
layout
=
Layout
(
Field
(
"name"
),
Field
(
"name"
),
...
@@ -563,7 +566,7 @@ class TemplateForm(forms.ModelForm):
...
@@ -563,7 +566,7 @@ class TemplateForm(forms.ModelForm):
"stuff"
,
"stuff"
,
Field
(
'access_method'
),
Field
(
'access_method'
),
Field
(
'boot_menu'
),
Field
(
'boot_menu'
),
Field
(
'raw_data'
),
Field
(
'raw_data'
,
**
kwargs_raw_data
),
Field
(
'req_traits'
),
Field
(
'req_traits'
),
Field
(
'description'
),
Field
(
'description'
),
Field
(
"parent"
,
type
=
"hidden"
),
Field
(
"parent"
,
type
=
"hidden"
),
...
...
Kálmán Viktor
@kviktor
mentioned in issue
#94 (closed)
Mar 06, 2014
mentioned in issue
#94 (closed)
mentioned in issue #94
Toggle commit list
Kálmán Viktor
@kviktor
mentioned in issue
#94 (closed)
Mar 06, 2014
mentioned in issue
#94 (closed)
mentioned in issue #94
Toggle commit list
Kálmán Viktor
@kviktor
mentioned in issue
#94 (closed)
Mar 06, 2014
mentioned in issue
#94 (closed)
mentioned in issue #94
Toggle commit list
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