Let AUTHFILE be absolute path
This commit is contained in:
		| @ -1,5 +1,4 @@ | ||||
| from flask import current_app, g | ||||
| import os | ||||
|  | ||||
|  | ||||
| def get_users(): | ||||
| @ -9,10 +8,10 @@ def get_users(): | ||||
|  | ||||
|         current_app.logger.debug('Reading %s for users', authfile) | ||||
|  | ||||
|         with current_app.open_resource(os.path.join("..", | ||||
|                                                     authfile)) as f: | ||||
|         with current_app.open_resource(authfile) as f: | ||||
|             for entry in f: | ||||
|                 users.update({tuple(entry.decode('ascii').strip().split(':', 1))}) | ||||
|                 users.update({ | ||||
|                     tuple(entry.decode('ascii').strip().split(':', 1))}) | ||||
|             g.users = users | ||||
|     current_app.logger.debug(g.users) | ||||
|     return g.users | ||||
|  | ||||
		Reference in New Issue
	
	Block a user