##// END OF EJS Templates
Fixed middleware to prevent deactivated users from authenticating
Liad Shani -
r1620:41696fc7 beta
parent child Browse files
Show More
@@ -167,7 +167,7 b' class SimpleGit(object):'
167 username = get_container_username(environ, self.config)
167 username = get_container_username(environ, self.config)
168 try:
168 try:
169 user = self.__get_user(username)
169 user = self.__get_user(username)
170 if user is None:
170 if user is None or not user.active:
171 return HTTPForbidden()(environ, start_response)
171 return HTTPForbidden()(environ, start_response)
172 username = user.username
172 username = user.username
173 except:
173 except:
@@ -133,7 +133,7 b' class SimpleHg(object):'
133 username = get_container_username(environ, self.config)
133 username = get_container_username(environ, self.config)
134 try:
134 try:
135 user = self.__get_user(username)
135 user = self.__get_user(username)
136 if user is None:
136 if user is None or not user.active:
137 return HTTPForbidden()(environ, start_response)
137 return HTTPForbidden()(environ, start_response)
138 username = user.username
138 username = user.username
139 except:
139 except:
General Comments 0
You need to be logged in to leave comments. Login now