Make sure users always have permission to access top-level templates

This commit is contained in:
Alexey Bezhan
2019-03-19 15:58:18 +00:00
parent e6d7f7ebeb
commit af2eb0555d

View File

@@ -155,6 +155,10 @@ class User(UserMixin):
if self.platform_admin:
return True
# Top-level templates are always visible
if template_folder is None:
return True
return self.id in template_folder.get("users_with_permission", [])
def belongs_to_service(self, service_id):