Hide current folder templates if user doesn't have a folder permission

TemplateList gets a list of templates in a current folder separately,
so we need to make sure `service.get_templates` checks for the
appropriate user permission
This commit is contained in:
Alexey Bezhan
2019-03-07 11:05:44 +00:00
committed by Pea Tyczynska
parent 70e6732255
commit 3d401ce856
2 changed files with 7 additions and 2 deletions

View File

@@ -40,7 +40,7 @@ class TemplateList():
yield sub_item
for item in self.service.get_templates(
template_type, template_folder_id
template_type, template_folder_id, user_id
):
yield TemplateListTemplate(
item,