chore: release client-v1.0.69
Deploy Client / build-client-web (push) Successful in 40s
Deploy Client / build-macos (push) Successful in 2m13s
Deploy Client / build-android (push) Successful in 1m6s
Deploy Client / build-windows (push) Successful in 1m56s
Deploy Client / build-ios (push) Successful in 2m41s
Deploy Client / release-deploy-client (push) Successful in 1m24s

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YZ4DskSRKsSiheQonFtQvx
This commit is contained in:
wangjia
2026-06-21 19:09:47 +08:00
parent 7a78448a25
commit 381588826c
10 changed files with 147 additions and 11 deletions
+7
View File
@@ -194,3 +194,10 @@ final isReadonlyProvider = Provider<bool>((ref) {
final role = ref.watch(authStateProvider.select((s) => s.user?.role));
return role == 'readonly';
});
/// 当前登录用户是否为管理员(role == 'admin')。
/// 用于「撤回审核中单据」等仅管理员可用的操作;后端 middleware.AdminOnly() 兜底。
final isAdminProvider = Provider<bool>((ref) {
final role = ref.watch(authStateProvider.select((s) => s.user?.role));
return role == 'admin';
});