Allow fileRules for root content.json

This commit is contained in:
Ivanq 2017-06-13 11:36:38 +03:00
parent 742c2fe684
commit 67395b5e47

View file

@ -352,6 +352,12 @@ class ContentManager(object):
if not file_info:
return False # File not found
inner_path = file_info["content_inner_path"]
if inner_path == "content.json": # Root content.json
rules = {}
rules["signers"] = self.getValidSigners(inner_path, content)
return rules
dirs = inner_path.split("/") # Parent dirs of content.json
inner_path_parts = [dirs.pop()] # Filename relative to content.json
inner_path_parts.insert(0, dirs.pop()) # Dont check in self dir