No need for card presence during removal
This commit is contained in:
parent
17b5cdf672
commit
2cfd6f0860
@ -45,9 +45,10 @@ enrolled card).
|
||||
"Check Card" validates the card inserted and indicates if it would
|
||||
be accepted or not.
|
||||
|
||||
Use "Remove Card #N" is remove cards from the system. When the last
|
||||
card is removed, the feature is disabled and no card will be required
|
||||
for login.
|
||||
Use "Remove Card #N" is remove cards from the approved list. When
|
||||
the last card is removed, the feature is disabled and no card will
|
||||
be required for login. Access to the card in question is not required
|
||||
to remove it.
|
||||
|
||||
## During Login
|
||||
|
||||
|
||||
@ -271,7 +271,7 @@ class MicroSD2FA(PassphraseSaver):
|
||||
|
||||
async def remove(self, nonce):
|
||||
# remove indicated nonce from records
|
||||
# - delete file if present and found, but ok if missing
|
||||
# - doesn't delete file, since might not have card anymore and useless w/o nonce
|
||||
from glob import dis, settings
|
||||
|
||||
v = self.get_nonces()
|
||||
@ -282,13 +282,6 @@ class MicroSD2FA(PassphraseSaver):
|
||||
else:
|
||||
settings.set('sd2fa', v2)
|
||||
settings.save()
|
||||
|
||||
try:
|
||||
with CardSlot() as card:
|
||||
fn = self.filename(card)
|
||||
os.remove(fn)
|
||||
except:
|
||||
pass
|
||||
|
||||
@classmethod
|
||||
def menu(cls):
|
||||
|
||||
Loading…
Reference in New Issue
Block a user