summaryrefslogtreecommitdiffstats
path: root/account.py
Commit message (Collapse)AuthorAgeFilesLines
* account: only update password as admin when explicitly requestedMarian Sigler2012-09-261-7/+9
|
* added missing ou entryNico von Geyso2012-09-261-1/+1
|
* added InvalidPasswordError ExceptionNico von Geyso2012-09-261-1/+5
|
* account: fix delete()Marian Sigler2012-09-261-3/+2
|
* Merge branch 'master' of ssh://git.spline.de/account-webNico von Geyso2012-09-261-4/+5
|\ | | | | | | | | Conflicts: account.py
| * add get_by_uidMarian Sigler2012-09-261-4/+14
| |
* | added escape method and use it nearly everywhere. good old paranoiaNico von Geyso2012-09-261-27/+66
|/
* account.py: Fix find(); Add get_by_uid()Marian Sigler2012-09-261-1/+17
|
* add a Service() class to have more data about the servicesMarian Sigler2012-09-261-5/+11
|
* fixed password bug for register()Nico von Geyso2012-09-251-2/+2
|
* wildcards for find() are by default offNico von Geyso2012-09-251-6/+13
| | | | To use wildcards you have to use find(..., wildcard=True) otherwise the wildcard gets escaped.
* Merge branch 'master' of ssh://git.spline.de/account-webNico von Geyso2012-09-241-2/+2
|\
| * templates/_macros: move errors in own macroMarian Sigler2012-09-241-1/+1
| |
| * indentationMarian Sigler2012-09-241-1/+1
| |
* | use passwd_s for password changesNico von Geyso2012-09-241-16/+27
|/ | | | | with modify_s passwords will be saved in plain text (base64 encoded). To prevent this security issue we use passwd_s instead of modify_s.
* find() now uses dict instead of ldap search strNico von Geyso2012-09-231-7/+24
| | | | | | | examples: service.find() # find all users service.find_by_uid('test') # find users by uid service.find_by_mail('test@test.de') # find users by mail
* account: remove delete by string for the time beingMarian Sigler2012-09-211-12/+12
| | | | | That functionality requires searching through the subtree for services to be deleted etc.
* account: don't fail on unicode input strings. Update examplesMarian Sigler2012-09-211-8/+14
|
* AccountService.delete: check for basestring not .dnMarian Sigler2012-09-211-4/+5
|
* AccountService: expect admin credentials at initialization.Marian Sigler2012-09-211-32/+32
| | | | | This makes it possible to call the methods (find, register, etc) without specifying the admin credentials each time again.
* Merge branch 'master' of ssh://git.spline.de/account-webMarian Sigler2012-09-211-5/+4
|\
| * fixed _alter_passwords()Nico von Geyso2012-09-211-5/+4
| |
* | change Account.__repr__Marian Sigler2012-09-211-2/+2
|/
* Updated AccountService APINico von Geyso2012-09-201-62/+146
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | AccountService is now stateless. That means every request needs its own authentication request (bind). Usage examples: * register a new user >> service = AccountService(LDAP_HOST, LDAP_BASE_DN,SERVICES) >> foo = Account('foo','foo@bar.de', password='bar') >> service.register(foo, LDAP_ADMIN_USER, LDAP_ADMIN_PASS) * authenticate a new user >> service = AccountService(LDAP_HOST, LDAP_BASE_DN,SERVICES) >> foo = service.auth('foo', 'bar') * updates an account >> foo.change_mail('a@b.de') >> foo.change_password('bar2') # changes root password >> foo.change_password('bar2', 'gitlab') # changes password for gitlab >> service.update(foo) # save changes in ldap backend # save changes in ldap backend as admin user >> service.update(foo, LDAP_ADMIN_USER, LDAP_ADMIN_USER) * delete an account >> service = AccountService(LDAP_HOST, LDAP_BASE_DN,SERVICES) >> service.delete(Account) >> service.delete('foo') * find accounts >> service = AccountService(LDAP_HOST, LDAP_BASE_DN,SERVICES) >> all_accounts = service.find(LDAP_ADMIN_USER, LDAP_ADMIN_PASS) >> print([x.uid for x in all_accounts])
* added basic account service functionalityNico von Geyso2012-09-171-79/+148
| | | | | | | | | | | | | | | | | | | To auth, register, update or delete an account you have to use the AccountService class. A basic usage could be the following: # Simple auth service = AccountService(LDAP_HOST, LDAP_BASE_DN, LDAP_ADMIN_USER, LDAP_ADMIN_PASS) acc = service.auth('test', 'secret') # Authenticate against some credentials print('Mail: %s' % acc.mail) # Account creation, updating and deletion a = Account('foo', 'foo@bar.de', password='foobar') service.register(a) # create a.mail = 'bar@foo.de' service.update(a) # update service.delete(a.uid) # deletete
* added rudimentary ldap account classNico von Geyso2012-09-141-20/+57
|
* first pieces of codeMarian Sigler2012-09-131-0/+47