)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"07d0bc9cba0e2b2c2765ddab7add227b60834035","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Move default target from context.can() into policy.authorize() so"},{"line_number":10,"context_line":"it is easier to unit test the context behaviour."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"This was note done originally due to this meaning placement avoided the"},{"line_number":13,"context_line":"strange default target, but that is no longer required."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: I23c433dcd459e7f930ac2eb8a3583c857836cae2"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"bfb3d3c7_9c91f5f4","line":12,"range":{"start_line":12,"start_character":9,"end_line":12,"end_character":13},"updated":"2019-05-16 22:55:42.000000000","message":"not","commit_id":"67903a0e14da8160cb5ef5041ef02263a29f82fb"}],"nova/context.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"07d0bc9cba0e2b2c2765ddab7add227b60834035","unresolved":false,"context_lines":[{"line_number":238,"context_line":"        :param action: string representing the action to be checked."},{"line_number":239,"context_line":"        :param target: dictionary representing the object of the action"},{"line_number":240,"context_line":"            for object creation this should be a dictionary representing the"},{"line_number":241,"context_line":"            location of the object e.g. ``{\u0027project_id\u0027: instance.project_id}``."},{"line_number":242,"context_line":"            If None, then this default target will be considered:"},{"line_number":243,"context_line":"            {\u0027project_id\u0027: self.project_id, \u0027user_id\u0027: self.user_id}"},{"line_number":244,"context_line":"        :param fatal: if False, will return False when an exception.Forbidden"}],"source_content_type":"text/x-python","patch_set":1,"id":"bfb3d3c7_5c94dde8","line":241,"range":{"start_line":241,"start_character":79,"end_line":241,"end_character":80},"updated":"2019-05-16 22:55:42.000000000","message":"\u003cgasp\u003e","commit_id":"67903a0e14da8160cb5ef5041ef02263a29f82fb"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"63f182522f4493ec36cb002fa55cccdf146db83d","unresolved":false,"context_lines":[{"line_number":251,"context_line":"            authorized and False if not authorized and fatal is False."},{"line_number":252,"context_line":"        \"\"\""},{"line_number":253,"context_line":"        if target is None:"},{"line_number":254,"context_line":"            target \u003d self.default_target()"},{"line_number":255,"context_line":""},{"line_number":256,"context_line":"        try:"},{"line_number":257,"context_line":"            return policy.authorize(self, action, target)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9fb8cfa7_0f059777","side":"PARENT","line":254,"updated":"2019-06-04 19:41:15.000000000","message":"I think placement still has something like this, no?\n\nhttps://opendev.org/openstack/placement/src/branch/master/placement/context.py#L48-L50\n\nI suppose that\u0027ll be updated separately.","commit_id":"1459e8edb9681537b263bd6fccfb7b9cbe12d923"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"223de87c0af3528835df20e376f1db700cddc07a","unresolved":false,"context_lines":[{"line_number":250,"context_line":"            authorized and False if not authorized and fatal is False."},{"line_number":251,"context_line":"        \"\"\""},{"line_number":252,"context_line":"        try:"},{"line_number":253,"context_line":"            return policy.authorize(self, action, target)"},{"line_number":254,"context_line":"        except exception.Forbidden:"},{"line_number":255,"context_line":"            if fatal:"},{"line_number":256,"context_line":"                raise"}],"source_content_type":"text/x-python","patch_set":2,"id":"7faddb67_e0dd6914","line":253,"range":{"start_line":253,"start_character":50,"end_line":253,"end_character":56},"updated":"2019-07-11 16:14:37.000000000","message":"Now that this is a kwarg, prefer naming it.\n\nHere and the 20 usages in test_policy.py and the one in test_serversV21.py","commit_id":"06c0fd4fd2f1616d9b36c9d6fa934f3a45527ed7"}],"nova/policy.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"07d0bc9cba0e2b2c2765ddab7add227b60834035","unresolved":false,"context_lines":[{"line_number":157,"context_line":"    if not exc:"},{"line_number":158,"context_line":"        exc \u003d exception.PolicyNotAuthorized"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"    # Legacy fallback for emtpy target from context.can()"},{"line_number":161,"context_line":"    # should be removed once we improve testing and scope checks"},{"line_number":162,"context_line":"    if target is None:"},{"line_number":163,"context_line":"        target \u003d {\u0027project_id\u0027: context.project_id,"}],"source_content_type":"text/x-python","patch_set":1,"id":"bfb3d3c7_9cfc953f","line":160,"range":{"start_line":160,"start_character":26,"end_line":160,"end_character":31},"updated":"2019-05-16 22:55:42.000000000","message":"empty","commit_id":"67903a0e14da8160cb5ef5041ef02263a29f82fb"}],"nova/tests/unit/test_context.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"07d0bc9cba0e2b2c2765ddab7add227b60834035","unresolved":false,"context_lines":[{"line_number":217,"context_line":"        self.assertTrue(result)"},{"line_number":218,"context_line":"        mock_authorize.assert_called_once_with("},{"line_number":219,"context_line":"          ctxt, mock.sentinel.rule,"},{"line_number":220,"context_line":"          {\u0027project_id\u0027: ctxt.project_id, \u0027user_id\u0027: ctxt.user_id})"},{"line_number":221,"context_line":""},{"line_number":222,"context_line":"    @mock.patch.object(context.policy, \u0027authorize\u0027)"},{"line_number":223,"context_line":"    def test_can_fatal(self, mock_authorize):"}],"source_content_type":"text/x-python","patch_set":1,"id":"bfb3d3c7_bca71950","line":220,"range":{"start_line":220,"start_character":10,"end_line":220,"end_character":66},"updated":"2019-05-16 22:55:42.000000000","message":"None","commit_id":"67903a0e14da8160cb5ef5041ef02263a29f82fb"}],"nova/tests/unit/test_policy.py":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"63f182522f4493ec36cb002fa55cccdf146db83d","unresolved":false,"context_lines":[{"line_number":136,"context_line":"        policy.authorize(self.context, action, target_mine)"},{"line_number":137,"context_line":"        # check we fallback to context.project_id"},{"line_number":138,"context_line":"        # TODO(johngarbutt): longer term we need to remove this and make"},{"line_number":139,"context_line":"        #  the target a required param."},{"line_number":140,"context_line":"        policy.authorize(self.context, action)"},{"line_number":141,"context_line":"        self.assertRaises(exception.PolicyNotAuthorized, policy.authorize,"},{"line_number":142,"context_line":"                          self.context, action, target_not_mine)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9fb8cfa7_4f194fd5","line":139,"updated":"2019-06-04 19:41:15.000000000","message":"++","commit_id":"06c0fd4fd2f1616d9b36c9d6fa934f3a45527ed7"}]}
