Changed the permission to the offset matcher so that editors can use it.

This commit is contained in:
2023-04-08 19:03:13 +08:00
parent 1218b224fc
commit df240472a4
3 changed files with 12 additions and 12 deletions

View File

@ -34,7 +34,7 @@ from accounting.report.utils.unapplied import get_accounts_with_unapplied
from accounting.report.utils.urls import unapplied_url
from accounting.utils.offset_matcher import OffsetMatcher
from accounting.utils.pagination import Pagination
from accounting.utils.permission import can_admin
from accounting.utils.permission import can_edit
class CSVRow(BaseCSVRow):
@ -158,7 +158,7 @@ class UnappliedOriginalLineItems(BaseReport):
= offset_matcher.unapplied
"""The line items."""
self.__is_mark_matches: bool \
= can_admin() and len(offset_matcher.unmatched_offsets) > 0
= can_edit() and len(offset_matcher.unmatched_offsets) > 0
"""Whether to mark the matched offsets."""
def csv(self) -> Response: