mirror of
https://github.com/quexten/goldwarden.git
synced 2025-02-03 05:22:09 +01:00
Grant other sessions while pin session is active
This commit is contained in:
parent
606dd176ef
commit
9ac1d8100a
@ -86,19 +86,21 @@ func GetPermission(sessionType SessionType, ctx sockets.CallingContext, config *
|
|||||||
if sessionStore.verifySession(ctx, sessionType) {
|
if sessionStore.verifySession(ctx, sessionType) {
|
||||||
log.Info("Permission granted from cached session")
|
log.Info("Permission granted from cached session")
|
||||||
} else {
|
} else {
|
||||||
if biometrics.BiometricsWorking() {
|
if !sessionStore.verifySession(ctx, Pin) {
|
||||||
biometricsApproval := biometrics.CheckBiometrics(biometricsApprovalType)
|
if biometrics.BiometricsWorking() {
|
||||||
if !biometricsApproval {
|
biometricsApproval := biometrics.CheckBiometrics(biometricsApprovalType)
|
||||||
return false, nil
|
if !biometricsApproval {
|
||||||
}
|
return false, nil
|
||||||
} else {
|
}
|
||||||
log.Warn("Biometrics is not available, asking for pin")
|
} else {
|
||||||
pin, err := pinentry.GetPassword("Enter PIN", "Biometrics is not available. Enter your pin to authorize this action. "+message)
|
log.Warn("Biometrics is not available, asking for pin")
|
||||||
if err != nil {
|
pin, err := pinentry.GetPassword("Enter PIN", "Biometrics is not available. Enter your pin to authorize this action. "+message)
|
||||||
return false, err
|
if err != nil {
|
||||||
}
|
return false, err
|
||||||
if !config.VerifyPin(pin) {
|
}
|
||||||
return false, nil
|
if !config.VerifyPin(pin) {
|
||||||
|
return false, nil
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user