)]}'
{"oslo_policy/shell.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"5e0f9d5dc6988bb1e27459ed37f2bd8bfca6763b","unresolved":false,"context_lines":[{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    \"\"\""},{"line_number":44,"context_line":"    items \u003d []"},{"line_number":45,"context_line":"    for k, v in d.items():"},{"line_number":46,"context_line":"        new_key \u003d parent_key + \u0027.\u0027 + k if parent_key else k"},{"line_number":47,"context_line":"        if isinstance(v, collections.MutableMapping):"},{"line_number":48,"context_line":"            items.extend(flatten(v, new_key).items())"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f79a3b5_8a70b143","line":45,"range":{"start_line":45,"start_character":8,"end_line":45,"end_character":9},"updated":"2018-11-01 10:48:26.000000000","message":"Is it possible for this to the \"other\" string type, e.g. unicode (Python2) or bytes (Python3)? If so, the concatenation below can break. Maybe jsonutils makes sure that can\u0027t happen but I don\u0027t know, personally. In general though, perhaps a test of this function would be helpful?","commit_id":"81f96c87407642ce92ebab31ac73de04d8f80929"}],"oslo_policy/tests/test_shell.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"5e0f9d5dc6988bb1e27459ed37f2bd8bfca6763b","unresolved":false,"context_lines":[{"line_number":78,"context_line":"        is_admin \u003d False"},{"line_number":79,"context_line":"        stdout \u003d self._capture_stdout()"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"        with mock.patch(\"oslo_policy._checks.TrueCheck.__call__\") as call_mock:"},{"line_number":82,"context_line":"            shell.tool(policy_file, access_file, apply_rule, is_admin,"},{"line_number":83,"context_line":"                       target_file)"},{"line_number":84,"context_line":"            access_data[\u0027roles\u0027] \u003d ["}],"source_content_type":"text/x-python","patch_set":4,"id":"3f79a3b5_ea984568","line":81,"range":{"start_line":81,"start_character":0,"end_line":81,"end_character":79},"updated":"2018-11-01 10:48:26.000000000","message":"Decorator","commit_id":"81f96c87407642ce92ebab31ac73de04d8f80929"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"5e0f9d5dc6988bb1e27459ed37f2bd8bfca6763b","unresolved":false,"context_lines":[{"line_number":79,"context_line":"        stdout \u003d self._capture_stdout()"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"        with mock.patch(\"oslo_policy._checks.TrueCheck.__call__\") as call_mock:"},{"line_number":82,"context_line":"            shell.tool(policy_file, access_file, apply_rule, is_admin,"},{"line_number":83,"context_line":"                       target_file)"},{"line_number":84,"context_line":"            access_data[\u0027roles\u0027] \u003d ["},{"line_number":85,"context_line":"                role[\u0027name\u0027] for role in access_data[\u0027roles\u0027]]"},{"line_number":86,"context_line":"            access_data[\u0027project_id\u0027] \u003d access_data[\u0027project\u0027][\u0027id\u0027]"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f79a3b5_2a971d3c","line":83,"range":{"start_line":82,"start_character":0,"end_line":83,"end_character":35},"updated":"2018-11-01 10:48:26.000000000","message":"same comment as previous review - please place this _after_ you\u0027ve built the access_data object. Also, do you actually need to build this object within this scope?","commit_id":"81f96c87407642ce92ebab31ac73de04d8f80929"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"9cd6bea043cbd1a202bbf73e919913b05d02f6c2","unresolved":false,"context_lines":[{"line_number":80,"context_line":"        is_admin \u003d False"},{"line_number":81,"context_line":"        stdout \u003d self._capture_stdout()"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"        access_data[\u0027roles\u0027] \u003d ["},{"line_number":84,"context_line":"            role[\u0027name\u0027] for role in access_data[\u0027roles\u0027]]"},{"line_number":85,"context_line":"        access_data[\u0027project_id\u0027] \u003d access_data[\u0027project\u0027][\u0027id\u0027]"},{"line_number":86,"context_line":"        access_data[\u0027is_admin\u0027] \u003d is_admin"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"        shell.tool(policy_file, access_file, apply_rule, is_admin,"},{"line_number":89,"context_line":"                   target_file)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_eaa35aaf","line":86,"range":{"start_line":83,"start_character":0,"end_line":86,"end_character":42},"updated":"2018-11-01 19:37:35.000000000","message":"nit: all of this could go under line 67","commit_id":"4c0ee1a4f6971cb79e9d17083c986401dc5c1309"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"9cd6bea043cbd1a202bbf73e919913b05d02f6c2","unresolved":false,"context_lines":[{"line_number":121,"context_line":"        self.assertEqual(result, {\"target.secret.project_id\": \"1234\"})"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"    def test_flatten_from_file(self):"},{"line_number":124,"context_line":"        target \u003d {"},{"line_number":125,"context_line":"            \"target\": {"},{"line_number":126,"context_line":"                \"secret\": {"},{"line_number":127,"context_line":"                    \"project_id\": \"1234\""},{"line_number":128,"context_line":"                }"},{"line_number":129,"context_line":"            }"},{"line_number":130,"context_line":"        }"},{"line_number":131,"context_line":"        self.create_config_file("},{"line_number":132,"context_line":"            \"target.json\","},{"line_number":133,"context_line":"            jsonutils.dumps(target))"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_2a839208","line":130,"range":{"start_line":124,"start_character":0,"end_line":130,"end_character":9},"updated":"2018-11-01 19:37:35.000000000","message":"None of these will ever be unicode, I assume?","commit_id":"4c0ee1a4f6971cb79e9d17083c986401dc5c1309"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"9a0e19ca2b3d865a2adb02bfb851eaecd20bcff8","unresolved":false,"context_lines":[{"line_number":110,"context_line":"        self.assertEqual(expected, stdout.getvalue())"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"    def test_flatten_from_dict(self):"},{"line_number":113,"context_line":"        target \u003d {"},{"line_number":114,"context_line":"            \"target\": {"},{"line_number":115,"context_line":"                \"secret\": {"},{"line_number":116,"context_line":"                    \"project_id\": \"1234\""},{"line_number":117,"context_line":"                }"},{"line_number":118,"context_line":"            }"},{"line_number":119,"context_line":"        }"},{"line_number":120,"context_line":"        result \u003d shell.flatten(target)"},{"line_number":121,"context_line":"        self.assertEqual(result, {\"target.secret.project_id\": \"1234\"})"},{"line_number":122,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"3f79a3b5_68d659fb","line":119,"range":{"start_line":113,"start_character":0,"end_line":119,"end_character":9},"updated":"2018-11-02 17:01:04.000000000","message":"Looking into this more, while it\u0027s possible that this would be unicode and would result in errors, those errors would be valid as project IDs can\u0027t include unicode (from what I can tell) and the other keys are defined. LGTM.","commit_id":"f79650325f459e12bbac8f6967dcfabece1de7a4"}],"releasenotes/notes/Pass-target-dict-to-oslopolicy-checker-87185d40aec413ee.yaml":[{"author":{"_account_id":22136,"name":"Harry Rybacki","email":"hrybacki@gmail.com"},"change_message_id":"b92c6bb2ee30ef3100975718a72a101ac5ce65a5","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    oslopolicy-checker was added the ability to pass a file containing a hash"},{"line_number":5,"context_line":"    that represents the target. This makes it possible to check policies that"},{"line_number":6,"context_line":"    have non-conventional targets such as barbican."}],"source_content_type":"text/x-yaml","patch_set":2,"id":"3f79a3b5_fa97e136","line":4,"range":{"start_line":4,"start_character":23,"end_line":4,"end_character":26},"updated":"2018-10-30 13:02:29.000000000","message":"not needed","commit_id":"d69c690c8182eb637ab6a0fb2ee2619b1a84b948"},{"author":{"_account_id":22136,"name":"Harry Rybacki","email":"hrybacki@gmail.com"},"change_message_id":"b92c6bb2ee30ef3100975718a72a101ac5ce65a5","unresolved":false,"context_lines":[{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    oslopolicy-checker was added the ability to pass a file containing a hash"},{"line_number":5,"context_line":"    that represents the target. This makes it possible to check policies that"},{"line_number":6,"context_line":"    have non-conventional targets such as barbican."}],"source_content_type":"text/x-yaml","patch_set":2,"id":"3f79a3b5_9aa4ada6","line":6,"range":{"start_line":6,"start_character":42,"end_line":6,"end_character":50},"updated":"2018-10-30 13:02:29.000000000","message":"s/barbican/Barbican/","commit_id":"d69c690c8182eb637ab6a0fb2ee2619b1a84b948"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"5e0f9d5dc6988bb1e27459ed37f2bd8bfca6763b","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    oslopolicy-checker was added the ability to pass a file containing a hash"},{"line_number":5,"context_line":"    that represents the target. This makes it possible to check policies that"},{"line_number":6,"context_line":"    have non-conventional targets such as barbican."}],"source_content_type":"text/x-yaml","patch_set":4,"id":"3f79a3b5_aaa24d96","line":4,"range":{"start_line":4,"start_character":23,"end_line":4,"end_character":59},"updated":"2018-11-01 10:48:26.000000000","message":"will now accept a file","commit_id":"81f96c87407642ce92ebab31ac73de04d8f80929"}]}
