mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
fix(mobile): Do not show version announcement if user is not admin. (#3703)
This commit is contained in:
parent
bc66b1a556
commit
19bbdebdf7
2 changed files with 14 additions and 0 deletions
7
mobile/lib/shared/providers/admin_provider.dart
Normal file
7
mobile/lib/shared/providers/admin_provider.dart
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:immich_mobile/shared/providers/user.provider.dart';
|
||||
|
||||
final isAdminProvider = Provider<bool>((ref) {
|
||||
final currentUser = ref.watch(currentUserProvider);
|
||||
return currentUser?.isAdmin ?? false; // Default to non-admin if no user
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue