Commits

Zhang Huangbin  committed 489b820

Fix last commit.

  • Participants
  • Parent commits e926852

Comments (0)

Files changed (1)

File libs/ldaplib/auth.py

                     session['domainGlobalAdmin'] = True
 
                 if 'mailUser' in entry.get('objectClass'):
-                    session['isMailUser'] = True
-
                     # Make sure user have 'domainGlobalAdmin=yes' for global
                     # admin or 'enabledService=domainadmin' for domain admin.
-                    if not session.get('domainGlobalAdmin') \
-                       or not 'domainadmin' in entry.get('enabledService', []):
+                    if session.get('domainGlobalAdmin') \
+                       or 'domainadmin' in entry.get('enabledService', []):
+                        session['isMailUser'] = True
+                    else:
                         return False
 
                 conn.unbind_s()