Improve document comment app

Add keyword arguments to URL definitions and reverse resolution.
Raise HTTP error 404 instead of 403 to reduce the information
divulged. Add view tests.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
This commit is contained in:
Roberto Rosario
2018-12-30 02:24:25 -04:00
parent 82651ff32c
commit cd9d51db9e
8 changed files with 203 additions and 78 deletions

View File

@@ -53,6 +53,10 @@ class DocumentCommentsApp(MayanAppConfig):
)
)
ModelPermission.register_inheritance(
model=Comment, related='document',
)
SourceColumn(source=Comment, label=_('Date'), attribute='submit_date')
SourceColumn(
source=Comment, label=_('User'),