Commit 19235ec6 by Kálmán Viktor

dashboard: enable raw data in templates only for superusers

parent 7df6dd21
......@@ -512,6 +512,9 @@ class TemplateForm(forms.ModelForm):
@property
def helper(self):
kwargs_raw_data = {}
if not self.user.is_superuser:
kwargs_raw_data['readonly'] = None
helper = FormHelper()
helper.layout = Layout(
Field("name"),
......@@ -563,7 +566,7 @@ class TemplateForm(forms.ModelForm):
"stuff",
Field('access_method'),
Field('boot_menu'),
Field('raw_data'),
Field('raw_data', **kwargs_raw_data),
Field('req_traits'),
Field('description'),
Field("parent", type="hidden"),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment