)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":8040,"name":"Timur Sufiev","email":"tsufiev@gmail.com","username":"tsufiev"},"change_message_id":"232ec5b741894660ad4051e33242ec1f4af977ce","unresolved":false,"context_lines":[{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Also, now horizon.exceptions.NotAuthorized is a part of "},{"line_number":19,"context_line":"UNAUTHORIZED tuple in the exceptions.py, because this type "},{"line_number":20,"context_line":"of exception isre-rised after handling services anuthorized errors. "},{"line_number":21,"context_line":"Looks like it was missing. Now the horizon.exceptions.NotAuthorized"},{"line_number":22,"context_line":"is handled like all NotAuthorized exceptions."},{"line_number":23,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":41,"id":"3a50d1a3_42b7e8d7","line":20,"updated":"2015-07-28 17:27:55.000000000","message":"Avoid editing commit message in web interface, because it\u0027s prone to this kind of errors: \u0027isre-rised\u0027 and \u0027anuthorized\u0027 :). Also excessive whitespaces (look for the red squares here).","commit_id":"8a753ffae0d62156b596305c39af4cfb109e7ad5"},{"author":{"_account_id":8040,"name":"Timur Sufiev","email":"tsufiev@gmail.com","username":"tsufiev"},"change_message_id":"4b956a5894ca2a3c236299de9674692d14eeb716","unresolved":false,"context_lines":[{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Now user will be logged out if he has no valid tokens."},{"line_number":15,"context_line":"Set `escalate` to True (for unauthorized-error)"},{"line_number":16,"context_line":"for always user logout."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Also, now horizon.exceptions.NotAuthorized is a part of"},{"line_number":19,"context_line":"UNAUTHORIZED tuple in the exceptions.py, because this type"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":43,"id":"3a50d1a3_b3c178e6","line":16,"updated":"2015-08-03 10:28:25.000000000","message":"to always log him out in that case.","commit_id":"331306e63f0e78d88127b407d52433c15e1de957"},{"author":{"_account_id":13325,"name":"Paul Karikh","email":"pkarikh@gmail.com","username":"paul.karikh"},"change_message_id":"66dde07fd685e837826bf76546a95bf74bcb0ae1","unresolved":false,"context_lines":[{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Now user will be logged out if he has no valid tokens."},{"line_number":15,"context_line":"Set `escalate` to True (for unauthorized-error)"},{"line_number":16,"context_line":"for always user logout."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Also, now horizon.exceptions.NotAuthorized is a part of"},{"line_number":19,"context_line":"UNAUTHORIZED tuple in the exceptions.py, because this type"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":43,"id":"1a4dcd0f_91e32ca4","line":16,"in_reply_to":"3a50d1a3_b3c178e6","updated":"2015-08-05 14:05:26.000000000","message":"Done","commit_id":"331306e63f0e78d88127b407d52433c15e1de957"},{"author":{"_account_id":8040,"name":"Timur Sufiev","email":"tsufiev@gmail.com","username":"tsufiev"},"change_message_id":"4b956a5894ca2a3c236299de9674692d14eeb716","unresolved":false,"context_lines":[{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Also, now horizon.exceptions.NotAuthorized is a part of"},{"line_number":19,"context_line":"UNAUTHORIZED tuple in the exceptions.py, because this type"},{"line_number":20,"context_line":"of exception is re-rised after handling services unauthorized errors."},{"line_number":21,"context_line":"Looks like it was missing. Now the horizon.exceptions.NotAuthorized"},{"line_number":22,"context_line":"is handled like all NotAuthorized exceptions."},{"line_number":23,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":43,"id":"3a50d1a3_d3a68453","line":20,"updated":"2015-08-03 10:28:25.000000000","message":"re-raised","commit_id":"331306e63f0e78d88127b407d52433c15e1de957"},{"author":{"_account_id":13325,"name":"Paul Karikh","email":"pkarikh@gmail.com","username":"paul.karikh"},"change_message_id":"66dde07fd685e837826bf76546a95bf74bcb0ae1","unresolved":false,"context_lines":[{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Also, now horizon.exceptions.NotAuthorized is a part of"},{"line_number":19,"context_line":"UNAUTHORIZED tuple in the exceptions.py, because this type"},{"line_number":20,"context_line":"of exception is re-rised after handling services unauthorized errors."},{"line_number":21,"context_line":"Looks like it was missing. Now the horizon.exceptions.NotAuthorized"},{"line_number":22,"context_line":"is handled like all NotAuthorized exceptions."},{"line_number":23,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":43,"id":"1a4dcd0f_f1dab0e7","line":20,"in_reply_to":"3a50d1a3_d3a68453","updated":"2015-08-05 14:05:26.000000000","message":"Done","commit_id":"331306e63f0e78d88127b407d52433c15e1de957"},{"author":{"_account_id":8040,"name":"Timur Sufiev","email":"tsufiev@gmail.com","username":"tsufiev"},"change_message_id":"4b956a5894ca2a3c236299de9674692d14eeb716","unresolved":false,"context_lines":[{"line_number":21,"context_line":"Looks like it was missing. Now the horizon.exceptions.NotAuthorized"},{"line_number":22,"context_line":"is handled like all NotAuthorized exceptions."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"And horizon_middleware.py in process_exception now generated"},{"line_number":25,"context_line":"logout_reason for cases if user is not authorized."},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"Closes-Bug: #1252341"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":43,"id":"3a50d1a3_337568ca","line":24,"updated":"2015-08-03 10:28:25.000000000","message":"now generates","commit_id":"331306e63f0e78d88127b407d52433c15e1de957"},{"author":{"_account_id":13325,"name":"Paul Karikh","email":"pkarikh@gmail.com","username":"paul.karikh"},"change_message_id":"66dde07fd685e837826bf76546a95bf74bcb0ae1","unresolved":false,"context_lines":[{"line_number":21,"context_line":"Looks like it was missing. Now the horizon.exceptions.NotAuthorized"},{"line_number":22,"context_line":"is handled like all NotAuthorized exceptions."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"And horizon_middleware.py in process_exception now generated"},{"line_number":25,"context_line":"logout_reason for cases if user is not authorized."},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"Closes-Bug: #1252341"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":43,"id":"1a4dcd0f_71f54055","line":24,"in_reply_to":"3a50d1a3_337568ca","updated":"2015-08-05 14:05:26.000000000","message":"Done","commit_id":"331306e63f0e78d88127b407d52433c15e1de957"}],"horizon/decorators.py":[{"author":{"_account_id":8040,"name":"Timur Sufiev","email":"tsufiev@gmail.com","username":"tsufiev"},"change_message_id":"7a07ef99056c7b0c14affe6cb078b70fca935aa2","unresolved":false,"context_lines":[{"line_number":50,"context_line":"    def dec(request, *args, **kwargs):"},{"line_number":51,"context_line":"        if request.user.is_authenticated():"},{"line_number":52,"context_line":"            return view_func(request, *args, **kwargs)"},{"line_number":53,"context_line":"        raise NotAuthorized(_(\"Please log in to continue.\"))"},{"line_number":54,"context_line":"    return dec"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_6d2160fb","line":53,"updated":"2015-01-16 14:42:43.000000000","message":"NotAuthorized means \u0027not enough permissions to do an action\u0027","commit_id":"4e1bc2a56430d953c6f378865a8347b4a39376ae"},{"author":{"_account_id":8040,"name":"Timur Sufiev","email":"tsufiev@gmail.com","username":"tsufiev"},"change_message_id":"7a07ef99056c7b0c14affe6cb078b70fca935aa2","unresolved":false,"context_lines":[{"line_number":82,"context_line":"        if request.user.is_authenticated():"},{"line_number":83,"context_line":"            if request.user.has_perms(view_func._required_perms):"},{"line_number":84,"context_line":"                return view_func(request, *args, **kwargs)"},{"line_number":85,"context_line":"        raise NotAuthenticated(_(\"You are not authorized to access %s\")"},{"line_number":86,"context_line":"                            % request.path)"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"    # If we don\u0027t have any permissions, just return the original view."}],"source_content_type":"text/x-python","patch_set":6,"id":"3a961159_8d73ec14","line":85,"updated":"2015-01-16 14:42:43.000000000","message":"NotAuthenticated means \u0027not logged in\u0027","commit_id":"4e1bc2a56430d953c6f378865a8347b4a39376ae"}],"horizon/exceptions.py":[{"author":{"_account_id":8984,"name":"George Peristerakis","email":"gperiste@redhat.com","username":"peristeri"},"change_message_id":"38d7451d9d20694eb988380914b8b7336429e84f","unresolved":false,"context_lines":[{"line_number":227,"context_line":"        log_method(error_color(\"Unauthenticated: %s\" % log_entry))"},{"line_number":228,"context_line":"    if not handled:"},{"line_number":229,"context_line":"        if message:"},{"line_number":230,"context_line":"            message \u003d _(\"Unauthorized: %s\") % message"},{"line_number":231,"context_line":"        # We get some pretty useless error messages back from"},{"line_number":232,"context_line":"        # some clients, so let\u0027s define our own fallback."},{"line_number":233,"context_line":"        fallback \u003d _(\"Unauthorized. Please try logging in again.\")"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a80dd14_5b43feae","line":230,"updated":"2015-03-17 21:49:33.000000000","message":"The log message is not updated","commit_id":"e861d05186bfe5bd1c61860a18a6c874695984ff"},{"author":{"_account_id":8984,"name":"George Peristerakis","email":"gperiste@redhat.com","username":"peristeri"},"change_message_id":"38d7451d9d20694eb988380914b8b7336429e84f","unresolved":false,"context_lines":[{"line_number":242,"context_line":"        # openstack_dashboard.settings requires django.contrib.auth to be"},{"line_number":243,"context_line":"        # loaded while importing openstack_auth.utils"},{"line_number":244,"context_line":"        from django.contrib.auth import logout  # noqa"},{"line_number":245,"context_line":"        logout(request)"},{"line_number":246,"context_line":"        raise NotAuthenticated"},{"line_number":247,"context_line":"    # Otherwise continue and present our \"unauthenticated\" error message."},{"line_number":248,"context_line":"    return NotAuthenticated"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a80dd14_2419d022","line":245,"updated":"2015-03-17 21:49:33.000000000","message":"You logout in the middleware and here. I think you could remove the logout above.","commit_id":"e861d05186bfe5bd1c61860a18a6c874695984ff"},{"author":{"_account_id":9981,"name":"Doug Fish","email":"drfish@us.ibm.com","username":"doug-fish"},"change_message_id":"806ec088e981083be1869599efbe4dde19f460ac","unresolved":false,"context_lines":[{"line_number":113,"context_line":"    :func:`~horizon.decorators.require_perms` decorator)."},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"    The included :class:`~horizon.middleware.HorizonMiddleware` catches"},{"line_number":116,"context_line":"    ``NotAuthorized`` and handles it gracefully by displaying an error"},{"line_number":117,"context_line":"    message and redirecting the user to a login page."},{"line_number":118,"context_line":"    \"\"\""},{"line_number":119,"context_line":"    status_code \u003d 401"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_d0f5a9cb","line":116,"updated":"2015-03-19 16:22:06.000000000","message":"need the comment + exception to match","commit_id":"6dc6ff607132a87b2a83963f717bfd5e4badffe6"},{"author":{"_account_id":8040,"name":"Timur Sufiev","email":"tsufiev@gmail.com","username":"tsufiev"},"change_message_id":"050dc3272bf6d87248196acaa0177497a6802bbe","unresolved":false,"context_lines":[{"line_number":106,"context_line":"        self.location \u003d location"},{"line_number":107,"context_line":"        self.message \u003d message"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"class NotAuthorized(HorizonException):"},{"line_number":111,"context_line":"    \"\"\"Raised whenever a user attempts to access a resource which they do not"},{"line_number":112,"context_line":"    have permission-based access to (such as when failing the"}],"source_content_type":"text/x-python","patch_set":22,"id":"9aa53dc9_1931bf05","line":109,"updated":"2015-04-08 12:49:16.000000000","message":"NotAuhorized truly has 401 code, but the description is more appropriate for the Forbidden exception.","commit_id":"0865961f57ab7cf8aff74390fc6e307eb2fd0243"},{"author":{"_account_id":8040,"name":"Timur Sufiev","email":"tsufiev@gmail.com","username":"tsufiev"},"change_message_id":"050dc3272bf6d87248196acaa0177497a6802bbe","unresolved":false,"context_lines":[{"line_number":118,"context_line":"    \"\"\""},{"line_number":119,"context_line":"    status_code \u003d 401"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"class NotAuthenticated(HorizonException):"},{"line_number":123,"context_line":"    \"\"\"Raised when a user is trying to make requests and they are not logged"},{"line_number":124,"context_line":"    in."}],"source_content_type":"text/x-python","patch_set":22,"id":"9aa53dc9_39092332","line":121,"updated":"2015-04-08 12:49:16.000000000","message":"Everything is wrong here except status code - both class name (it is really Forbidden) and docstring (see previous docstring).","commit_id":"0865961f57ab7cf8aff74390fc6e307eb2fd0243"},{"author":{"_account_id":15168,"name":"Kirill Zaitsev","email":"k.zaitsev@me.com","username":"kzaitsev"},"change_message_id":"56186c13a85d7ffef950266495ce840b7721666d","unresolved":false,"context_lines":[{"line_number":288,"context_line":"     \u0027set_wrap\u0027: False, \u0027escalate\u0027: True},"},{"line_number":289,"context_line":"    {\u0027exc\u0027: NOT_FOUND, \u0027handler\u0027: handle_notfound,"},{"line_number":290,"context_line":"     \u0027set_wrap\u0027: True, \u0027escalate\u0027: False},"},{"line_number":291,"context_line":"    {\u0027exc\u0027: RECOVERABLE, \u0027handler\u0027: handle_recoverable, \u0027set_wrap\u0027: False},"},{"line_number":292,"context_line":"]"},{"line_number":293,"context_line":""},{"line_number":294,"context_line":""}],"source_content_type":"text/x-python","patch_set":29,"id":"fa32b979_ff29cae6","line":291,"updated":"2015-06-18 13:17:49.000000000","message":"why change this? \n\nall the changes in this file seem unrelated to the commit or at the very least not mentioned in the commit message. Can you please elaborate and justify changes in exceptions?","commit_id":"a2bc7affe2d98ebf56ce1b2aa20f4e83c1645c1e"},{"author":{"_account_id":12355,"name":"Vlad Okhrimenko","email":"vokhrimenko@mirantis.com","username":"vokhrimenko"},"change_message_id":"b0e6046a289e405ad4e6d27bf73816623012a7d6","unresolved":false,"context_lines":[{"line_number":288,"context_line":"     \u0027set_wrap\u0027: False, \u0027escalate\u0027: True},"},{"line_number":289,"context_line":"    {\u0027exc\u0027: NOT_FOUND, \u0027handler\u0027: handle_notfound,"},{"line_number":290,"context_line":"     \u0027set_wrap\u0027: True, \u0027escalate\u0027: False},"},{"line_number":291,"context_line":"    {\u0027exc\u0027: RECOVERABLE, \u0027handler\u0027: handle_recoverable, \u0027set_wrap\u0027: False},"},{"line_number":292,"context_line":"]"},{"line_number":293,"context_line":""},{"line_number":294,"context_line":""}],"source_content_type":"text/x-python","patch_set":29,"id":"fa32b979_e8b487d5","line":291,"in_reply_to":"fa32b979_ff29cae6","updated":"2015-06-19 09:51:51.000000000","message":"we need `escalate` for unauthorized-error. I will add comment to commit message.","commit_id":"a2bc7affe2d98ebf56ce1b2aa20f4e83c1645c1e"},{"author":{"_account_id":15168,"name":"Kirill Zaitsev","email":"k.zaitsev@me.com","username":"kzaitsev"},"change_message_id":"73e298f1343107b3813c7dd487ee63463384d294","unresolved":false,"context_lines":[{"line_number":248,"context_line":"        # loaded while importing openstack_auth.utils"},{"line_number":249,"context_line":"        from django.contrib.auth import logout  # noqa"},{"line_number":250,"context_line":"        logout(request)"},{"line_number":251,"context_line":"        request.unauthorized \u003d True"},{"line_number":252,"context_line":"        raise NotAuthorized"},{"line_number":253,"context_line":"    # Otherwise continue and present our \"unauthorized\" error message."},{"line_number":254,"context_line":"    return NotAuthorized"}],"source_content_type":"text/x-python","patch_set":31,"id":"fa32b979_a49f6ab3","line":251,"updated":"2015-06-19 21:20:01.000000000","message":"so. you only set it after logout() call, right?\n\nWhy do you even need it then? Why not use standard django mechanism — request.user.is_authenticated() ?\n\nafter a logout user becomes anonymous, therefore is_authenticated will return False.","commit_id":"071a9b1302e8ca32efb7313e685fd18a4322a934"},{"author":{"_account_id":8040,"name":"Timur Sufiev","email":"tsufiev@gmail.com","username":"tsufiev"},"change_message_id":"cfe824cd663b11031a040bc5ff54f417731e716d","unresolved":false,"context_lines":[{"line_number":248,"context_line":"        # loaded while importing openstack_auth.utils"},{"line_number":249,"context_line":"        from django.contrib.auth import logout  # noqa"},{"line_number":250,"context_line":"        logout(request)"},{"line_number":251,"context_line":"        request.unauthorized \u003d True"},{"line_number":252,"context_line":"        raise NotAuthorized"},{"line_number":253,"context_line":"    # Otherwise continue and present our \"unauthorized\" error message."},{"line_number":254,"context_line":"    return NotAuthorized"}],"source_content_type":"text/x-python","patch_set":31,"id":"fa32b979_a8e418ac","line":251,"in_reply_to":"fa32b979_a49f6ab3","updated":"2015-06-20 07:58:41.000000000","message":"AFAIU, this is done to later catch the flag in process_exception middleware, which redirects user to login page. If this function is called by something inside process_request middleware, then process_exception has no chance to intervene. So that\u0027s kind of deferred notification for process_exception.","commit_id":"071a9b1302e8ca32efb7313e685fd18a4322a934"},{"author":{"_account_id":15168,"name":"Kirill Zaitsev","email":"k.zaitsev@me.com","username":"kzaitsev"},"change_message_id":"7594daff6effcef7d8efcddfe6394097e968e111","unresolved":false,"context_lines":[{"line_number":248,"context_line":"        # loaded while importing openstack_auth.utils"},{"line_number":249,"context_line":"        from django.contrib.auth import logout  # noqa"},{"line_number":250,"context_line":"        logout(request)"},{"line_number":251,"context_line":"        request.unauthorized \u003d True"},{"line_number":252,"context_line":"        raise NotAuthorized"},{"line_number":253,"context_line":"    # Otherwise continue and present our \"unauthorized\" error message."},{"line_number":254,"context_line":"    return NotAuthorized"}],"source_content_type":"text/x-python","patch_set":31,"id":"fa32b979_948ccd36","line":251,"in_reply_to":"fa32b979_a8e418ac","updated":"2015-06-20 17:34:29.000000000","message":"The fact is that it\u0027s only checked once in this commit, in a middleware, where a request and therefore a request.user is also available.","commit_id":"071a9b1302e8ca32efb7313e685fd18a4322a934"},{"author":{"_account_id":1941,"name":"Lin Hua Cheng","email":"os.lcheng@gmail.com","username":"lin-hua-cheng"},"change_message_id":"9a6575a69c8624a33f881b7c557f2ade4dda22ad","unresolved":false,"context_lines":[{"line_number":248,"context_line":"        # loaded while importing openstack_auth.utils"},{"line_number":249,"context_line":"        from django.contrib.auth import logout  # noqa"},{"line_number":250,"context_line":"        logout(request)"},{"line_number":251,"context_line":"        request.unauthorized \u003d True"},{"line_number":252,"context_line":"        raise NotAuthorized"},{"line_number":253,"context_line":"    # Otherwise continue and present our \"unauthorized\" error message."},{"line_number":254,"context_line":"    return NotAuthorized"}],"source_content_type":"text/x-python","patch_set":33,"id":"3a50d1a3_5e6d6dca","line":251,"updated":"2015-07-23 00:30:40.000000000","message":"do we really need to do this? isn\u0027t returning NotAuthorized sufficient?","commit_id":"60e79c8aa30577e5f91cd35ce3a96483b84d0a8e"},{"author":{"_account_id":8040,"name":"Timur Sufiev","email":"tsufiev@gmail.com","username":"tsufiev"},"change_message_id":"232ec5b741894660ad4051e33242ec1f4af977ce","unresolved":false,"context_lines":[{"line_number":238,"context_line":"        # some clients, so let\u0027s define our own fallback."},{"line_number":239,"context_line":"        fallback \u003d _(\"Unauthorized. Please try logging in again.\")"},{"line_number":240,"context_line":"        messages.error(request, message or fallback)"},{"line_number":241,"context_line":""},{"line_number":242,"context_line":"    # Escalation means logging the user out and raising NotAuthorized"},{"line_number":243,"context_line":"    # so the middleware will redirect them appropriately."},{"line_number":244,"context_line":"    if escalate:"}],"source_content_type":"text/x-python","patch_set":41,"id":"3a50d1a3_dc1e770b","line":241,"updated":"2015-07-28 17:27:55.000000000","message":"excessive","commit_id":"8a753ffae0d62156b596305c39af4cfb109e7ad5"}],"horizon/middleware.py":[{"author":{"_account_id":12355,"name":"Vlad Okhrimenko","email":"vokhrimenko@mirantis.com","username":"vokhrimenko"},"change_message_id":"2d9f5fa53451ed120adfa69e823b9ad6d864c4d9","unresolved":false,"context_lines":[{"line_number":150,"context_line":"        if isinstance(exception, exceptions.NotAuthorized):"},{"line_number":151,"context_line":"            return shortcuts.redirect(settings.LOGIN_REDIRECT_URL)"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"        if isinstance(exception, exceptions.NotAuthenticated):"},{"line_number":154,"context_line":"            auth_url \u003d settings.LOGIN_URL"},{"line_number":155,"context_line":"            login_url \u003d request.build_absolute_uri(auth_url)"},{"line_number":156,"context_line":"            response \u003d logout_then_login(request, login_url\u003dlogin_url)"}],"source_content_type":"text/x-python","patch_set":7,"id":"1a930d6b_ceefb11c","line":153,"updated":"2015-01-27 09:14:52.000000000","message":"This block don\u0027t need, because `logout ` happens in exception.py","commit_id":"ad2577ed916563580fd38665732ae020717149ce"},{"author":{"_account_id":15168,"name":"Kirill Zaitsev","email":"k.zaitsev@me.com","username":"kzaitsev"},"change_message_id":"56186c13a85d7ffef950266495ce840b7721666d","unresolved":false,"context_lines":[{"line_number":163,"context_line":"                response_401 \u003d http.HttpResponse(status\u003d401)"},{"line_number":164,"context_line":"                response_401[\u0027X-Horizon-Location\u0027] \u003d response[\u0027location\u0027]"},{"line_number":165,"context_line":"                return response_401"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"            return response"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"        # If an internal \"NotFound\" error gets this far, return a real 404."}],"source_content_type":"text/x-python","patch_set":29,"id":"fa32b979_bfc34237","side":"PARENT","line":166,"updated":"2015-06-18 13:17:49.000000000","message":"This patch has lots of unrelated whitespace changes please remove them https://wiki.openstack.org/wiki/GitCommitMessages#Things_to_avoid_when_creating_commits","commit_id":"dc3d7e57f90c6dc4c746bcafef3fcbc1a8310548"},{"author":{"_account_id":12355,"name":"Vlad Okhrimenko","email":"vokhrimenko@mirantis.com","username":"vokhrimenko"},"change_message_id":"7470e4cc2d6789ae3fbf31b09535e4abd168b52f","unresolved":false,"context_lines":[{"line_number":163,"context_line":"                response_401 \u003d http.HttpResponse(status\u003d401)"},{"line_number":164,"context_line":"                response_401[\u0027X-Horizon-Location\u0027] \u003d response[\u0027location\u0027]"},{"line_number":165,"context_line":"                return response_401"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"            return response"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"        # If an internal \"NotFound\" error gets this far, return a real 404."}],"source_content_type":"text/x-python","patch_set":29,"id":"fa32b979_915ac64f","side":"PARENT","line":166,"in_reply_to":"fa32b979_bfc34237","updated":"2015-06-19 10:41:56.000000000","message":"Done","commit_id":"dc3d7e57f90c6dc4c746bcafef3fcbc1a8310548"},{"author":{"_account_id":15168,"name":"Kirill Zaitsev","email":"k.zaitsev@me.com","username":"kzaitsev"},"change_message_id":"56186c13a85d7ffef950266495ce840b7721666d","unresolved":false,"context_lines":[{"line_number":173,"context_line":"            # the user *on* the login form..."},{"line_number":174,"context_line":"            return shortcuts.redirect(exception.location)"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"    def process_response(self, request, response):"},{"line_number":177,"context_line":"        if hasattr(request, \u0027unauthorized\u0027):"},{"line_number":178,"context_line":"            auth_url \u003d settings.LOGIN_URL"},{"line_number":179,"context_line":"            next_url \u003d iri_to_uri(request.get_full_path())"}],"source_content_type":"text/x-python","patch_set":29,"id":"fa32b979_5fb236e6","line":176,"updated":"2015-06-18 13:17:49.000000000","message":"Why remove docstring from a public function?","commit_id":"a2bc7affe2d98ebf56ce1b2aa20f4e83c1645c1e"},{"author":{"_account_id":15168,"name":"Kirill Zaitsev","email":"k.zaitsev@me.com","username":"kzaitsev"},"change_message_id":"bd2f1ea369d5b5125bfcaebe6480b0bb60d08d42","unresolved":false,"context_lines":[{"line_number":173,"context_line":"            # the user *on* the login form..."},{"line_number":174,"context_line":"            return shortcuts.redirect(exception.location)"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"    def process_response(self, request, response):"},{"line_number":177,"context_line":"        if hasattr(request, \u0027unauthorized\u0027):"},{"line_number":178,"context_line":"            auth_url \u003d settings.LOGIN_URL"},{"line_number":179,"context_line":"            next_url \u003d iri_to_uri(request.get_full_path())"}],"source_content_type":"text/x-python","patch_set":29,"id":"fa32b979_8494a6e8","line":176,"in_reply_to":"fa32b979_08676b26","updated":"2015-06-19 21:19:27.000000000","message":"no. you removed the docstring and made it a comment. There is currently no docstring in this function. You shouldn\u0027t remove it, you should update it.\n\nRefer to python docs for difference between comments and docstrings.\nRefer to pep8 for importance of docstrings.","commit_id":"a2bc7affe2d98ebf56ce1b2aa20f4e83c1645c1e"},{"author":{"_account_id":12355,"name":"Vlad Okhrimenko","email":"vokhrimenko@mirantis.com","username":"vokhrimenko"},"change_message_id":"b0e6046a289e405ad4e6d27bf73816623012a7d6","unresolved":false,"context_lines":[{"line_number":173,"context_line":"            # the user *on* the login form..."},{"line_number":174,"context_line":"            return shortcuts.redirect(exception.location)"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"    def process_response(self, request, response):"},{"line_number":177,"context_line":"        if hasattr(request, \u0027unauthorized\u0027):"},{"line_number":178,"context_line":"            auth_url \u003d settings.LOGIN_URL"},{"line_number":179,"context_line":"            next_url \u003d iri_to_uri(request.get_full_path())"}],"source_content_type":"text/x-python","patch_set":29,"id":"fa32b979_08676b26","line":176,"in_reply_to":"fa32b979_5fb236e6","updated":"2015-06-19 09:51:51.000000000","message":"I didn\u0027t remove docstring  -- only move to 188line. Because comment refers to the condition in 190line","commit_id":"a2bc7affe2d98ebf56ce1b2aa20f4e83c1645c1e"},{"author":{"_account_id":15168,"name":"Kirill Zaitsev","email":"k.zaitsev@me.com","username":"kzaitsev"},"change_message_id":"73e298f1343107b3813c7dd487ee63463384d294","unresolved":false,"context_lines":[{"line_number":175,"context_line":"            # the user *on* the login form..."},{"line_number":176,"context_line":"            return shortcuts.redirect(exception.location)"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"    def process_response(self, request, response):"},{"line_number":179,"context_line":"        if hasattr(request, \u0027unauthorized\u0027):"},{"line_number":180,"context_line":"            auth_url \u003d settings.LOGIN_URL"},{"line_number":181,"context_line":"            next_url \u003d iri_to_uri(request.get_full_path())"}],"source_content_type":"text/x-python","patch_set":31,"id":"fa32b979_04541652","line":178,"updated":"2015-06-19 21:20:01.000000000","message":"I still object to removing a docsting from a method","commit_id":"071a9b1302e8ca32efb7313e685fd18a4322a934"},{"author":{"_account_id":12355,"name":"Vlad Okhrimenko","email":"vokhrimenko@mirantis.com","username":"vokhrimenko"},"change_message_id":"0842cdb50de2af8129e85d8db87ef01f9ccfeb1c","unresolved":false,"context_lines":[{"line_number":175,"context_line":"            # the user *on* the login form..."},{"line_number":176,"context_line":"            return shortcuts.redirect(exception.location)"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"    def process_response(self, request, response):"},{"line_number":179,"context_line":"        if hasattr(request, \u0027unauthorized\u0027):"},{"line_number":180,"context_line":"            auth_url \u003d settings.LOGIN_URL"},{"line_number":181,"context_line":"            next_url \u003d iri_to_uri(request.get_full_path())"}],"source_content_type":"text/x-python","patch_set":31,"id":"fa32b979_15b09bdc","line":178,"in_reply_to":"fa32b979_04541652","updated":"2015-06-22 14:16:17.000000000","message":"Done","commit_id":"071a9b1302e8ca32efb7313e685fd18a4322a934"},{"author":{"_account_id":15168,"name":"Kirill Zaitsev","email":"k.zaitsev@me.com","username":"kzaitsev"},"change_message_id":"73e298f1343107b3813c7dd487ee63463384d294","unresolved":false,"context_lines":[{"line_number":176,"context_line":"            return shortcuts.redirect(exception.location)"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"    def process_response(self, request, response):"},{"line_number":179,"context_line":"        if hasattr(request, \u0027unauthorized\u0027):"},{"line_number":180,"context_line":"            auth_url \u003d settings.LOGIN_URL"},{"line_number":181,"context_line":"            next_url \u003d iri_to_uri(request.get_full_path())"},{"line_number":182,"context_line":"            if next_url !\u003d auth_url:"}],"source_content_type":"text/x-python","patch_set":31,"id":"fa32b979_24d83aef","line":179,"updated":"2015-06-19 21:20:01.000000000","message":"this should be changed to requset.user.is_authenticated() or smth similar.","commit_id":"071a9b1302e8ca32efb7313e685fd18a4322a934"},{"author":{"_account_id":15168,"name":"Kirill Zaitsev","email":"k.zaitsev@me.com","username":"kzaitsev"},"change_message_id":"7594daff6effcef7d8efcddfe6394097e968e111","unresolved":false,"context_lines":[{"line_number":176,"context_line":"            return shortcuts.redirect(exception.location)"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"    def process_response(self, request, response):"},{"line_number":179,"context_line":"        if hasattr(request, \u0027unauthorized\u0027):"},{"line_number":180,"context_line":"            auth_url \u003d settings.LOGIN_URL"},{"line_number":181,"context_line":"            next_url \u003d iri_to_uri(request.get_full_path())"},{"line_number":182,"context_line":"            if next_url !\u003d auth_url:"}],"source_content_type":"text/x-python","patch_set":31,"id":"fa32b979_94ba8dbf","line":179,"in_reply_to":"fa32b979_08ff4435","updated":"2015-06-20 17:34:29.000000000","message":"The fact is — that \"unauthorized\" is set right after a django.contrib.auth.logout occurs. And logout() sets user to AnonymousUser, which would return False for request.user.is_authenticated()\nsee https://github.com/django/django/blob/master/django/contrib/auth/__init__.py#L120 (or any version back to 1.4)\n\nTherefore I feel that this code tries to reinvent the wheel a bit \u003d)","commit_id":"071a9b1302e8ca32efb7313e685fd18a4322a934"},{"author":{"_account_id":8040,"name":"Timur Sufiev","email":"tsufiev@gmail.com","username":"tsufiev"},"change_message_id":"cfe824cd663b11031a040bc5ff54f417731e716d","unresolved":false,"context_lines":[{"line_number":176,"context_line":"            return shortcuts.redirect(exception.location)"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"    def process_response(self, request, response):"},{"line_number":179,"context_line":"        if hasattr(request, \u0027unauthorized\u0027):"},{"line_number":180,"context_line":"            auth_url \u003d settings.LOGIN_URL"},{"line_number":181,"context_line":"            next_url \u003d iri_to_uri(request.get_full_path())"},{"line_number":182,"context_line":"            if next_url !\u003d auth_url:"}],"source_content_type":"text/x-python","patch_set":31,"id":"fa32b979_08ff4435","line":179,"in_reply_to":"fa32b979_24d83aef","updated":"2015-06-20 07:58:41.000000000","message":"Kirill\u0027s suggestion makes sense. Vlad, perhaps it would be better to use this built-in method? Does it return what\u0027s expected after .logout() had been called?","commit_id":"071a9b1302e8ca32efb7313e685fd18a4322a934"},{"author":{"_account_id":12355,"name":"Vlad Okhrimenko","email":"vokhrimenko@mirantis.com","username":"vokhrimenko"},"change_message_id":"26ccb7876896642fed7ba5bdf03c707ba41a350f","unresolved":false,"context_lines":[{"line_number":176,"context_line":"            return shortcuts.redirect(exception.location)"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"    def process_response(self, request, response):"},{"line_number":179,"context_line":"        if hasattr(request, \u0027unauthorized\u0027):"},{"line_number":180,"context_line":"            auth_url \u003d settings.LOGIN_URL"},{"line_number":181,"context_line":"            next_url \u003d iri_to_uri(request.get_full_path())"},{"line_number":182,"context_line":"            if next_url !\u003d auth_url:"}],"source_content_type":"text/x-python","patch_set":31,"id":"fa32b979_bae75e11","line":179,"in_reply_to":"fa32b979_94ba8dbf","updated":"2015-06-22 13:44:41.000000000","message":"Kirill, thanks for the review!  If we use `request.user.is_authenticated()` instead \u0027unauthorized\u0027-flag  ---  we will never be able to login ---  we get many `redirect`","commit_id":"071a9b1302e8ca32efb7313e685fd18a4322a934"},{"author":{"_account_id":12355,"name":"Vlad Okhrimenko","email":"vokhrimenko@mirantis.com","username":"vokhrimenko"},"change_message_id":"708ee85a3d6e75ec5c2e9a7180637198170aa0c0","unresolved":false,"context_lines":[{"line_number":176,"context_line":"            return shortcuts.redirect(exception.location)"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"    def process_response(self, request, response):"},{"line_number":179,"context_line":"        if hasattr(request, \u0027unauthorized\u0027):"},{"line_number":180,"context_line":"            auth_url \u003d settings.LOGIN_URL"},{"line_number":181,"context_line":"            next_url \u003d iri_to_uri(request.get_full_path())"},{"line_number":182,"context_line":"            if next_url !\u003d auth_url:"}],"source_content_type":"text/x-python","patch_set":31,"id":"fa32b979_9576eb3c","line":179,"in_reply_to":"fa32b979_bae75e11","updated":"2015-06-22 14:03:39.000000000","message":"If we use `requset.user.is_authenticated()`(in 179line):\nwhen we try login -- `process_response` called before `requset.user.is_authenticated()` will returns the `True`","commit_id":"071a9b1302e8ca32efb7313e685fd18a4322a934"},{"author":{"_account_id":1941,"name":"Lin Hua Cheng","email":"os.lcheng@gmail.com","username":"lin-hua-cheng"},"change_message_id":"9a6575a69c8624a33f881b7c557f2ade4dda22ad","unresolved":false,"context_lines":[{"line_number":179,"context_line":"        \"\"\"Convert HttpResponseRedirect to HttpResponse if request is via ajax"},{"line_number":180,"context_line":"        to allow ajax request to redirect url"},{"line_number":181,"context_line":"        \"\"\""},{"line_number":182,"context_line":"        if hasattr(request, \u0027unauthorized\u0027):"},{"line_number":183,"context_line":"            auth_url \u003d settings.LOGIN_URL"},{"line_number":184,"context_line":"            next_url \u003d iri_to_uri(request.get_full_path())"},{"line_number":185,"context_line":"            if next_url !\u003d auth_url:"}],"source_content_type":"text/x-python","patch_set":33,"id":"3a50d1a3_f3f6f25b","line":182,"updated":"2015-07-23 00:30:40.000000000","message":"why do we need this extra handlng here?\n\nIf  exception.handle(..) raised NotAuthorized error, I assume it would be catched by line-150 and that should achieve the desired effect of logging out the user.\n\nDid I miss something?","commit_id":"60e79c8aa30577e5f91cd35ce3a96483b84d0a8e"},{"author":{"_account_id":8040,"name":"Timur Sufiev","email":"tsufiev@gmail.com","username":"tsufiev"},"change_message_id":"232ec5b741894660ad4051e33242ec1f4af977ce","unresolved":false,"context_lines":[{"line_number":158,"context_line":"            login_url \u003d request.build_absolute_uri(auth_url)"},{"line_number":159,"context_line":"            response \u003d redirect_to_login(next_url, login_url\u003dlogin_url,"},{"line_number":160,"context_line":"                                         redirect_field_name\u003dfield_name)"},{"line_number":161,"context_line":"            logout_reason \u003d _(\"Unauthorized. Please try logging in again.\")"},{"line_number":162,"context_line":"            utils.add_logout_reason(request, response, logout_reason)"},{"line_number":163,"context_line":"            # delete messages, created in get_data() method"},{"line_number":164,"context_line":"            # since we are going to redirect user to the login page"}],"source_content_type":"text/x-python","patch_set":41,"id":"3a50d1a3_bc55ab50","line":161,"updated":"2015-07-28 17:27:55.000000000","message":"This message gets displayed too often:\n\n* in cases when token is revoked and user is redirected to login page (that\u0027s normal and expected)\n* in case when the user goes to http://horizon.ip for the first time and is being redirected to login page (that\u0027s clearly unexpected)\n* in case when the user is being redirected to the login page when his token doesn\u0027t allow him to list entities within any tenant (removed from his only project, but token is not revoked) - here we get 2 messages - this one and the one above \u0027You are not authorized for any project\u0027 (well, I\u0027ve seen it a couple of times, but not clear algorithm on reproducing it). Seeing 2 of them is not good, the best is to see the second message (and not replace it with the first one, i.e. \u0027try ... again..\u0027).","commit_id":"8a753ffae0d62156b596305c39af4cfb109e7ad5"},{"author":{"_account_id":8040,"name":"Timur Sufiev","email":"tsufiev@gmail.com","username":"tsufiev"},"change_message_id":"232ec5b741894660ad4051e33242ec1f4af977ce","unresolved":false,"context_lines":[{"line_number":184,"context_line":"        \"\"\"Convert HttpResponseRedirect to HttpResponse if request is via ajax"},{"line_number":185,"context_line":"        to allow ajax request to redirect url"},{"line_number":186,"context_line":"        \"\"\""},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"        if request.is_ajax() and hasattr(request, \u0027horizon\u0027):"},{"line_number":189,"context_line":"            queued_msgs \u003d request.horizon[\u0027async_messages\u0027]"},{"line_number":190,"context_line":"            if type(response) \u003d\u003d http.HttpResponseRedirect:"}],"source_content_type":"text/x-python","patch_set":41,"id":"3a50d1a3_5cc02750","line":187,"updated":"2015-07-28 17:27:55.000000000","message":"excessive","commit_id":"8a753ffae0d62156b596305c39af4cfb109e7ad5"},{"author":{"_account_id":8040,"name":"Timur Sufiev","email":"tsufiev@gmail.com","username":"tsufiev"},"change_message_id":"fc8e6a36279ad2ac57d7c7d740c6633904cc1ba6","unresolved":false,"context_lines":[{"line_number":158,"context_line":"            login_url \u003d request.build_absolute_uri(auth_url)"},{"line_number":159,"context_line":"            response \u003d redirect_to_login(next_url, login_url\u003dlogin_url,"},{"line_number":160,"context_line":"                                         redirect_field_name\u003dfield_name)"},{"line_number":161,"context_line":"            logout_reason \u003d _(\"Unauthorized. Please log in.\")"},{"line_number":162,"context_line":"            utils.add_logout_reason(request, response, logout_reason)"},{"line_number":163,"context_line":"            # delete messages, created in get_data() method"},{"line_number":164,"context_line":"            # since we are going to redirect user to the login page"}],"source_content_type":"text/x-python","patch_set":42,"id":"3a50d1a3_ae3d192e","line":161,"updated":"2015-07-30 08:31:52.000000000","message":"Here you\u0027re trying to just hide the problem\u0027s symptoms by making the message neutral, aren\u0027t you? Is there absolutely no way to fix it in a more proper way?","commit_id":"5a184e68b2f91a90647cd65400b8b006b31826eb"},{"author":{"_account_id":8040,"name":"Timur Sufiev","email":"tsufiev@gmail.com","username":"tsufiev"},"change_message_id":"4b956a5894ca2a3c236299de9674692d14eeb716","unresolved":false,"context_lines":[{"line_number":159,"context_line":"            response \u003d redirect_to_login(next_url, login_url\u003dlogin_url,"},{"line_number":160,"context_line":"                                         redirect_field_name\u003dfield_name)"},{"line_number":161,"context_line":"            if isinstance(exception, exceptions.NotAuthorized):"},{"line_number":162,"context_line":"                logout_reason \u003d _(\"Unauthorized. Please log in.\")"},{"line_number":163,"context_line":"                utils.add_logout_reason(request, response, logout_reason)"},{"line_number":164,"context_line":"                # delete messages, created in get_data() method"},{"line_number":165,"context_line":"                # since we are going to redirect user to the login page"}],"source_content_type":"text/x-python","patch_set":43,"id":"3a50d1a3_93955ce5","line":162,"updated":"2015-08-03 10:28:25.000000000","message":"Could the more specific message be printed here (since it\u0027s not longer shown on the very first login attempt)?","commit_id":"331306e63f0e78d88127b407d52433c15e1de957"},{"author":{"_account_id":13325,"name":"Paul Karikh","email":"pkarikh@gmail.com","username":"paul.karikh"},"change_message_id":"66dde07fd685e837826bf76546a95bf74bcb0ae1","unresolved":false,"context_lines":[{"line_number":159,"context_line":"            response \u003d redirect_to_login(next_url, login_url\u003dlogin_url,"},{"line_number":160,"context_line":"                                         redirect_field_name\u003dfield_name)"},{"line_number":161,"context_line":"            if isinstance(exception, exceptions.NotAuthorized):"},{"line_number":162,"context_line":"                logout_reason \u003d _(\"Unauthorized. Please log in.\")"},{"line_number":163,"context_line":"                utils.add_logout_reason(request, response, logout_reason)"},{"line_number":164,"context_line":"                # delete messages, created in get_data() method"},{"line_number":165,"context_line":"                # since we are going to redirect user to the login page"}],"source_content_type":"text/x-python","patch_set":43,"id":"1a4dcd0f_11e63cb0","line":162,"in_reply_to":"3a50d1a3_93955ce5","updated":"2015-08-05 14:05:26.000000000","message":"Done","commit_id":"331306e63f0e78d88127b407d52433c15e1de957"}],"horizon/tables/actions.py":[{"author":{"_account_id":10442,"name":"Masco Kaliyamoorthy","email":"mkaliyam@redhat.com","username":"masco"},"change_message_id":"0365240763e3c1d449c007c8a31a5715f4b1d62d","unresolved":false,"context_lines":[{"line_number":134,"context_line":"                target \u003d self.get_policy_target(request, datum)"},{"line_number":135,"context_line":"                return (policy_check(self.policy_rules, request, target) and"},{"line_number":136,"context_line":"                        self.allowed(request, datum))"},{"line_number":137,"context_line":"            allowed \u003d self.allowed(request, datum)"},{"line_number":138,"context_line":"        except Exception:"},{"line_number":139,"context_line":"            exceptions.handle(request)"},{"line_number":140,"context_line":"            return False"}],"source_content_type":"text/x-python","patch_set":29,"id":"fa32b979_38e993b7","line":137,"updated":"2015-06-18 10:32:10.000000000","message":"(nit)you can return here itself or assign it to a common variable and return finally.","commit_id":"a2bc7affe2d98ebf56ce1b2aa20f4e83c1645c1e"},{"author":{"_account_id":12355,"name":"Vlad Okhrimenko","email":"vokhrimenko@mirantis.com","username":"vokhrimenko"},"change_message_id":"b0e6046a289e405ad4e6d27bf73816623012a7d6","unresolved":false,"context_lines":[{"line_number":134,"context_line":"                target \u003d self.get_policy_target(request, datum)"},{"line_number":135,"context_line":"                return (policy_check(self.policy_rules, request, target) and"},{"line_number":136,"context_line":"                        self.allowed(request, datum))"},{"line_number":137,"context_line":"            allowed \u003d self.allowed(request, datum)"},{"line_number":138,"context_line":"        except Exception:"},{"line_number":139,"context_line":"            exceptions.handle(request)"},{"line_number":140,"context_line":"            return False"}],"source_content_type":"text/x-python","patch_set":29,"id":"fa32b979_8b3615e6","line":137,"in_reply_to":"fa32b979_38e993b7","updated":"2015-06-19 09:51:51.000000000","message":"Done","commit_id":"a2bc7affe2d98ebf56ce1b2aa20f4e83c1645c1e"},{"author":{"_account_id":10442,"name":"Masco Kaliyamoorthy","email":"mkaliyam@redhat.com","username":"masco"},"change_message_id":"e57277e543c5ebd8d9a5eabe3867a62bcae0c24b","unresolved":false,"context_lines":[{"line_number":134,"context_line":"                target \u003d self.get_policy_target(request, datum)"},{"line_number":135,"context_line":"                return (policy_check(self.policy_rules, request, target) and"},{"line_number":136,"context_line":"                        self.allowed(request, datum))"},{"line_number":137,"context_line":"            allowed \u003d self.allowed(request, datum)"},{"line_number":138,"context_line":"        except Exception:"},{"line_number":139,"context_line":"            exceptions.handle(request)"},{"line_number":140,"context_line":"            return False"}],"source_content_type":"text/x-python","patch_set":29,"id":"fa32b979_f17232b0","line":137,"in_reply_to":"fa32b979_8b3615e6","updated":"2015-06-19 09:58:41.000000000","message":"thanks!","commit_id":"a2bc7affe2d98ebf56ce1b2aa20f4e83c1645c1e"},{"author":{"_account_id":1941,"name":"Lin Hua Cheng","email":"os.lcheng@gmail.com","username":"lin-hua-cheng"},"change_message_id":"9a6575a69c8624a33f881b7c557f2ade4dda22ad","unresolved":false,"context_lines":[{"line_number":129,"context_line":""},{"line_number":130,"context_line":"    def _allowed(self, request, datum):"},{"line_number":131,"context_line":"        policy_check \u003d getattr(settings, \"POLICY_CHECK_FUNCTION\", None)"},{"line_number":132,"context_line":"        try:"},{"line_number":133,"context_line":"            if policy_check and self.policy_rules:"},{"line_number":134,"context_line":"                target \u003d self.get_policy_target(request, datum)"},{"line_number":135,"context_line":"                return (policy_check(self.policy_rules, request, target) and"}],"source_content_type":"text/x-python","patch_set":33,"id":"3a50d1a3_73b8a275","line":132,"updated":"2015-07-23 00:30:40.000000000","message":"why do we need the try-except here?","commit_id":"60e79c8aa30577e5f91cd35ce3a96483b84d0a8e"}],"horizon/test/tests/base.py":[{"author":{"_account_id":8984,"name":"George Peristerakis","email":"gperiste@redhat.com","username":"peristeri"},"change_message_id":"38d7451d9d20694eb988380914b8b7336429e84f","unresolved":false,"context_lines":[{"line_number":439,"context_line":"        resp \u003d self.client.get(panel.get_absolute_url(), follow\u003dTrue)"},{"line_number":440,"context_line":"        self.assertEqual(200, resp.status_code)"},{"line_number":441,"context_line":"        self.assertTemplateUsed(resp, \"auth/login.html\")"},{"line_number":442,"context_line":"        # import pdb; pdb.set_trace()"},{"line_number":443,"context_line":"        self.assertContains(resp, \"Login as different user\", 1, 200)"},{"line_number":444,"context_line":""},{"line_number":445,"context_line":"        # Set roles for admin user"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a80dd14_951f0c5b","line":442,"updated":"2015-03-17 21:49:33.000000000","message":"Can you remove this line.","commit_id":"e861d05186bfe5bd1c61860a18a6c874695984ff"}],"openstack_dashboard/dashboards/project/instances/tests.py":[{"author":{"_account_id":8984,"name":"George Peristerakis","email":"gperiste@redhat.com","username":"peristeri"},"change_message_id":"38d7451d9d20694eb988380914b8b7336429e84f","unresolved":false,"context_lines":[{"line_number":937,"context_line":"        url \u003d reverse(\u0027horizon:project:instances:detail\u0027,"},{"line_number":938,"context_line":"                      args\u003d[server.id])"},{"line_number":939,"context_line":"        res \u003d self.client.get(url)"},{"line_number":940,"context_line":"        # import pdb; pdb.set_trace()"},{"line_number":941,"context_line":"        self.assertRedirectsNoFollow(res, INDEX_URL)"},{"line_number":942,"context_line":""},{"line_number":943,"context_line":"    def test_instance_details_flavor_not_found(self):"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a80dd14_f533e8f4","line":940,"updated":"2015-03-17 21:49:33.000000000","message":"same here","commit_id":"e861d05186bfe5bd1c61860a18a6c874695984ff"},{"author":{"_account_id":1941,"name":"Lin Hua Cheng","email":"os.lcheng@gmail.com","username":"lin-hua-cheng"},"change_message_id":"9a6575a69c8624a33f881b7c557f2ade4dda22ad","unresolved":false,"context_lines":[{"line_number":889,"context_line":"                      args\u003d[server.id])"},{"line_number":890,"context_line":"        res \u003d self.client.get(url)"},{"line_number":891,"context_line":""},{"line_number":892,"context_line":"        self.assertEqual(res.status_code, 302)"},{"line_number":893,"context_line":"        self.assertEqual(res._headers.get(\u0027location\u0027, None),"},{"line_number":894,"context_line":"                         (\u0027Location\u0027, settings.TESTSERVER +"},{"line_number":895,"context_line":"                          settings.LOGIN_URL + \u0027?\u0027 +"}],"source_content_type":"text/x-python","patch_set":33,"id":"3a50d1a3_13103e56","line":892,"updated":"2015-07-23 00:30:40.000000000","message":"first argument in assertEquals is the expected value","commit_id":"60e79c8aa30577e5f91cd35ce3a96483b84d0a8e"},{"author":{"_account_id":1941,"name":"Lin Hua Cheng","email":"os.lcheng@gmail.com","username":"lin-hua-cheng"},"change_message_id":"9a6575a69c8624a33f881b7c557f2ade4dda22ad","unresolved":false,"context_lines":[{"line_number":890,"context_line":"        res \u003d self.client.get(url)"},{"line_number":891,"context_line":""},{"line_number":892,"context_line":"        self.assertEqual(res.status_code, 302)"},{"line_number":893,"context_line":"        self.assertEqual(res._headers.get(\u0027location\u0027, None),"},{"line_number":894,"context_line":"                         (\u0027Location\u0027, settings.TESTSERVER +"},{"line_number":895,"context_line":"                          settings.LOGIN_URL + \u0027?\u0027 +"},{"line_number":896,"context_line":"                          REDIRECT_FIELD_NAME + \u0027\u003d\u0027 + url))"}],"source_content_type":"text/x-python","patch_set":33,"id":"3a50d1a3_5e080d28","line":893,"updated":"2015-07-23 00:30:40.000000000","message":"same here","commit_id":"60e79c8aa30577e5f91cd35ce3a96483b84d0a8e"}],"openstack_dashboard/dashboards/project/overview/tests.py":[{"author":{"_account_id":1941,"name":"Lin Hua Cheng","email":"os.lcheng@gmail.com","username":"lin-hua-cheng"},"change_message_id":"9a6575a69c8624a33f881b7c557f2ade4dda22ad","unresolved":false,"context_lines":[{"line_number":158,"context_line":"        url \u003d reverse(\u0027horizon:project:overview:index\u0027)"},{"line_number":159,"context_line":"        res \u003d self.client.get(url)"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"        self.assertEqual(res.status_code, 302)"},{"line_number":162,"context_line":"        self.assertEqual(res._headers.get(\u0027location\u0027, None),"},{"line_number":163,"context_line":"                         (\u0027Location\u0027, settings.TESTSERVER +"},{"line_number":164,"context_line":"                          settings.LOGIN_URL + \u0027?\u0027 +"}],"source_content_type":"text/x-python","patch_set":33,"id":"3a50d1a3_be2cb199","line":161,"updated":"2015-07-23 00:30:40.000000000","message":"same comments here","commit_id":"60e79c8aa30577e5f91cd35ce3a96483b84d0a8e"}]}
