)]}'
{"ceilometer/api/controllers/v2.py":[{"author":{"_account_id":8290,"name":"liusheng","email":"liusheng2048@gmail.com","username":"LiuSheng"},"change_message_id":"8445dda31eb715cc7592dc44c302e8dbd91bdf01","unresolved":false,"context_lines":[{"line_number":2043,"context_line":"        def _set_ownership(aspect, owner_limitation, header):"},{"line_number":2044,"context_line":"            attr \u003d \u0027%s_id\u0027 % aspect"},{"line_number":2045,"context_line":"            requested_owner \u003d getattr(data, attr)"},{"line_number":2046,"context_line":"            explicit_owner \u003d requested_owner !\u003d wtypes.Unset"},{"line_number":2047,"context_line":"            caller \u003d pecan.request.headers.get(header)"},{"line_number":2048,"context_line":"            if (owner_limitation and explicit_owner"},{"line_number":2049,"context_line":"                    and requested_owner !\u003d caller):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAWH%2F%2BXcc%3D","line":2046,"updated":"2014-03-27 10:44:10.000000000","message":"\"explicit_owner \u003d requested_owner !\u003d wtypes.Unset  \n      ....  and explicit_owner\"\n\nthis is redundant, if requested_owner \u003d\u003d wtypes.Unset , \nrequested_owner !\u003d caller.\n\nCheers\nliu sheng","commit_id":"e538f84cfe8ef4f63c854a9b258c367d254a667b"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"7fd7bc241686b5a6e1cde307606943494c244cac","unresolved":false,"context_lines":[{"line_number":2043,"context_line":"        def _set_ownership(aspect, owner_limitation, header):"},{"line_number":2044,"context_line":"            attr \u003d \u0027%s_id\u0027 % aspect"},{"line_number":2045,"context_line":"            requested_owner \u003d getattr(data, attr)"},{"line_number":2046,"context_line":"            explicit_owner \u003d requested_owner !\u003d wtypes.Unset"},{"line_number":2047,"context_line":"            caller \u003d pecan.request.headers.get(header)"},{"line_number":2048,"context_line":"            if (owner_limitation and explicit_owner"},{"line_number":2049,"context_line":"                    and requested_owner !\u003d caller):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAWH%2F%2BXWA%3D","line":2046,"in_reply_to":"AAAAWH%2F%2BXcc%3D","updated":"2014-03-27 11:04:36.000000000","message":"Yeah but I only want to compared the requested_owner to the caller if and only if requested_owner is actually set.","commit_id":"e538f84cfe8ef4f63c854a9b258c367d254a667b"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"f220e1a9a43c09c1d4aa0caf0f48cd2267988abf","unresolved":false,"context_lines":[{"line_number":2044,"context_line":"            attr \u003d \u0027%s_id\u0027 % aspect"},{"line_number":2045,"context_line":"            requested_owner \u003d getattr(data, attr)"},{"line_number":2046,"context_line":"            explicit_owner \u003d requested_owner !\u003d wtypes.Unset"},{"line_number":2047,"context_line":"            caller \u003d pecan.request.headers.get(header)"},{"line_number":2048,"context_line":"            if (owner_limitation and explicit_owner"},{"line_number":2049,"context_line":"                    and requested_owner !\u003d caller):"},{"line_number":2050,"context_line":"                raise ProjectNotAuthorized(requested_owner, aspect)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAWH%2F%2BVgI%3D","line":2047,"updated":"2014-03-27 14:53:17.000000000","message":"one last (possibly stupid) question. are caller and owner_limitation the same value here? they both seem to pull X-\u003ctarget\u003e-Id from header","commit_id":"e538f84cfe8ef4f63c854a9b258c367d254a667b"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"5d669ffb84f98d1522cf65892ce62a6f7a168194","unresolved":false,"context_lines":[{"line_number":2044,"context_line":"            attr \u003d \u0027%s_id\u0027 % aspect"},{"line_number":2045,"context_line":"            requested_owner \u003d getattr(data, attr)"},{"line_number":2046,"context_line":"            explicit_owner \u003d requested_owner !\u003d wtypes.Unset"},{"line_number":2047,"context_line":"            caller \u003d pecan.request.headers.get(header)"},{"line_number":2048,"context_line":"            if (owner_limitation and explicit_owner"},{"line_number":2049,"context_line":"                    and requested_owner !\u003d caller):"},{"line_number":2050,"context_line":"                raise ProjectNotAuthorized(requested_owner, aspect)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAWH%2F%2BVeM%3D","line":2047,"in_reply_to":"AAAAWH%2F%2BVgI%3D","updated":"2014-03-27 14:57:28.000000000","message":"Yes, except that the owner_limitation is also \"admin aware\" (in the sense that the owner_limitation will be None in the case of an admin role, hence short-circuiting the remainder of the if condition on line 2048).","commit_id":"e538f84cfe8ef4f63c854a9b258c367d254a667b"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"03a693818b391ae0309c9cac874d1b27ce94e46b","unresolved":false,"context_lines":[{"line_number":2045,"context_line":"            requested_owner \u003d getattr(data, attr)"},{"line_number":2046,"context_line":"            explicit_owner \u003d requested_owner !\u003d wtypes.Unset"},{"line_number":2047,"context_line":"            caller \u003d pecan.request.headers.get(header)"},{"line_number":2048,"context_line":"            if (owner_limitation and explicit_owner"},{"line_number":2049,"context_line":"                    and requested_owner !\u003d caller):"},{"line_number":2050,"context_line":"                raise ProjectNotAuthorized(requested_owner, aspect)"},{"line_number":2051,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAWH%2F%2BV2Q%3D","line":2048,"updated":"2014-03-27 14:13:48.000000000","message":"i don\u0027t quite understand this condition. seems like we\u0027re comparing a boolean (owner_limitation and explicit_owner and requested_owner) to a string (caller)","commit_id":"e538f84cfe8ef4f63c854a9b258c367d254a667b"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"52566a30c6885b0b37599c14aa49ef0e840b809e","unresolved":false,"context_lines":[{"line_number":2045,"context_line":"            requested_owner \u003d getattr(data, attr)"},{"line_number":2046,"context_line":"            explicit_owner \u003d requested_owner !\u003d wtypes.Unset"},{"line_number":2047,"context_line":"            caller \u003d pecan.request.headers.get(header)"},{"line_number":2048,"context_line":"            if (owner_limitation and explicit_owner"},{"line_number":2049,"context_line":"                    and requested_owner !\u003d caller):"},{"line_number":2050,"context_line":"                raise ProjectNotAuthorized(requested_owner, aspect)"},{"line_number":2051,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAWH%2F%2BVmI%3D","line":2048,"in_reply_to":"AAAAWH%2F%2BV2Q%3D","updated":"2014-03-27 14:45:28.000000000","message":"Well the !\u003d operator has higher precedence (tighter binding) that the logical and operator in python.\n\nSo IIUC the following:\n\n   (owner_limitation and explicit_owner and requested_owner !\u003d caller)\n\nequates to:\n\n   (owner_limitation and explicit_owner and (requested_owner !\u003d caller))\n\ni.e. the boolean result of the comparison between the requested_owner and caller strings is logically conjoined with the other two booleans if these are already evaluated as true (otherwise the comparison is short-circuited).","commit_id":"e538f84cfe8ef4f63c854a9b258c367d254a667b"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"f220e1a9a43c09c1d4aa0caf0f48cd2267988abf","unresolved":false,"context_lines":[{"line_number":2045,"context_line":"            requested_owner \u003d getattr(data, attr)"},{"line_number":2046,"context_line":"            explicit_owner \u003d requested_owner !\u003d wtypes.Unset"},{"line_number":2047,"context_line":"            caller \u003d pecan.request.headers.get(header)"},{"line_number":2048,"context_line":"            if (owner_limitation and explicit_owner"},{"line_number":2049,"context_line":"                    and requested_owner !\u003d caller):"},{"line_number":2050,"context_line":"                raise ProjectNotAuthorized(requested_owner, aspect)"},{"line_number":2051,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAWH%2F%2BVjA%3D","line":2048,"in_reply_to":"AAAAWH%2F%2BVmI%3D","updated":"2014-03-27 14:53:17.000000000","message":"... ignore the stupid question. let\u0027s pretend like this didn\u0027t happen :)","commit_id":"e538f84cfe8ef4f63c854a9b258c367d254a667b"},{"author":{"_account_id":7478,"name":"Nadya Shakhat","email":"nadmi4@gmail.com","username":"nprivalova"},"change_message_id":"b0aea9da1c6b9b1d62d06eeb446e910643d0108f","unresolved":false,"context_lines":[{"line_number":2046,"context_line":"            explicit_owner \u003d requested_owner !\u003d wtypes.Unset"},{"line_number":2047,"context_line":"            caller \u003d pecan.request.headers.get(header)"},{"line_number":2048,"context_line":"            if (owner_limitation and explicit_owner"},{"line_number":2049,"context_line":"                    and requested_owner !\u003d caller):"},{"line_number":2050,"context_line":"                raise ProjectNotAuthorized(requested_owner, aspect)"},{"line_number":2051,"context_line":""},{"line_number":2052,"context_line":"            actual_owner \u003d (owner_limitation or"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAWH%2F%2BX7U%3D","line":2049,"updated":"2014-03-27 09:22:34.000000000","message":"We will get error like:\"Not Authorized to access user 1234567\". I think we should fix it. I guess we need 3 params in error: 1. aspect 2. \"aspect_id\" 3. Who is trying to authorize. Please correct me if I\u0027m wrong","commit_id":"e538f84cfe8ef4f63c854a9b258c367d254a667b"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"53f844d08cb3aee2241c044d51035c59fbc9b060","unresolved":false,"context_lines":[{"line_number":2046,"context_line":"            explicit_owner \u003d requested_owner !\u003d wtypes.Unset"},{"line_number":2047,"context_line":"            caller \u003d pecan.request.headers.get(header)"},{"line_number":2048,"context_line":"            if (owner_limitation and explicit_owner"},{"line_number":2049,"context_line":"                    and requested_owner !\u003d caller):"},{"line_number":2050,"context_line":"                raise ProjectNotAuthorized(requested_owner, aspect)"},{"line_number":2051,"context_line":""},{"line_number":2052,"context_line":"            actual_owner \u003d (owner_limitation or"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAWH%2F%2BXsQ%3D","line":2049,"in_reply_to":"AAAAWH%2F%2BX7U%3D","updated":"2014-03-27 10:00:28.000000000","message":"We already use that style of error if a non-admin for example tries to query another tenant\u0027s stats.\n\nI think the reasoning here is that the caller doesn\u0027t need to be identified in the error message as this is implicit, i.e. they already know who they are.","commit_id":"e538f84cfe8ef4f63c854a9b258c367d254a667b"},{"author":{"_account_id":7478,"name":"Nadya Shakhat","email":"nadmi4@gmail.com","username":"nprivalova"},"change_message_id":"253fe35d7d78ac32071634fa4e8c6c67d0f95a13","unresolved":false,"context_lines":[{"line_number":2046,"context_line":"            explicit_owner \u003d requested_owner !\u003d wtypes.Unset"},{"line_number":2047,"context_line":"            caller \u003d pecan.request.headers.get(header)"},{"line_number":2048,"context_line":"            if (owner_limitation and explicit_owner"},{"line_number":2049,"context_line":"                    and requested_owner !\u003d caller):"},{"line_number":2050,"context_line":"                raise ProjectNotAuthorized(requested_owner, aspect)"},{"line_number":2051,"context_line":""},{"line_number":2052,"context_line":"            actual_owner \u003d (owner_limitation or"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAWH%2F%2BXQk%3D","line":2049,"in_reply_to":"AAAAWH%2F%2BXsQ%3D","updated":"2014-03-27 11:16:42.000000000","message":"Ah, I see. Don\u0027t like the phrase \"access user\". But don\u0027t think it\u0027s critical","commit_id":"e538f84cfe8ef4f63c854a9b258c367d254a667b"}],"ceilometer/tests/api/v2/test_alarm_scenarios.py":[{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"2543ef531f60f70810afe81e0fbc88fdc3e0a160","unresolved":false,"context_lines":[{"line_number":862,"context_line":"        self._verify_alarm(json, alarms[0], \u0027added_alarm\u0027)"},{"line_number":863,"context_line":""},{"line_number":864,"context_line":"    def _do_test_post_alarm_as_nonadmin_on_behalf_of_another(self, aspect, id):"},{"line_number":865,"context_line":"        \"\"\"Test that posting a alarm as non-admin on behalf of another"},{"line_number":866,"context_line":"        user/project fails with a an explicit 401 instead of reverting"},{"line_number":867,"context_line":"        to the requestor\u0027s identity."},{"line_number":868,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F%2Be%2BU%3D","line":865,"updated":"2014-03-26 14:33:44.000000000","message":"s/a/an/","commit_id":"cbe6f798c74c31f8957c09c3d038509987af1d14"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"6c84999b3714f1cc31441cd1c916793872f5002b","unresolved":false,"context_lines":[{"line_number":862,"context_line":"        self._verify_alarm(json, alarms[0], \u0027added_alarm\u0027)"},{"line_number":863,"context_line":""},{"line_number":864,"context_line":"    def _do_test_post_alarm_as_nonadmin_on_behalf_of_another(self, aspect, id):"},{"line_number":865,"context_line":"        \"\"\"Test that posting a alarm as non-admin on behalf of another"},{"line_number":866,"context_line":"        user/project fails with a an explicit 401 instead of reverting"},{"line_number":867,"context_line":"        to the requestor\u0027s identity."},{"line_number":868,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F%2Bdqc%3D","line":865,"in_reply_to":"AAAAWH%2F%2Be%2BU%3D","updated":"2014-03-26 16:52:38.000000000","message":"Done","commit_id":"cbe6f798c74c31f8957c09c3d038509987af1d14"},{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"2543ef531f60f70810afe81e0fbc88fdc3e0a160","unresolved":false,"context_lines":[{"line_number":863,"context_line":""},{"line_number":864,"context_line":"    def _do_test_post_alarm_as_nonadmin_on_behalf_of_another(self, aspect, id):"},{"line_number":865,"context_line":"        \"\"\"Test that posting a alarm as non-admin on behalf of another"},{"line_number":866,"context_line":"        user/project fails with a an explicit 401 instead of reverting"},{"line_number":867,"context_line":"        to the requestor\u0027s identity."},{"line_number":868,"context_line":"        \"\"\""},{"line_number":869,"context_line":"        json \u003d {"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F%2Be9w%3D","line":866,"updated":"2014-03-26 14:33:44.000000000","message":"delete the additional \u0027a\u0027","commit_id":"cbe6f798c74c31f8957c09c3d038509987af1d14"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"6c84999b3714f1cc31441cd1c916793872f5002b","unresolved":false,"context_lines":[{"line_number":863,"context_line":""},{"line_number":864,"context_line":"    def _do_test_post_alarm_as_nonadmin_on_behalf_of_another(self, aspect, id):"},{"line_number":865,"context_line":"        \"\"\"Test that posting a alarm as non-admin on behalf of another"},{"line_number":866,"context_line":"        user/project fails with a an explicit 401 instead of reverting"},{"line_number":867,"context_line":"        to the requestor\u0027s identity."},{"line_number":868,"context_line":"        \"\"\""},{"line_number":869,"context_line":"        json \u003d {"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F%2BdqY%3D","line":866,"in_reply_to":"AAAAWH%2F%2Be9w%3D","updated":"2014-03-26 16:52:38.000000000","message":"Done","commit_id":"cbe6f798c74c31f8957c09c3d038509987af1d14"},{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"2543ef531f60f70810afe81e0fbc88fdc3e0a160","unresolved":false,"context_lines":[{"line_number":906,"context_line":"                                                                  id)"},{"line_number":907,"context_line":""},{"line_number":908,"context_line":"    def _do_test_post_alarm_as_nonadmin_on_behalf_of_self(self, aspect, id):"},{"line_number":909,"context_line":"        \"\"\"Test posting a alarm as non-admin on behalf of own user/project"},{"line_number":910,"context_line":"        creates alarm associated with the requestor\u0027s identity."},{"line_number":911,"context_line":"        \"\"\""},{"line_number":912,"context_line":"        json \u003d {"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F%2Be9g%3D","line":909,"updated":"2014-03-26 14:33:44.000000000","message":"s/a/an/","commit_id":"cbe6f798c74c31f8957c09c3d038509987af1d14"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"6c84999b3714f1cc31441cd1c916793872f5002b","unresolved":false,"context_lines":[{"line_number":906,"context_line":"                                                                  id)"},{"line_number":907,"context_line":""},{"line_number":908,"context_line":"    def _do_test_post_alarm_as_nonadmin_on_behalf_of_self(self, aspect, id):"},{"line_number":909,"context_line":"        \"\"\"Test posting a alarm as non-admin on behalf of own user/project"},{"line_number":910,"context_line":"        creates alarm associated with the requestor\u0027s identity."},{"line_number":911,"context_line":"        \"\"\""},{"line_number":912,"context_line":"        json \u003d {"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F%2BdqQ%3D","line":909,"in_reply_to":"AAAAWH%2F%2Be9g%3D","updated":"2014-03-26 16:52:38.000000000","message":"Done","commit_id":"cbe6f798c74c31f8957c09c3d038509987af1d14"},{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"2543ef531f60f70810afe81e0fbc88fdc3e0a160","unresolved":false,"context_lines":[{"line_number":909,"context_line":"        \"\"\"Test posting a alarm as non-admin on behalf of own user/project"},{"line_number":910,"context_line":"        creates alarm associated with the requestor\u0027s identity."},{"line_number":911,"context_line":"        \"\"\""},{"line_number":912,"context_line":"        json \u003d {"},{"line_number":913,"context_line":"            \u0027%s_id\u0027 % aspect: id,"},{"line_number":914,"context_line":"            \u0027name\u0027: \u0027added_alarm\u0027,"},{"line_number":915,"context_line":"            \u0027enabled\u0027: False,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F%2Be80%3D","line":912,"updated":"2014-03-26 14:33:44.000000000","message":"As it is the same dict as above, it would be good to use it from a  common place.","commit_id":"cbe6f798c74c31f8957c09c3d038509987af1d14"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"6c84999b3714f1cc31441cd1c916793872f5002b","unresolved":false,"context_lines":[{"line_number":909,"context_line":"        \"\"\"Test posting a alarm as non-admin on behalf of own user/project"},{"line_number":910,"context_line":"        creates alarm associated with the requestor\u0027s identity."},{"line_number":911,"context_line":"        \"\"\""},{"line_number":912,"context_line":"        json \u003d {"},{"line_number":913,"context_line":"            \u0027%s_id\u0027 % aspect: id,"},{"line_number":914,"context_line":"            \u0027name\u0027: \u0027added_alarm\u0027,"},{"line_number":915,"context_line":"            \u0027enabled\u0027: False,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F%2BdZk%3D","line":912,"in_reply_to":"AAAAWH%2F%2Be80%3D","updated":"2014-03-26 16:52:38.000000000","message":"Done","commit_id":"cbe6f798c74c31f8957c09c3d038509987af1d14"},{"author":{"_account_id":7478,"name":"Nadya Shakhat","email":"nadmi4@gmail.com","username":"nprivalova"},"change_message_id":"a99014dc2e1175e95eab1d61bfbce6844f25792b","unresolved":false,"context_lines":[{"line_number":863,"context_line":""},{"line_number":864,"context_line":"    @staticmethod"},{"line_number":865,"context_line":"    def _alarm_representation_owned_by(aspect, id):"},{"line_number":866,"context_line":"        return {"},{"line_number":867,"context_line":"            \u0027%s_id\u0027 % aspect: id,"},{"line_number":868,"context_line":"            \u0027name\u0027: \u0027added_alarm\u0027,"},{"line_number":869,"context_line":"            \u0027enabled\u0027: False,"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2BcXo%3D","line":866,"updated":"2014-03-26 19:03:59.000000000","message":"don\u0027t you need a case with \"project_id\" AND \"user_id\"?","commit_id":"8f2d4fdbd18de7ef2fcaba68d3d74080b9e2fe7a"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"eed79c21d6139da10f7f63edea2483ec2e837501","unresolved":false,"context_lines":[{"line_number":863,"context_line":""},{"line_number":864,"context_line":"    @staticmethod"},{"line_number":865,"context_line":"    def _alarm_representation_owned_by(aspect, id):"},{"line_number":866,"context_line":"        return {"},{"line_number":867,"context_line":"            \u0027%s_id\u0027 % aspect: id,"},{"line_number":868,"context_line":"            \u0027name\u0027: \u0027added_alarm\u0027,"},{"line_number":869,"context_line":"            \u0027enabled\u0027: False,"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2BYc0%3D","line":866,"in_reply_to":"AAAAWH%2F%2BcXo%3D","updated":"2014-03-27 07:39:47.000000000","message":"Fair point ... I\u0027m not sure that it would really add that much to the coverage, but I\u0027ll put it in anyway for completeness.","commit_id":"8f2d4fdbd18de7ef2fcaba68d3d74080b9e2fe7a"},{"author":{"_account_id":7478,"name":"Nadya Shakhat","email":"nadmi4@gmail.com","username":"nprivalova"},"change_message_id":"a99014dc2e1175e95eab1d61bfbce6844f25792b","unresolved":false,"context_lines":[{"line_number":920,"context_line":"        alarms \u003d list(self.conn.get_alarms(enabled\u003dFalse))"},{"line_number":921,"context_line":"        self.assertEqual(1, len(alarms))"},{"line_number":922,"context_line":"        self.assertEqual(alarms[0].user_id,"},{"line_number":923,"context_line":"                         self.auth_headers[\u0027X-User-Id\u0027])"},{"line_number":924,"context_line":"        self.assertEqual(alarms[0].project_id,"},{"line_number":925,"context_line":"                         self.auth_headers[\u0027X-Project-Id\u0027])"},{"line_number":926,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2BcVU%3D","line":923,"updated":"2014-03-26 19:03:59.000000000","message":"How can we verify that in case of test_post_alarm_as_nonadmin_on_behalf_of_own_user? It seems that alarms[0] contains user_id not because of json \u003d self._alarm_representation_owned_by(user, user_id) but only because of headers. Is it the truth?\nNot clear with headers :( Looks like they are not applied if user_id and project_id are set explicitly.\n\nSo the main concern: we define in json only user_id or project_id but here we check both.","commit_id":"8f2d4fdbd18de7ef2fcaba68d3d74080b9e2fe7a"},{"author":{"_account_id":7478,"name":"Nadya Shakhat","email":"nadmi4@gmail.com","username":"nprivalova"},"change_message_id":"352ff2876998a0d2a231c7c751f9b9f75c8e2e72","unresolved":false,"context_lines":[{"line_number":920,"context_line":"        alarms \u003d list(self.conn.get_alarms(enabled\u003dFalse))"},{"line_number":921,"context_line":"        self.assertEqual(1, len(alarms))"},{"line_number":922,"context_line":"        self.assertEqual(alarms[0].user_id,"},{"line_number":923,"context_line":"                         self.auth_headers[\u0027X-User-Id\u0027])"},{"line_number":924,"context_line":"        self.assertEqual(alarms[0].project_id,"},{"line_number":925,"context_line":"                         self.auth_headers[\u0027X-Project-Id\u0027])"},{"line_number":926,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2BX6g%3D","line":923,"in_reply_to":"AAAAWH%2F%2BYa8%3D","updated":"2014-03-27 09:23:26.000000000","message":"Yep, thanks foe explanation!","commit_id":"8f2d4fdbd18de7ef2fcaba68d3d74080b9e2fe7a"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"eed79c21d6139da10f7f63edea2483ec2e837501","unresolved":false,"context_lines":[{"line_number":920,"context_line":"        alarms \u003d list(self.conn.get_alarms(enabled\u003dFalse))"},{"line_number":921,"context_line":"        self.assertEqual(1, len(alarms))"},{"line_number":922,"context_line":"        self.assertEqual(alarms[0].user_id,"},{"line_number":923,"context_line":"                         self.auth_headers[\u0027X-User-Id\u0027])"},{"line_number":924,"context_line":"        self.assertEqual(alarms[0].project_id,"},{"line_number":925,"context_line":"                         self.auth_headers[\u0027X-Project-Id\u0027])"},{"line_number":926,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2BYa8%3D","line":923,"in_reply_to":"AAAAWH%2F%2BcVU%3D","updated":"2014-03-27 07:39:47.000000000","message":"Yes, so the problem is that the self user_id/project_id may be originate from either an explicit value set in the provided representation OR the value given in the headers.\n\nBut since these values must now be the same for a non-admin caller, there is no way of determining retrospectively which one was used to populate the created alarm\u0027s field.\n\nSo in each variant of the self test, we should be seeing one value of (user_id, project_id) set from the header and one set from a value in the provided representation. But there\u0027s no way that I can see of distinguishing these two cases.\n\nDoes that make sense?","commit_id":"8f2d4fdbd18de7ef2fcaba68d3d74080b9e2fe7a"}]}
