feat(role): 根据role判断用户的权限

This commit is contained in:
sophie committed 2026-09-18 09:21:04 +08:00
1 parent 80d78130f8
commit a24bd94d43
93 files changed
+4472 -387

No files matched your search

@@ -721,8 +721,6 @@ def can_force_create_shipping_duplicate(user: User | None) -> bool:
"""判断用户是否可强制新建重复发货通知。"""
if user is None:
return False
if str(getattr(user, 'role', '') or '') == 'admin':
return True
return bool(user.has_feature_permission('shipping_notice_force_create'))