##// END OF EJS Templates
hooks: inject request.user for proper url generation in async methods....
marcink -
r2418:b8cb7843 default
parent child Browse files
Show More
@@ -212,7 +212,14 b' class Hooks(object):'
212 212 extras = AttributeDict(extras)
213 213 server_url = extras['server_url']
214 214 request = bootstrap_request(application_url=server_url)
215
215 216 bootstrap_config(request) # inject routes and other interfaces
217
218 # inject the user for usage in hooks
219 request.user = AttributeDict({'username': extras.username,
220 'ip_addr': extras.ip,
221 'user_id': extras.user_id})
222
216 223 extras.request = request
217 224
218 225 try:
General Comments 0
You need to be logged in to leave comments. Login now