@@ -39,6 +39,8 @@ Showable {
39 readonly property bool active: required || hasLockedApp
39 readonly property bool active: required || hasLockedApp
40 readonly property bool fullyShown: loader.item ? loader.item.fullyShown : false
40 readonly property bool fullyShown: loader.item ? loader.item.fullyShown : false
42+ property bool allowFingerprint: true
42 // True when the greeter is waiting for PAM or other setup process
44 // True when the greeter is waiting for PAM or other setup process
43 readonly property alias waiting: d.waiting
45 readonly property alias waiting: d.waiting
@@ -126,9 +128,9 @@ Showable {
126 property int currentIndex
128 property int currentIndex
127 property bool waiting
129 property bool waiting
128 property bool isLockscreen // true when we are locking an active session, rather than first user login
130 property bool isLockscreen // true when we are locking an active session, rather than first user login
129− readonly property bool allowFingerprint: isLockscreen &&
131+ readonly property bool secureFingerprint: isLockscreen &&
130− AccountsService.failedFingerprintLogins <
132+ AccountsService.failedFingerprintLogins <
131− root.failedFingerprintLoginsDisableAttempts
133+ root.failedFingerprintLoginsDisableAttempts
132 readonly property bool alphanumeric: AccountsService.passwordDisplayHint === AccountsService.Keyboard
134 readonly property bool alphanumeric: AccountsService.passwordDisplayHint === AccountsService.Keyboard
134 // We want 'launcherOffset' to animate down to zero. But not to animate
136 // We want 'launcherOffset' to animate down to zero. But not to animate
@@ -498,6 +500,7 @@ Showable {
499 property var operation: null
501 property var operation: null
500 readonly property bool idEnabled: root.active &&
502 readonly property bool idEnabled: root.active &&
503+ root.allowFingerprint &&
501 Powerd.status === Powerd.On &&
504 Powerd.status === Powerd.On &&
502 Biometryd.available &&
505 Biometryd.available &&
503 AccountsService.enableFingerprintIdentification
506 AccountsService.enableFingerprintIdentification
@@ -522,13 +525,13 @@ Showable {
522 function failOperation(reason) {
525 function failOperation(reason) {
523 console.log("Failed to identify user by fingerprint:", reason);
526 console.log("Failed to identify user by fingerprint:", reason);
524 restartOperation();
527 restartOperation();
525− if (!d.allowFingerprint) {
528+ if (!d.secureFingerprint) {
526 d.startUnlock(false /* toTheRight */);
529 d.startUnlock(false /* toTheRight */);
528 if (loader.item) {
531 if (loader.item) {
529− var msg = d.allowFingerprint ? i18n.tr("Try again") :
532+ var msg = d.secureFingerprint ? i18n.tr("Try again") :
530− d.alphanumeric ? i18n.tr("Use passphrase") :
533+ d.alphanumeric ? i18n.tr("Use passphrase") :
531− i18n.tr("Use passcode");
534+ i18n.tr("Use passcode");
532 loader.item.showErrorMessage(msg);
535 loader.item.showErrorMessage(msg);
@@ -538,7 +541,7 @@ Showable {
538 onIdEnabledChanged: restartOperation()
541 onIdEnabledChanged: restartOperation()
540 onSucceeded: {
543 onSucceeded: {
541− if (!d.allowFingerprint) {
544+ if (!d.secureFingerprint) {
542 failOperation("too many failures");
545 failOperation("too many failures");
@@ -554,7 +557,7 @@ Showable {
554 root.forcedUnlock = true;
557 root.forcedUnlock = true;
556 onFailed: {
559 onFailed: {
557− if (!d.allowFingerprint) {
560+ if (!d.secureFingerprint) {
558 failOperation("too many failures");
561 failOperation("too many failures");
560 AccountsService.failedFingerprintLogins++;
563 AccountsService.failedFingerprintLogins++;