)]}'
{"neutron/api/v2/base.py":[{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"e62b0eb04f2f0aaf6298f249ecafee54a6b76be8","unresolved":false,"context_lines":[{"line_number":290,"context_line":"                                          parent_id\u003dparent_id),"},{"line_number":291,"context_line":"                               fields_to_strip\u003dadded_fields)}"},{"line_number":292,"context_line":"        except exceptions.PolicyNotAuthorized as e:"},{"line_number":293,"context_line":"            # To avoid giving away information, pretend that it"},{"line_number":294,"context_line":"            # doesn\u0027t exist"},{"line_number":295,"context_line":"            LOG.debug(e)"},{"line_number":296,"context_line":"            msg \u003d _(\u0027The resource could not be found.\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F%2FsaU%3D","line":293,"updated":"2013-10-30 10:52:04.000000000","message":"L293-297 are duplicated in three places. Opportunity to refactor into a helper function?","commit_id":"bd8fc9fdb5328b297d1656ae7cd20f60bc7bd439"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"cbbc8574e0263279777509d91d6039127b99bc89","unresolved":false,"context_lines":[{"line_number":290,"context_line":"                                          parent_id\u003dparent_id),"},{"line_number":291,"context_line":"                               fields_to_strip\u003dadded_fields)}"},{"line_number":292,"context_line":"        except exceptions.PolicyNotAuthorized as e:"},{"line_number":293,"context_line":"            # To avoid giving away information, pretend that it"},{"line_number":294,"context_line":"            # doesn\u0027t exist"},{"line_number":295,"context_line":"            LOG.debug(e)"},{"line_number":296,"context_line":"            msg \u003d _(\u0027The resource could not be found.\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F%2Fqvw%3D","line":293,"in_reply_to":"AAAATn%2F%2FsaU%3D","updated":"2013-10-30 16:41:48.000000000","message":"I can but that was beyond the scope of my change. This one is simple and does not strictly require a unit test :)","commit_id":"bd8fc9fdb5328b297d1656ae7cd20f60bc7bd439"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"change_message_id":"a80f5685915d57c1a98a5895951201128d734523","unresolved":false,"context_lines":[{"line_number":292,"context_line":"        except exceptions.PolicyNotAuthorized as e:"},{"line_number":293,"context_line":"            # To avoid giving away information, pretend that it"},{"line_number":294,"context_line":"            # doesn\u0027t exist"},{"line_number":295,"context_line":"            LOG.debug(e)"},{"line_number":296,"context_line":"            msg \u003d _(\u0027The resource could not be found.\u0027)"},{"line_number":297,"context_line":"            raise webob.exc.HTTPNotFound(msg)"},{"line_number":298,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F%2FtmQ%3D","line":295,"updated":"2013-10-30 03:47:51.000000000","message":"isn\u0027t warning better?","commit_id":"bd8fc9fdb5328b297d1656ae7cd20f60bc7bd439"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"cbbc8574e0263279777509d91d6039127b99bc89","unresolved":false,"context_lines":[{"line_number":292,"context_line":"        except exceptions.PolicyNotAuthorized as e:"},{"line_number":293,"context_line":"            # To avoid giving away information, pretend that it"},{"line_number":294,"context_line":"            # doesn\u0027t exist"},{"line_number":295,"context_line":"            LOG.debug(e)"},{"line_number":296,"context_line":"            msg \u003d _(\u0027The resource could not be found.\u0027)"},{"line_number":297,"context_line":"            raise webob.exc.HTTPNotFound(msg)"},{"line_number":298,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F%2FqwQ%3D","line":295,"in_reply_to":"AAAATn%2F%2FtmQ%3D","updated":"2013-10-30 16:41:48.000000000","message":"This usually comes with coding errors or misconfigurations of the policy.json file that should be caught at dev time, that\u0027s why I chose debug level.","commit_id":"bd8fc9fdb5328b297d1656ae7cd20f60bc7bd439"}],"neutron/policy.py":[{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"4da8b7f1d0b232ec6681d8b80083e98db1aae233","unresolved":false,"context_lines":[{"line_number":338,"context_line":"        Kept for backward compatibility."},{"line_number":339,"context_line":""},{"line_number":340,"context_line":"    :return: Returns True if access is permitted else False."},{"line_number":341,"context_line":"    \"\"\""},{"line_number":342,"context_line":"    return policy.check(*(_prepare_check(context, action, target)))"},{"line_number":343,"context_line":""},{"line_number":344,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2FI%2Bw%3D","line":341,"updated":"2013-11-13 22:17:43.000000000","message":"I think I deserve a LOG too, please...","commit_id":"469e0bd091c855d5160827a6d405c50c7e96a8a5"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"0023e8db78d0a7142888a267c0fc59d279a6b701","unresolved":false,"context_lines":[{"line_number":376,"context_line":"    init()"},{"line_number":377,"context_line":"    rule, target, credentials \u003d _prepare_check(context, action, target)"},{"line_number":378,"context_line":"    result \u003d policy.check(rule, target, credentials, action\u003daction)"},{"line_number":379,"context_line":"    if result is False:"},{"line_number":380,"context_line":"        LOG.debug(_(\"Failure during policy check for \u0027%s\u0027\"), action)"},{"line_number":381,"context_line":"        raise exceptions.PolicyNotAuthorized(action\u003daction)"},{"line_number":382,"context_line":"    return result"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2Fp1Y%3D","line":379,"updated":"2013-10-30 20:06:58.000000000","message":"will \u0027if not result:\u0027 work? such way it\u0027ll look better for boolean.","commit_id":"469e0bd091c855d5160827a6d405c50c7e96a8a5"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"d58a20571ea1654befec3b110b0149fd8749d237","unresolved":false,"context_lines":[{"line_number":376,"context_line":"    init()"},{"line_number":377,"context_line":"    rule, target, credentials \u003d _prepare_check(context, action, target)"},{"line_number":378,"context_line":"    result \u003d policy.check(rule, target, credentials, action\u003daction)"},{"line_number":379,"context_line":"    if result is False:"},{"line_number":380,"context_line":"        LOG.debug(_(\"Failure during policy check for \u0027%s\u0027\"), action)"},{"line_number":381,"context_line":"        raise exceptions.PolicyNotAuthorized(action\u003daction)"},{"line_number":382,"context_line":"    return result"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2FI7E%3D","line":379,"in_reply_to":"AAAATn%2F%2FI%2B8%3D","updated":"2013-11-13 22:40:03.000000000","message":"Done","commit_id":"469e0bd091c855d5160827a6d405c50c7e96a8a5"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"67f4a8947c1885f9e87097a7ffb12c2f310dc9c5","unresolved":false,"context_lines":[{"line_number":376,"context_line":"    init()"},{"line_number":377,"context_line":"    rule, target, credentials \u003d _prepare_check(context, action, target)"},{"line_number":378,"context_line":"    result \u003d policy.check(rule, target, credentials, action\u003daction)"},{"line_number":379,"context_line":"    if result is False:"},{"line_number":380,"context_line":"        LOG.debug(_(\"Failure during policy check for \u0027%s\u0027\"), action)"},{"line_number":381,"context_line":"        raise exceptions.PolicyNotAuthorized(action\u003daction)"},{"line_number":382,"context_line":"    return result"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2Fpq0%3D","line":379,"in_reply_to":"AAAATn%2F%2Fp1Y%3D","updated":"2013-10-30 20:53:06.000000000","message":"I was preserving the same behavior of the test in the underlying function.","commit_id":"469e0bd091c855d5160827a6d405c50c7e96a8a5"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"4da8b7f1d0b232ec6681d8b80083e98db1aae233","unresolved":false,"context_lines":[{"line_number":376,"context_line":"    init()"},{"line_number":377,"context_line":"    rule, target, credentials \u003d _prepare_check(context, action, target)"},{"line_number":378,"context_line":"    result \u003d policy.check(rule, target, credentials, action\u003daction)"},{"line_number":379,"context_line":"    if result is False:"},{"line_number":380,"context_line":"        LOG.debug(_(\"Failure during policy check for \u0027%s\u0027\"), action)"},{"line_number":381,"context_line":"        raise exceptions.PolicyNotAuthorized(action\u003daction)"},{"line_number":382,"context_line":"    return result"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2FI%2B8%3D","line":379,"in_reply_to":"AAAATn%2F%2Fpq0%3D","updated":"2013-11-13 22:17:43.000000000","message":"Policy grammar rules do not mandate returning a boolean, so perhaps the explicit check is worth, albeit not necessary in 99.9999% of cases.","commit_id":"469e0bd091c855d5160827a6d405c50c7e96a8a5"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"4eadc7c337c72fd561baaf8df3eb9776a401a967","unresolved":false,"context_lines":[{"line_number":377,"context_line":"    rule, target, credentials \u003d _prepare_check(context, action, target)"},{"line_number":378,"context_line":"    result \u003d policy.check(rule, target, credentials, action\u003daction)"},{"line_number":379,"context_line":"    if not result:"},{"line_number":380,"context_line":"        LOG.debug(_(\"Failure during policy check for \u0027%s\u0027\"), action)"},{"line_number":381,"context_line":"        raise exceptions.PolicyNotAuthorized(action\u003daction)"},{"line_number":382,"context_line":"    return result"},{"line_number":383,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2FEZY%3D","line":380,"updated":"2013-11-14 21:12:55.000000000","message":"I think non-authorized is not a failure. The message of PolicyNotAuthorized is \"Policy doesn\u0027t allow %(action)s to be performed.\". How about using the same message?","commit_id":"4b0f97ce1c2b52509ecb1892a21ddc402731886d"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"a68099d88b8f38a9a8907a7c93a7fed00b940edd","unresolved":false,"context_lines":[{"line_number":377,"context_line":"    rule, target, credentials \u003d _prepare_check(context, action, target)"},{"line_number":378,"context_line":"    result \u003d policy.check(rule, target, credentials, action\u003daction)"},{"line_number":379,"context_line":"    if not result:"},{"line_number":380,"context_line":"        LOG.debug(_(\"Failure during policy check for \u0027%s\u0027\"), action)"},{"line_number":381,"context_line":"        raise exceptions.PolicyNotAuthorized(action\u003daction)"},{"line_number":382,"context_line":"    return result"},{"line_number":383,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2FDjY%3D","line":380,"in_reply_to":"AAAATn%2F%2FEZY%3D","updated":"2013-11-15 03:21:06.000000000","message":"What I mean is that the policy check has failed. I\u0027ll tweak the wording","commit_id":"4b0f97ce1c2b52509ecb1892a21ddc402731886d"}]}
