diff --git a/src/accounting/report/reports/unapplied.py b/src/accounting/report/reports/unapplied.py
index fa93c70..63fb4f0 100644
--- a/src/accounting/report/reports/unapplied.py
+++ b/src/accounting/report/reports/unapplied.py
@@ -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:
diff --git a/src/accounting/templates/accounting/include/nav.html b/src/accounting/templates/accounting/include/nav.html
index d5dd9f7..f4ee9d4 100644
--- a/src/accounting/templates/accounting/include/nav.html
+++ b/src/accounting/templates/accounting/include/nav.html
@@ -51,6 +51,12 @@ First written: 2023/1/26
{{ A_("Currencies") }}
+
+
+
+ {{ A_("Unmatched Offsets") }}
+
+
{% if accounting_can_admin() %}
@@ -58,12 +64,6 @@ First written: 2023/1/26
{{ A_("Settings") }}
-
-
-
- {{ A_("Unmatched Offsets") }}
-
-
{% endif %}
diff --git a/src/accounting/unmatched_offset/views.py b/src/accounting/unmatched_offset/views.py
index 01684ef..ea22eab 100644
--- a/src/accounting/unmatched_offset/views.py
+++ b/src/accounting/unmatched_offset/views.py
@@ -25,7 +25,7 @@ from accounting.models import JournalEntryLineItem, Account
from accounting.utils.cast import s
from accounting.utils.offset_matcher import OffsetMatcher
from accounting.utils.pagination import Pagination
-from accounting.utils.permission import has_permission, can_admin
+from accounting.utils.permission import has_permission, can_edit
from .queries import get_accounts_with_unmatched_offsets
bp: Blueprint = Blueprint("unmatched-offset", __name__)
@@ -33,7 +33,7 @@ bp: Blueprint = Blueprint("unmatched-offset", __name__)
@bp.get("", endpoint="dashboard")
-@has_permission(can_admin)
+@has_permission(can_edit)
def show_offset_dashboard() -> str:
"""Shows the dashboard about offsets.
@@ -44,7 +44,7 @@ def show_offset_dashboard() -> str:
@bp.get("", endpoint="list")
-@has_permission(can_admin)
+@has_permission(can_edit)
def show_unmatched_offsets(account: Account) -> str:
"""Shows the unmatched offsets in an account.
@@ -60,7 +60,7 @@ def show_unmatched_offsets(account: Account) -> str:
@bp.post("", endpoint="match")
-@has_permission(can_admin)
+@has_permission(can_edit)
def match_offsets(account: Account) -> redirect:
"""Matches the original line items with their offsets.