Thanks for the feedback. Suggestions incorporated and forbidden report links handled in rjollos.git:t11166.3. To be consistent, we'd want to utilize the forbidden
class for other TracLinks, and add title
attributes for missing
and forbidden
reports.
It would be nice to be able to do permissions-based testing in the wiki syntax tests (wikisyntax.py
). For the report TracLinks, we'd even like the test to be more complex than just granting / revoking REPORT_VIEW
, because that wouldn't reveal if for example the permissions check has been implemented as 'REPORT_VIEW' in formatter.req.perm
rather than 'REPORT_VIEW' in formatter.req.perm('report', id)
.
For functional tests I've used FunctionalTestEnvironment.enable_authz_permpolicy
, however I think for the wiki syntax tests it would be nice to avoid having a dependency on tracopt.perm.authz_policy
and ConfigObj
. I'm not entirely sure yet, but maybe the key is to extend MockPerm
to allow some specific policies to be specified, such as {'report:3': '!REPORT_VIEW'}
.
Any ideas or suggestions on this "Mock permission" issue?