Commit dfe79e0e by Kálmán Viktor

dashboard: set acl level for template creation

parent f42dd1df
...@@ -836,13 +836,13 @@ class TemplateChoose(TemplateView): ...@@ -836,13 +836,13 @@ class TemplateChoose(TemplateView):
def get_context_data(self, *args, **kwargs): def get_context_data(self, *args, **kwargs):
context = super(TemplateChoose, self).get_context_data(*args, **kwargs) context = super(TemplateChoose, self).get_context_data(*args, **kwargs)
templates = InstanceTemplate.get_objects_with_level("operator", templates = InstanceTemplate.get_objects_with_level("user",
self.request.user) self.request.user)
context.update({ context.update({
'box_title': _('Choose template'), 'box_title': _('Choose template'),
'ajax_title': False, 'ajax_title': False,
'template': "dashboard/_template-choose.html", 'template': "dashboard/_template-choose.html",
'templates': templates.all(), # TODO acl? 'templates': templates.all(),
}) })
return context return context
......
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