Add inherited permission check for the DocumentPageSearch model.

This and not the DocumentPage is the actual model return for page searches.

Signed-off-by: Michael Price <loneviking72@gmail.com>
This commit is contained in:
Michael Price
2018-03-01 18:40:12 -04:00
committed by Roberto Rosario
parent e3d400c70d
commit bc85c3be59
2 changed files with 58 additions and 0 deletions

View File

@@ -197,6 +197,9 @@ class DocumentsApp(MayanAppConfig):
ModelPermission.register_inheritance(
model=DocumentPage, related='document',
)
ModelPermission.register_inheritance(
model=DocumentPageResult, related='document_version__document',
)
ModelPermission.register_inheritance(
model=DocumentTypeFilename, related='document_type',
)