)]}'
{"keystone/application_credential/core.py":[{"author":{"_account_id":28032,"name":"Oleksiy Petrenko","email":"opetrenko@mirantis.com","username":"enacero"},"change_message_id":"6e282e4ea1c29e30d4f047ba22b46b37188f8600","unresolved":false,"context_lines":[{"line_number":126,"context_line":"                        rule[\u0027path_format\u0027] \u003d\u003d \u0027{**}\u0027) and"},{"line_number":127,"context_line":"                    (capability[\u0027request_method\u0027] \u003d\u003d rule[\u0027method\u0027] or"},{"line_number":128,"context_line":"                        rule[\u0027method\u0027] \u003d\u003d \u0027any\u0027)):"},{"line_number":129,"context_line":"                    valid \u003d True"},{"line_number":130,"context_line":"                    break"},{"line_number":131,"context_line":"            if not valid:"},{"line_number":132,"context_line":"                raise exception.CapabilityNotAllowed"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"    def create_application_credential(self, application_credential,"},{"line_number":135,"context_line":"                                      initiator\u003dNone):"}],"source_content_type":"text/x-python","patch_set":7,"id":"9fdfeff1_526b89ef","line":132,"range":{"start_line":129,"start_character":20,"end_line":132,"end_character":52},"updated":"2019-02-01 16:22:44.000000000","message":"maybe \n`valid \u003d True\n break`\ncan be simplified to `return`\nand \n`if not valid` line can be removed since if validation is successful we will simply return before this line","commit_id":"3a37d64f55bcdbcabbd6dbee5a398cf90bc0dd32"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"3e3085cd02ac3a9b409d9e1a0cd575c549eefff3","unresolved":false,"context_lines":[{"line_number":126,"context_line":"                        rule[\u0027path_format\u0027] \u003d\u003d \u0027{**}\u0027) and"},{"line_number":127,"context_line":"                    (capability[\u0027request_method\u0027] \u003d\u003d rule[\u0027method\u0027] or"},{"line_number":128,"context_line":"                        rule[\u0027method\u0027] \u003d\u003d \u0027any\u0027)):"},{"line_number":129,"context_line":"                    valid \u003d True"},{"line_number":130,"context_line":"                    break"},{"line_number":131,"context_line":"            if not valid:"},{"line_number":132,"context_line":"                raise exception.CapabilityNotAllowed"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"    def create_application_credential(self, application_credential,"},{"line_number":135,"context_line":"                                      initiator\u003dNone):"}],"source_content_type":"text/x-python","patch_set":7,"id":"9fdfeff1_8f270c13","line":132,"range":{"start_line":129,"start_character":20,"end_line":132,"end_character":52},"in_reply_to":"9fdfeff1_526b89ef","updated":"2019-02-09 18:31:16.000000000","message":"The problem with that is I need to validate every item in capabilities, so while it is safe to break out of the inner loop after finding one match, it\u0027s not safe to exit the function because I still need to complete the outer loop.","commit_id":"3a37d64f55bcdbcabbd6dbee5a398cf90bc0dd32"}],"keystone/tests/unit/application_credential/test_backends.py":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"3fb710b659443caa9c03f2cc28cdc3904cd7064b","unresolved":false,"context_lines":[{"line_number":123,"context_line":"        orig_access_rules \u003d app_cred.pop(\u0027access_rules\u0027)"},{"line_number":124,"context_line":"        self.assertDictEqual(app_cred, resp)"},{"line_number":125,"context_line":"        for i, ar in enumerate(resp_access_rules):"},{"line_number":126,"context_line":"            self.assertDictEqual(orig_access_rules[i], ar)"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"    def test_get_application_credential(self):"},{"line_number":129,"context_line":"        app_cred \u003d self._new_app_cred_data(self.user_foo[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":19,"id":"9fdfeff1_c66fe48f","line":126,"updated":"2019-02-27 19:17:17.000000000","message":"We can test that we get an example if we supply an access rule that hasn\u0027t been configured, too.","commit_id":"c0cfb0a5b4db3d78f91f3b07583fa5c0e1b09a7d"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"496ce854f72082dcbb3d03616af8144861bbc6df","unresolved":false,"context_lines":[{"line_number":123,"context_line":"        orig_access_rules \u003d app_cred.pop(\u0027access_rules\u0027)"},{"line_number":124,"context_line":"        self.assertDictEqual(app_cred, resp)"},{"line_number":125,"context_line":"        for i, ar in enumerate(resp_access_rules):"},{"line_number":126,"context_line":"            self.assertDictEqual(orig_access_rules[i], ar)"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"    def test_get_application_credential(self):"},{"line_number":129,"context_line":"        app_cred \u003d self._new_app_cred_data(self.user_foo[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":19,"id":"5fc1f717_34631adf","line":126,"in_reply_to":"9fdfeff1_a22cc301","updated":"2019-03-06 19:58:55.000000000","message":"Yeah - exactly. Thanks for adding that as a test!","commit_id":"c0cfb0a5b4db3d78f91f3b07583fa5c0e1b09a7d"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"f1788eddfda5073d6a77de158d651a3efb5df0c0","unresolved":false,"context_lines":[{"line_number":123,"context_line":"        orig_access_rules \u003d app_cred.pop(\u0027access_rules\u0027)"},{"line_number":124,"context_line":"        self.assertDictEqual(app_cred, resp)"},{"line_number":125,"context_line":"        for i, ar in enumerate(resp_access_rules):"},{"line_number":126,"context_line":"            self.assertDictEqual(orig_access_rules[i], ar)"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"    def test_get_application_credential(self):"},{"line_number":129,"context_line":"        app_cred \u003d self._new_app_cred_data(self.user_foo[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":19,"id":"9fdfeff1_a22cc301","line":126,"in_reply_to":"9fdfeff1_c66fe48f","updated":"2019-03-03 17:43:30.000000000","message":"You mean get an exception? done","commit_id":"c0cfb0a5b4db3d78f91f3b07583fa5c0e1b09a7d"}]}
