Skip to content

Commit

Permalink
[TEST] mis_builder: prove non-admins cannot generate reports
Browse files Browse the repository at this point in the history
Normal users get `AccessError` when trying to preview or print reports.

Tests OCA#415.

@moduon MT-1527
  • Loading branch information
yajo committed Nov 9, 2022
1 parent 4f354aa commit d2072bb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mis_builder/tests/test_mis_report_instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -586,3 +586,7 @@ def test_raise_when_unknown_kpi_value_type(self):
def test_raise_when_wrong_tuple_length_with_subkpis(self):
with self.assertRaises(SubKPITupleLengthError):
self.report_instance_3.compute()

def test_unprivileged(self):
test_user = common.new_test_user(self.env, "mis_you")
self.report_instance.with_user(test_user).compute()

0 comments on commit d2072bb

Please sign in to comment.