diff rhodecode/lib/auth.py @ 699:52da7cba88a6 beta

Code refactor for auth func, preparing for ldap support css updates. turned off graph,and branches for git changelog
author Marcin Kuzminski <marcin@python-works.com>
date Tue, 16 Nov 2010 08:52:31 +0100
parents cb0d9ce6ac5c
children 9e9f1b919c0c
line wrap: on
line diff
--- a/rhodecode/lib/auth.py	Mon Nov 15 18:38:54 2010 +0100
+++ b/rhodecode/lib/auth.py	Tue Nov 16 08:52:31 2010 +0100
@@ -73,6 +73,15 @@
     return bcrypt.hashpw(password, hashed) == hashed
 
 def authfunc(environ, username, password):
+    """
+    Authentication function used in Mercurial/Git/ and access controll,
+    firstly checks for db authentication then if ldap is enabled for ldap
+    authentication
+    :param environ: needed only for using in Basic auth, can be None
+    :param username: username
+    :param password: password
+    """
+
     user = UserModel().get_by_username(username, cache=False)
 
     if user: