)]}'
{"glance/api/authorization.py":[{"author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"change_message_id":"5c4fc77a86e8286e60d2d37621489d144c461be3","unresolved":false,"context_lines":[{"line_number":224,"context_line":"    def get_member_repo(self):"},{"line_number":225,"context_line":"        member_repo \u003d self.base.get_member_repo()"},{"line_number":226,"context_line":"        for member in member_repo.list():"},{"line_number":227,"context_line":"            if self.context.owner \u003d\u003d member.member_id:"},{"line_number":228,"context_line":"                return member_repo"},{"line_number":229,"context_line":"        message \u003d _(\"You are not permitted to access this image.\")"},{"line_number":230,"context_line":"        raise exception.Forbidden(message)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2B2ic%3D","line":227,"updated":"2013-02-17 19:51:21.000000000","message":"I believe the goal of this addition is to allow an exception so that members of an image can get a member_repo that they can use to modify their membership.\n\nI think it might be a better solution to always return a glance.authorization.ImageMembershipRepoProxy here. That might require some additional ownership / membership checks in that class, as well as additional functions for handling save/update.\n\nLet me know your thoughts!","commit_id":"8117a33bcaea877244e3fc7537508656bf24fa63"}],"glance/api/v2/image_members.py":[{"author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"change_message_id":"5c4fc77a86e8286e60d2d37621489d144c461be3","unresolved":false,"context_lines":[{"line_number":60,"context_line":"        try:"},{"line_number":61,"context_line":"            image \u003d image_repo.get(image_id)"},{"line_number":62,"context_line":"            member_repo \u003d image.get_member_repo()"},{"line_number":63,"context_line":"            if body is None:"},{"line_number":64,"context_line":"                new_member \u003d image_member_factory.new_image_member(image,"},{"line_number":65,"context_line":"                                                                   member_id)"},{"line_number":66,"context_line":"                member \u003d member_repo.add(new_member)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2B14U%3D","line":63,"updated":"2013-02-17 19:51:21.000000000","message":"I didn\u0027t catch this before--I think its a bit of problem to have both create and update going through the http PUT verb. \n\nHow hard would it be to change create to POST /v2/image/members   {\"member\": \"abcd\"}  and to make a separate function for update that uses the PUT /v2/image/members/abcd logic you\u0027ve added here?","commit_id":"8117a33bcaea877244e3fc7537508656bf24fa63"},{"author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"change_message_id":"5c4fc77a86e8286e60d2d37621489d144c461be3","unresolved":false,"context_lines":[{"line_number":76,"context_line":"        except exception.Forbidden as e:"},{"line_number":77,"context_line":"            raise webob.exc.HTTPForbidden(explanation\u003dunicode(e))"},{"line_number":78,"context_line":"        except ValueError:"},{"line_number":79,"context_line":"            msg \u003d _(\u0027status must be \"accepted\", \"rejected\", or \"pending\"\u0027)"},{"line_number":80,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    def index(self, req, image_id):"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2B138%3D","line":79,"updated":"2013-02-17 19:51:21.000000000","message":"Maybe we should reuse the message in the underlying ValueError rather than rewriting it here.","commit_id":"8117a33bcaea877244e3fc7537508656bf24fa63"}],"glance/db/__init__.py":[{"author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"change_message_id":"5c4fc77a86e8286e60d2d37621489d144c461be3","unresolved":false,"context_lines":[{"line_number":192,"context_line":"    def get_member_repo(self):"},{"line_number":193,"context_line":"        member_repo \u003d ImageMemberRepo(self.context, self.db_api,"},{"line_number":194,"context_line":"                                      self.image)"},{"line_number":195,"context_line":"        authorized_member_repo \u003d authorization.ImageMembershipRepoProxy("},{"line_number":196,"context_line":"                                    member_repo, self.context)"},{"line_number":197,"context_line":"        return authorized_member_repo"},{"line_number":198,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2B14M%3D","line":195,"updated":"2013-02-17 19:51:21.000000000","message":"I think this act of \"wrapping\" a repo with the authorization proxy should really be happening in glance.api.authorization, not here.","commit_id":"8117a33bcaea877244e3fc7537508656bf24fa63"}]}
