Perth-Artifactory / rfid-tools

RFID based access control for members
1 stars 1 forks source link

Implement basic access control #1

Closed Elwell closed 8 years ago

Elwell commented 8 years ago

This can be from a file / DB of known good cards as a stopgap until full LDAP implemented

Elwell commented 8 years ago

Done.

Reads from a csv file with (hex) card no, person and at the relevant point:

        if goodcards.has_key(card):
            syslog.syslog('ALLOWED ' + str(cardstr))
            print "ALLOWED: " + goodcards[card]
            unlock_door()
        else:
            syslog.syslog('DENIED ' + str(cardstr))
            print "DENIED - unknown card"