)]}'
{"trove/guestagent/datastore/experimental/mongodb/service.py":[{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"d35e77bcf911eef869476d50faccd9236c3332e7","unresolved":false,"context_lines":[{"line_number":557,"context_line":"        return type(self).admin_user"},{"line_number":558,"context_line":""},{"line_number":559,"context_line":"    def _is_modifiable_user(self, name):"},{"line_number":560,"context_line":"        if ((name in cfg.get_ignored_users(manager\u003dMANAGER)) or"},{"line_number":561,"context_line":"                name \u003d\u003d system.MONGO_ADMIN_NAME):"},{"line_number":562,"context_line":"            return False"},{"line_number":563,"context_line":"        return True"},{"line_number":564,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"ba8a016a_84ae9a96","line":561,"range":{"start_line":560,"start_character":11,"end_line":561,"end_character":48},"updated":"2015-11-23 16:40:32.000000000","message":"You could get rid of the if and just return \u0027not\u0027 this.","commit_id":"0e87bb5ecf94ad9ba4e1b3b24d62b43014887496"},{"author":{"_account_id":15321,"name":"Matthew Van Dijk","email":"mvandijk@tesora.com","username":"mvandijk"},"change_message_id":"5195d02ca8dcb8bb1b0e9a3f11883f05a0d1e291","unresolved":false,"context_lines":[{"line_number":557,"context_line":"        return type(self).admin_user"},{"line_number":558,"context_line":""},{"line_number":559,"context_line":"    def _is_modifiable_user(self, name):"},{"line_number":560,"context_line":"        if ((name in cfg.get_ignored_users(manager\u003dMANAGER)) or"},{"line_number":561,"context_line":"                name \u003d\u003d system.MONGO_ADMIN_NAME):"},{"line_number":562,"context_line":"            return False"},{"line_number":563,"context_line":"        return True"},{"line_number":564,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"9a8ffd7b_8377b701","line":561,"range":{"start_line":560,"start_character":11,"end_line":561,"end_character":48},"in_reply_to":"9a8ffd7b_63ee5324","updated":"2015-11-24 18:03:41.000000000","message":"Why would we want to block users in admin.* or reporting.*? There may be use cases where the administrator wants to create and see those. If they want specific users blocked they can add them to the conf.","commit_id":"0e87bb5ecf94ad9ba4e1b3b24d62b43014887496"},{"author":{"_account_id":4240,"name":"Craig Vyvial","email":"cp16net@gmail.com","username":"cp16net"},"change_message_id":"168949d28f87560430399ce1a6bb9e90bd04180a","unresolved":false,"context_lines":[{"line_number":557,"context_line":"        return type(self).admin_user"},{"line_number":558,"context_line":""},{"line_number":559,"context_line":"    def _is_modifiable_user(self, name):"},{"line_number":560,"context_line":"        if ((name in cfg.get_ignored_users(manager\u003dMANAGER)) or"},{"line_number":561,"context_line":"                name \u003d\u003d system.MONGO_ADMIN_NAME):"},{"line_number":562,"context_line":"            return False"},{"line_number":563,"context_line":"        return True"},{"line_number":564,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"9a8ffd7b_63ee5324","line":561,"range":{"start_line":560,"start_character":11,"end_line":561,"end_character":48},"in_reply_to":"ba8a016a_84ae9a96","updated":"2015-11-24 17:56:14.000000000","message":"@matt should we take this a bit further and no allow a user \u0027admin.*\u0027 or \u0027reporting.*\u0027? or what ever the other top level dbs are in mongo?","commit_id":"0e87bb5ecf94ad9ba4e1b3b24d62b43014887496"},{"author":{"_account_id":4240,"name":"Craig Vyvial","email":"cp16net@gmail.com","username":"cp16net"},"change_message_id":"168949d28f87560430399ce1a6bb9e90bd04180a","unresolved":false,"context_lines":[{"line_number":627,"context_line":"        \"\"\""},{"line_number":628,"context_line":"        user \u003d models.MongoDBUser.deserialize_user(user)"},{"line_number":629,"context_line":"        if not self._is_modifiable_user(user.name):"},{"line_number":630,"context_line":"            raise exception.BadRequest(_("},{"line_number":631,"context_line":"                \u0027Cannot delete user with reserved name %(user)s\u0027)"},{"line_number":632,"context_line":"                % {\u0027user\u0027: user.name})"},{"line_number":633,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a8ffd7b_831a5716","line":630,"updated":"2015-11-24 17:56:14.000000000","message":"while i think raising exceptions is a good thing is it necessary here? I raise this question because the users_create just logs a warning as it loops over the users to create and here it raises an exception. These differ in the log messages that occur. I\u0027d say the same for the other methods in this module as well. Another thing regarding the exceptions is that they will only be in the guestagent log since these are async calls. There may not be a good reason here to raise an exception if thats the case.","commit_id":"0e87bb5ecf94ad9ba4e1b3b24d62b43014887496"},{"author":{"_account_id":15321,"name":"Matthew Van Dijk","email":"mvandijk@tesora.com","username":"mvandijk"},"change_message_id":"5195d02ca8dcb8bb1b0e9a3f11883f05a0d1e291","unresolved":false,"context_lines":[{"line_number":627,"context_line":"        \"\"\""},{"line_number":628,"context_line":"        user \u003d models.MongoDBUser.deserialize_user(user)"},{"line_number":629,"context_line":"        if not self._is_modifiable_user(user.name):"},{"line_number":630,"context_line":"            raise exception.BadRequest(_("},{"line_number":631,"context_line":"                \u0027Cannot delete user with reserved name %(user)s\u0027)"},{"line_number":632,"context_line":"                % {\u0027user\u0027: user.name})"},{"line_number":633,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a8ffd7b_a3e2fb9d","line":630,"in_reply_to":"9a8ffd7b_831a5716","updated":"2015-11-24 18:03:41.000000000","message":"I would prefer using exceptions on the others too. User that shouldn\u0027t be deleted should not reach this point. create_users only logs a message because it can take a list and I didn\u0027t think it wise to quit halfway through that.","commit_id":"0e87bb5ecf94ad9ba4e1b3b24d62b43014887496"}]}
