check pin login
This commit is contained in:
@@ -82,6 +82,17 @@ class MainModel extends ChangeNotifier {
|
||||
return this.user != null && this.user!.hasAdmin();
|
||||
}
|
||||
|
||||
bool hasPinLogin() {
|
||||
return user != null && user!.hasPinLogin();
|
||||
}
|
||||
|
||||
bool allowPin() {
|
||||
return user != null &&
|
||||
user!.privileges.isNotEmpty &&
|
||||
user!.privileges.length == 1 &&
|
||||
hasPinLogin();
|
||||
}
|
||||
|
||||
// userListener should never be closed
|
||||
StreamSubscription<User?>? userListener;
|
||||
_init() async {
|
||||
|
||||
Reference in New Issue
Block a user