)]}'
{"keystone/common/wsgi.py":[{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"32f574e64cf567bb401974a4eaadb6383cfc9df2","unresolved":false,"context_lines":[{"line_number":290,"context_line":"            msg \u003d _(\u0027%s field is required and cannot be empty\u0027) % attribute"},{"line_number":291,"context_line":"            raise exception.ValidationError(message\u003dmsg)"},{"line_number":292,"context_line":""},{"line_number":293,"context_line":"    def _require_attributes(self, ref, attrs):"},{"line_number":294,"context_line":"        \"\"\"Ensures the reference contains the specified attributes.\"\"\""},{"line_number":295,"context_line":"        missing_attrs \u003d [attribute for attribute in attrs"},{"line_number":296,"context_line":"                         if self._attribute_is_empty(ref, attribute)]"}],"source_content_type":"text/x-python","patch_set":1,"id":"bad4c104_0148562c","line":293,"updated":"2014-04-29 16:22:45.000000000","message":"Tests for the new method?","commit_id":"9eaf71f482122d5edeac1228bd976039ee5c6690"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"5cfe0afd944149a85ddf347e9b8d302ca0be9069","unresolved":false,"context_lines":[{"line_number":283,"context_line":""},{"line_number":284,"context_line":"    def _attribute_is_empty(self, ref, attribute):"},{"line_number":285,"context_line":"        \"\"\"Returns true if the attribute in the given ref (which is a"},{"line_number":286,"context_line":"        dict) is empty or None."},{"line_number":287,"context_line":"        \"\"\""},{"line_number":288,"context_line":"        return ref.get(attribute) is None or ref.get(attribute) \u003d\u003d \u0027\u0027"},{"line_number":289,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9ad9bd40_118bb868","line":286,"updated":"2014-05-06 17:00:16.000000000","message":"also returns true if the attribute doesn\u0027t exist on ref","commit_id":"820e4f153aa12f9686a98fcae309636216666909"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"de491a1f4cba4e914cc392e69a32b701242b31e3","unresolved":false,"context_lines":[{"line_number":283,"context_line":""},{"line_number":284,"context_line":"    def _attribute_is_empty(self, ref, attribute):"},{"line_number":285,"context_line":"        \"\"\"Returns true if the attribute in the given ref (which is a"},{"line_number":286,"context_line":"        dict) is empty or None."},{"line_number":287,"context_line":"        \"\"\""},{"line_number":288,"context_line":"        return ref.get(attribute) is None or ref.get(attribute) \u003d\u003d \u0027\u0027"},{"line_number":289,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9ad9bd40_515d2e14","line":286,"in_reply_to":"9ad9bd40_118bb868","updated":"2014-05-07 06:17:22.000000000","message":"If you have any suggestions for names, I could upload another patch with a better name. They should be unambiguous, yet I couldn\u0027t think of a better name :/","commit_id":"820e4f153aa12f9686a98fcae309636216666909"}],"keystone/tests/test_wsgi.py":[{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"5cfe0afd944149a85ddf347e9b8d302ca0be9069","unresolved":false,"context_lines":[{"line_number":46,"context_line":"            self._require_attribute(body_dict, attr)"},{"line_number":47,"context_line":"            return True"},{"line_number":48,"context_line":"        except exception.ValidationError as ex:"},{"line_number":49,"context_line":"            return (False, ex.message)"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    def has_attributes(self, body, attr):"},{"line_number":52,"context_line":"        body_dict \u003d jsonutils.loads(body)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9ad9bd40_b1212c4f","line":49,"updated":"2014-05-06 17:00:16.000000000","message":"seems odd to return a truthy object on failure as compared to a successful result of... True.","commit_id":"820e4f153aa12f9686a98fcae309636216666909"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"5cfe0afd944149a85ddf347e9b8d302ca0be9069","unresolved":false,"context_lines":[{"line_number":143,"context_line":"        resp \u003d req.get_response(app)"},{"line_number":144,"context_line":"        validation \u003d app.has_attributes(resp.body, [\u0027missing_attribute1\u0027,"},{"line_number":145,"context_line":"                                        \u0027missing_attribute2\u0027])"},{"line_number":146,"context_line":"        self.assertFalse(validation[0])"},{"line_number":147,"context_line":"        self.assertTrue(\u0027missing_attribute1\u0027 in validation[1])"},{"line_number":148,"context_line":"        self.assertTrue(\u0027missing_attribute2\u0027 in validation[1])"},{"line_number":149,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9ad9bd40_71db244f","line":146,"updated":"2014-05-06 17:00:16.000000000","message":"and then this is just asserting that a falsey appears in a truthy object","commit_id":"820e4f153aa12f9686a98fcae309636216666909"}],"keystone/trust/controllers.py":[{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"f267115c58fa671861306c39e8bcde1afef653b9","unresolved":false,"context_lines":[{"line_number":148,"context_line":"    def _require_user_is_trustor(self, context, trust):"},{"line_number":149,"context_line":"        user_id \u003d self._get_user_id(context)"},{"line_number":150,"context_line":"        if user_id !\u003d trust.get(\u0027trustor_user_id\u0027):"},{"line_number":151,"context_line":"            raise exception.Forbidden()"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"    def _require_role(self, trust):"},{"line_number":154,"context_line":"        if trust.get(\u0027project_id\u0027) and not trust.get(\u0027roles\u0027):"}],"source_content_type":"text/x-python","patch_set":1,"id":"bad4c104_fb95e188","line":151,"updated":"2014-04-29 15:34:52.000000000","message":"I know it wasn\u0027t there before, but i think a message here would be really useful","commit_id":"9eaf71f482122d5edeac1228bd976039ee5c6690"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"f267115c58fa671861306c39e8bcde1afef653b9","unresolved":false,"context_lines":[{"line_number":150,"context_line":"        if user_id !\u003d trust.get(\u0027trustor_user_id\u0027):"},{"line_number":151,"context_line":"            raise exception.Forbidden()"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"    def _require_role(self, trust):"},{"line_number":154,"context_line":"        if trust.get(\u0027project_id\u0027) and not trust.get(\u0027roles\u0027):"},{"line_number":155,"context_line":"            raise exception.Forbidden("},{"line_number":156,"context_line":"                _(\u0027At least one role should be specified.\u0027))"}],"source_content_type":"text/x-python","patch_set":1,"id":"bad4c104_db465d23","line":153,"updated":"2014-04-29 15:34:52.000000000","message":"the name of this function is confusion, since it\u0027s only required IIF project_id is specified.","commit_id":"9eaf71f482122d5edeac1228bd976039ee5c6690"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"32f574e64cf567bb401974a4eaadb6383cfc9df2","unresolved":false,"context_lines":[{"line_number":156,"context_line":"                _(\u0027At least one role should be specified.\u0027))"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"    def _get_user_role(self, trust):"},{"line_number":159,"context_line":"        if trust.get(\u0027project_id\u0027):"},{"line_number":160,"context_line":"            return self.assignment_api.get_roles_for_user_and_project("},{"line_number":161,"context_line":"                trust[\u0027trustor_user_id\u0027], trust[\u0027project_id\u0027])"},{"line_number":162,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":1,"id":"bad4c104_c6176450","line":159,"updated":"2014-04-29 16:22:45.000000000","message":"(nit) if \u0027trust\u0027 is a dict and we don\u0027t plan on using the return from .get(), i\u0027d rather see \"if \u0027project_id\u0027 in trust\u0027.","commit_id":"9eaf71f482122d5edeac1228bd976039ee5c6690"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"2cd2251331d2fa57384d18dfd5476a9ff4bbc88b","unresolved":false,"context_lines":[{"line_number":156,"context_line":"                _(\u0027At least one role should be specified.\u0027))"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"    def _get_user_role(self, trust):"},{"line_number":159,"context_line":"        if trust.get(\u0027project_id\u0027):"},{"line_number":160,"context_line":"            return self.assignment_api.get_roles_for_user_and_project("},{"line_number":161,"context_line":"                trust[\u0027trustor_user_id\u0027], trust[\u0027project_id\u0027])"},{"line_number":162,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":1,"id":"9ad9bd40_0a08ecd8","line":159,"in_reply_to":"bad4c104_c6176450","updated":"2014-05-06 09:46:46.000000000","message":"It could be the case that the \u0027project_id\u0027 attribute exists but is empty.","commit_id":"9eaf71f482122d5edeac1228bd976039ee5c6690"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"f267115c58fa671861306c39e8bcde1afef653b9","unresolved":false,"context_lines":[{"line_number":163,"context_line":"            return []"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"    def _require_trustor_has_role_in_project(self, trust, clean_roles):"},{"line_number":166,"context_line":"        user_role \u003d self._get_user_role(trust)"},{"line_number":167,"context_line":"        for trust_role in clean_roles:"},{"line_number":168,"context_line":"            matching_roles \u003d [x for x in user_role"},{"line_number":169,"context_line":"                              if x \u003d\u003d trust_role[\u0027id\u0027]]"}],"source_content_type":"text/x-python","patch_set":1,"id":"bad4c104_3bc82974","line":166,"updated":"2014-04-29 15:34:52.000000000","message":"nit: rename to user_roles since many can come back","commit_id":"9eaf71f482122d5edeac1228bd976039ee5c6690"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"32f574e64cf567bb401974a4eaadb6383cfc9df2","unresolved":false,"context_lines":[{"line_number":176,"context_line":"        if not expiration_date.endswith(\u0027Z\u0027):"},{"line_number":177,"context_line":"            expiration_date +\u003d \u0027Z\u0027"},{"line_number":178,"context_line":"        try:"},{"line_number":179,"context_line":"            return (timeutils.parse_isotime(expiration_date))"},{"line_number":180,"context_line":"        except ValueError:"},{"line_number":181,"context_line":"            raise exception.ValidationTimeStampError()"},{"line_number":182,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"bad4c104_86c1dce6","line":179,"updated":"2014-04-29 16:22:45.000000000","message":"(nit) extra parens","commit_id":"9eaf71f482122d5edeac1228bd976039ee5c6690"}]}
