)]}'
{"glance/api/v2/image_members.py":[{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"9cf863becfb82fd6feefb95c90a4e34bf01b8fba","unresolved":false,"context_lines":[{"line_number":60,"context_line":"            LOG.warning(msg)"},{"line_number":61,"context_line":"            raise webob.exc.HTTPForbidden(explanation\u003dmsg)"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    def _get_member_repo(self, image):"},{"line_number":64,"context_line":"        try:"},{"line_number":65,"context_line":"            # For public images, a forbidden exception with message"},{"line_number":66,"context_line":"            # \"Public images do not have members\" is thrown."}],"source_content_type":"text/x-python","patch_set":2,"id":"3acd31a7_7fa1fca8","line":63,"updated":"2015-04-30 11:37:47.000000000","message":"we can make this method as static using @staticmethod as self is not used here","commit_id":"d6b1a2ac4e9840574cdba0902392065ff26ec8f8"},{"author":{"_account_id":15501,"name":"Long Quan Sha","email":"shalq@cn.ibm.com","username":"shalq"},"change_message_id":"17ee61d38d87358b59b3e50eaa5ce765a5aa5d7a","unresolved":false,"context_lines":[{"line_number":68,"context_line":"            return image.get_member_repo()"},{"line_number":69,"context_line":"        except exception.Forbidden as e:"},{"line_number":70,"context_line":"            msg \u003d (_(\"You are not authorized to get the member repo for image \""},{"line_number":71,"context_line":"                     \"%s.\") % image.image_id)"},{"line_number":72,"context_line":"            LOG.warning(e.msg or msg)"},{"line_number":73,"context_line":"            raise webob.exc.HTTPForbidden(explanation\u003de.msg or msg)"},{"line_number":74,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"ba3cc151_5f1ba480","line":71,"updated":"2015-07-07 02:31:47.000000000","message":"Is the \"member repo\" an internal name ? I am wondering if end user can understand it if the message is thrown with Http exception.","commit_id":"507afacbcf9b4263787f3a144f840421cbd79f68"},{"author":{"_account_id":5202,"name":"Erno Kuvaja","email":"jokke@usr.fi","username":"jokke"},"change_message_id":"508cda48f8fabd22e085b611178e179ab93d8969","unresolved":false,"context_lines":[{"line_number":68,"context_line":"            return image.get_member_repo()"},{"line_number":69,"context_line":"        except exception.Forbidden as e:"},{"line_number":70,"context_line":"            msg \u003d (_(\"You are not authorized to get the member repo for image \""},{"line_number":71,"context_line":"                     \"%s.\") % image.image_id)"},{"line_number":72,"context_line":"            LOG.warning(e.msg or msg)"},{"line_number":73,"context_line":"            raise webob.exc.HTTPForbidden(explanation\u003de.msg or msg)"},{"line_number":74,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"ba3cc151_794f3234","line":71,"in_reply_to":"ba3cc151_5c9b7cc9","updated":"2015-07-08 23:43:56.000000000","message":"glance.common.exception.Forbidden has default message set so even if it\u0027s not raised with custom one it will have message. This is waste of space, so we can remove this and the \"or msg\" from log and raise.","commit_id":"507afacbcf9b4263787f3a144f840421cbd79f68"},{"author":{"_account_id":15225,"name":"Deepti Ramakrishna","email":"deepti.ramakrishna@intel.com","username":"dramakri"},"change_message_id":"d1019a48237056217d2593f942177314341af355","unresolved":false,"context_lines":[{"line_number":68,"context_line":"            return image.get_member_repo()"},{"line_number":69,"context_line":"        except exception.Forbidden as e:"},{"line_number":70,"context_line":"            msg \u003d (_(\"You are not authorized to get the member repo for image \""},{"line_number":71,"context_line":"                     \"%s.\") % image.image_id)"},{"line_number":72,"context_line":"            LOG.warning(e.msg or msg)"},{"line_number":73,"context_line":"            raise webob.exc.HTTPForbidden(explanation\u003de.msg or msg)"},{"line_number":74,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"ba3cc151_5c9b7cc9","line":71,"in_reply_to":"ba3cc151_5f1ba480","updated":"2015-07-07 22:09:22.000000000","message":"We use underlying exception message and only use this custom message when one is not provided. See the line below: \nraise webob.exc.HTTPForbidden(explanation\u003de.msg or msg)\nSo, this message is shown to the user in very rare cases. Even then, \"member repo\" is a reasonably generic term and is easily understandable. I would prefer not changing it at this point.","commit_id":"507afacbcf9b4263787f3a144f840421cbd79f68"},{"author":{"_account_id":15225,"name":"Deepti Ramakrishna","email":"deepti.ramakrishna@intel.com","username":"dramakri"},"change_message_id":"b6e0b193e81af9b14b909e9af7aaac509a6ede21","unresolved":false,"context_lines":[{"line_number":68,"context_line":"            return image.get_member_repo()"},{"line_number":69,"context_line":"        except exception.Forbidden as e:"},{"line_number":70,"context_line":"            msg \u003d (_(\"You are not authorized to get the member repo for image \""},{"line_number":71,"context_line":"                     \"%s.\") % image.image_id)"},{"line_number":72,"context_line":"            LOG.warning(e.msg or msg)"},{"line_number":73,"context_line":"            raise webob.exc.HTTPForbidden(explanation\u003de.msg or msg)"},{"line_number":74,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"ba3cc151_d2a649c0","line":71,"in_reply_to":"ba3cc151_794f3234","updated":"2015-07-09 05:38:03.000000000","message":"Erno, agree that \"e.msg or msg\" is redundant. However \"e.msg\" doesn\u0027t include image_id. Since log messages as well as exception messages are more useful with image_id, I have modified msg to include both. Please take a look at the new patch.","commit_id":"507afacbcf9b4263787f3a144f840421cbd79f68"},{"author":{"_account_id":15501,"name":"Long Quan Sha","email":"shalq@cn.ibm.com","username":"shalq"},"change_message_id":"17ee61d38d87358b59b3e50eaa5ce765a5aa5d7a","unresolved":false,"context_lines":[{"line_number":210,"context_line":"        except webob.exc.HTTPForbidden as e:"},{"line_number":211,"context_line":"            # Convert Forbidden to NotFound to prevent information"},{"line_number":212,"context_line":"            # leakage."},{"line_number":213,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003de.explanation)"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"    @utils.mutating"},{"line_number":216,"context_line":"    def delete(self, req, image_id, member_id):"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba3cc151_e221bffd","line":213,"updated":"2015-07-07 02:31:47.000000000","message":"I suggest we still use a forbidden exception here, as the message is really about authorization.","commit_id":"507afacbcf9b4263787f3a144f840421cbd79f68"},{"author":{"_account_id":5202,"name":"Erno Kuvaja","email":"jokke@usr.fi","username":"jokke"},"change_message_id":"508cda48f8fabd22e085b611178e179ab93d8969","unresolved":false,"context_lines":[{"line_number":210,"context_line":"        except webob.exc.HTTPForbidden as e:"},{"line_number":211,"context_line":"            # Convert Forbidden to NotFound to prevent information"},{"line_number":212,"context_line":"            # leakage."},{"line_number":213,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003de.explanation)"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"    @utils.mutating"},{"line_number":216,"context_line":"    def delete(self, req, image_id, member_id):"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba3cc151_b4705f73","line":213,"in_reply_to":"ba3cc151_1c35f444","updated":"2015-07-08 23:43:56.000000000","message":"Yes I do agree. Thanks for keeping that in mind.","commit_id":"507afacbcf9b4263787f3a144f840421cbd79f68"},{"author":{"_account_id":15225,"name":"Deepti Ramakrishna","email":"deepti.ramakrishna@intel.com","username":"dramakri"},"change_message_id":"d1019a48237056217d2593f942177314341af355","unresolved":false,"context_lines":[{"line_number":210,"context_line":"        except webob.exc.HTTPForbidden as e:"},{"line_number":211,"context_line":"            # Convert Forbidden to NotFound to prevent information"},{"line_number":212,"context_line":"            # leakage."},{"line_number":213,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003de.explanation)"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"    @utils.mutating"},{"line_number":216,"context_line":"    def delete(self, req, image_id, member_id):"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba3cc151_1c35f444","line":213,"in_reply_to":"ba3cc151_e221bffd","updated":"2015-07-07 22:09:22.000000000","message":"If you saw the original patch set, I actually had Forbidden here. But the core reviewers commented that I had to keep it as NotFound to not break backward compatibility. Since this an API affecting issue, I have a bug (https://bugs.launchpad.net/glance/+bug/1450370) which discusses about it. You can add comments there.","commit_id":"507afacbcf9b4263787f3a144f840421cbd79f68"}]}
