mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-04-20 01:00:43 -04:00
Fix missing New template / folder buttons on Templates root page
User folder permission check should recognize both `None` folder and folder with a `None` id as template root.
This commit is contained in:
@@ -156,7 +156,7 @@ class User(UserMixin):
|
||||
return True
|
||||
|
||||
# Top-level templates are always visible
|
||||
if template_folder is None:
|
||||
if template_folder is None or template_folder['id'] is None:
|
||||
return True
|
||||
|
||||
return self.id in template_folder.get("users_with_permission", [])
|
||||
|
||||
Reference in New Issue
Block a user