)]}'
{"keystone/assignment/backends/kvs.py":[{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"e2bc118dee61bb8f147c5130d30853bba8dda716","unresolved":false,"context_lines":[{"line_number":558,"context_line":"    def handle_delete_user(self, user_id):"},{"line_number":559,"context_line":"        \"\"\"Handles user deletion."},{"line_number":560,"context_line":""},{"line_number":561,"context_line":"        :raises: keystone.exception.RoleNotFound"},{"line_number":562,"context_line":""},{"line_number":563,"context_line":"        \"\"\""},{"line_number":564,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAWH%2F99bo%3D","line":561,"updated":"2014-03-31 22:47:54.000000000","message":"This raises RoleNotFound? suggest fixing docstring, possibly a comment why there is no code executed here.","commit_id":"bf9c4adff4a60061b7999579c23c36c2cce9c443"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"e2bc118dee61bb8f147c5130d30853bba8dda716","unresolved":false,"context_lines":[{"line_number":566,"context_line":"        \"\"\"Handles group deletion."},{"line_number":567,"context_line":""},{"line_number":568,"context_line":"        :raises: keystone.exception.RoleNotFound"},{"line_number":569,"context_line":""},{"line_number":570,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAWH%2F99bg%3D","line":569,"updated":"2014-03-31 22:47:54.000000000","message":"same as above","commit_id":"bf9c4adff4a60061b7999579c23c36c2cce9c443"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"e96b707df314f3c535c8f3a5020bd233315d7eb9","unresolved":false,"context_lines":[{"line_number":553,"context_line":"        domain_list.remove(domain_id)"},{"line_number":554,"context_line":"        self.db.set(\u0027domain_list\u0027, list(domain_list))"},{"line_number":555,"context_line":""},{"line_number":556,"context_line":"    def handle_delete_user(self, user_id):"},{"line_number":557,"context_line":"        \"\"\"Handles user deletion."},{"line_number":558,"context_line":""},{"line_number":559,"context_line":"        :raises: keystone.exception.RoleNotFound"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAW3%2F%2FiR0%3D","line":556,"updated":"2014-04-13 14:48:21.000000000","message":"what do you think about a name like \"notify_user_deleted\"?\n\nhandle_delete_user means the same as delete_user to me.","commit_id":"3d9c81e50b648c7a339eef42e0a9f3c9d85f2511"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"e96b707df314f3c535c8f3a5020bd233315d7eb9","unresolved":false,"context_lines":[{"line_number":558,"context_line":""},{"line_number":559,"context_line":"        :raises: keystone.exception.RoleNotFound"},{"line_number":560,"context_line":""},{"line_number":561,"context_line":"        \"\"\""},{"line_number":562,"context_line":""},{"line_number":563,"context_line":"    def handle_delete_group(self, group_id):"},{"line_number":564,"context_line":"        \"\"\"Handles group deletion."}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAW3%2F%2FiRw%3D","line":561,"updated":"2014-04-13 14:48:21.000000000","message":"add  a comment why this shouldn\u0027t do anything.","commit_id":"3d9c81e50b648c7a339eef42e0a9f3c9d85f2511"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"e96b707df314f3c535c8f3a5020bd233315d7eb9","unresolved":false,"context_lines":[{"line_number":560,"context_line":""},{"line_number":561,"context_line":"        \"\"\""},{"line_number":562,"context_line":""},{"line_number":563,"context_line":"    def handle_delete_group(self, group_id):"},{"line_number":564,"context_line":"        \"\"\"Handles group deletion."},{"line_number":565,"context_line":""},{"line_number":566,"context_line":"        :raises: keystone.exception.RoleNotFound"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAW3%2F%2FiRs%3D","line":563,"updated":"2014-04-13 14:48:21.000000000","message":"suggest notify_group_deleted","commit_id":"3d9c81e50b648c7a339eef42e0a9f3c9d85f2511"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"e96b707df314f3c535c8f3a5020bd233315d7eb9","unresolved":false,"context_lines":[{"line_number":565,"context_line":""},{"line_number":566,"context_line":"        :raises: keystone.exception.RoleNotFound"},{"line_number":567,"context_line":""},{"line_number":568,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAW3%2F%2FiRo%3D","line":568,"updated":"2014-04-13 14:48:21.000000000","message":"add a comment why this shouldn\u0027t do anything.","commit_id":"3d9c81e50b648c7a339eef42e0a9f3c9d85f2511"}],"keystone/assignment/backends/ldap.py":[{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"e2bc118dee61bb8f147c5130d30853bba8dda716","unresolved":false,"context_lines":[{"line_number":273,"context_line":"                                                         self.project.tree_dn):"},{"line_number":274,"context_line":"            self.role.delete_user(ref.role_dn, ref.user_dn, ref.project_dn,"},{"line_number":275,"context_line":"                                  user_id, self.role._dn_to_id(ref.role_dn))"},{"line_number":276,"context_line":"        user \u003d self.user.get(user_id)"},{"line_number":277,"context_line":"        if hasattr(user, \u0027tenant_id\u0027):"},{"line_number":278,"context_line":"            self.project.remove_user(user.tenant_id,"},{"line_number":279,"context_line":"                                     self.user._id_to_dn(user_id))"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAWH%2F99bU%3D","line":276,"updated":"2014-03-31 22:47:54.000000000","message":"See my larger comment on when notifications happen, this might not be required, and likely is broken if it is required.","commit_id":"bf9c4adff4a60061b7999579c23c36c2cce9c443"}],"keystone/assignment/core.py":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"d503ca214877b0b6c80fac25e5b3c9426b1c72fa","unresolved":false,"context_lines":[{"line_number":70,"context_line":"        self.event_callbacks \u003d {"},{"line_number":71,"context_line":"            \u0027deleted\u0027: {"},{"line_number":72,"context_line":"                \u0027user\u0027: [self._delete_user_callback],"},{"line_number":73,"context_line":"                \u0027group\u0027: [self._delete_group_callback]"},{"line_number":74,"context_line":"            }"},{"line_number":75,"context_line":"        }"},{"line_number":76,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWH%2F%2BscI%3D","line":73,"updated":"2014-03-25 01:26:28.000000000","message":"Any particular reason why these need to be in lists? It doesn\u0027t look like the backends return anything for these calls.","commit_id":"5a57cd2222f1b665ec10d90d8ff479048505e04e"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"716a9a7ba1a5997fe409623a99c3528897beb0e3","unresolved":false,"context_lines":[{"line_number":986,"context_line":""},{"line_number":987,"context_line":"#TODO(ayoung): determine what else these two functions raise"},{"line_number":988,"context_line":"    @abc.abstractmethod"},{"line_number":989,"context_line":"    def handle_delete_user(self, user):"},{"line_number":990,"context_line":"        \"\"\"Handles user deletion."},{"line_number":991,"context_line":""},{"line_number":992,"context_line":"        :raises: keystone.exception.RoleNotFound"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWH%2F%2FBFs%3D","line":989,"updated":"2014-03-20 22:17:54.000000000","message":"Why rename to handle_* ?","commit_id":"5a57cd2222f1b665ec10d90d8ff479048505e04e"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"729d956ae8bbd2f9ecf39e46fb3240b384af7ec6","unresolved":false,"context_lines":[{"line_number":986,"context_line":""},{"line_number":987,"context_line":"#TODO(ayoung): determine what else these two functions raise"},{"line_number":988,"context_line":"    @abc.abstractmethod"},{"line_number":989,"context_line":"    def handle_delete_user(self, user):"},{"line_number":990,"context_line":"        \"\"\"Handles user deletion."},{"line_number":991,"context_line":""},{"line_number":992,"context_line":"        :raises: keystone.exception.RoleNotFound"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWH%2F%2B3cc%3D","line":989,"in_reply_to":"AAAAWH%2F%2B9X4%3D","updated":"2014-03-22 11:53:25.000000000","message":"Sounds good to me!","commit_id":"5a57cd2222f1b665ec10d90d8ff479048505e04e"},{"author":{"_account_id":10521,"name":"Pablo Fernando Cargnelutti","email":"pablo.fernando.cargnelutti@intel.com","username":"pcargnel"},"change_message_id":"b0ccac5faaf024c12d02118b0e312d5aa14f1cbf","unresolved":false,"context_lines":[{"line_number":986,"context_line":""},{"line_number":987,"context_line":"#TODO(ayoung): determine what else these two functions raise"},{"line_number":988,"context_line":"    @abc.abstractmethod"},{"line_number":989,"context_line":"    def handle_delete_user(self, user):"},{"line_number":990,"context_line":"        \"\"\"Handles user deletion."},{"line_number":991,"context_line":""},{"line_number":992,"context_line":"        :raises: keystone.exception.RoleNotFound"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWH%2F%2B9X4%3D","line":989,"in_reply_to":"AAAAWH%2F%2FBFs%3D","updated":"2014-03-21 15:15:53.000000000","message":"That was one of the comments in the bug. \"assignment_api.delete_user and assignment_api.delete_group are also not very intuitively named :( they handle the consequences of deleting users \u0026 groups, rather than actually deleting a user or group.\"","commit_id":"5a57cd2222f1b665ec10d90d8ff479048505e04e"}],"keystone/contrib/revoke/core.py":[{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"716a9a7ba1a5997fe409623a99c3528897beb0e3","unresolved":false,"context_lines":[{"line_number":105,"context_line":""},{"line_number":106,"context_line":"    def _delete_user_callback(self, service, resource_type,"},{"line_number":107,"context_line":"                              operation, payload):"},{"line_number":108,"context_line":"        self.revoke_by_user(payload[\u0027resource_info\u0027][\u0027id\u0027])"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    def _role_callback(self, service, resource_type, operation,"},{"line_number":111,"context_line":"                       payload):"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWH%2F%2FBFg%3D","line":108,"updated":"2014-03-20 22:17:54.000000000","message":"see comment on 147, suggest not duplicating code.","commit_id":"5a57cd2222f1b665ec10d90d8ff479048505e04e"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"716a9a7ba1a5997fe409623a99c3528897beb0e3","unresolved":false,"context_lines":[{"line_number":144,"context_line":"            [\u0027deleted\u0027, \u0027OS-OAUTH1:access_token\u0027,"},{"line_number":145,"context_line":"             self._access_token_callback],"},{"line_number":146,"context_line":"            [\u0027deleted\u0027, \u0027role\u0027, self._role_callback],"},{"line_number":147,"context_line":"            [\u0027deleted\u0027, \u0027user\u0027, self._delete_user_callback],"},{"line_number":148,"context_line":"            [\u0027disabled\u0027, \u0027user\u0027, self._user_callback],"},{"line_number":149,"context_line":"            [\u0027deleted\u0027, \u0027project\u0027, self._project_callback],"},{"line_number":150,"context_line":"            [\u0027disabled\u0027, \u0027project\u0027, self._project_callback],"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWH%2F%2FLCw%3D","line":147,"updated":"2014-03-20 22:17:54.000000000","message":"suggest use the same callback as disabled, there isn\u0027t a need to duplicate code. They should be doing the same thing.","commit_id":"5a57cd2222f1b665ec10d90d8ff479048505e04e"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"729d956ae8bbd2f9ecf39e46fb3240b384af7ec6","unresolved":false,"context_lines":[{"line_number":144,"context_line":"            [\u0027deleted\u0027, \u0027OS-OAUTH1:access_token\u0027,"},{"line_number":145,"context_line":"             self._access_token_callback],"},{"line_number":146,"context_line":"            [\u0027deleted\u0027, \u0027role\u0027, self._role_callback],"},{"line_number":147,"context_line":"            [\u0027deleted\u0027, \u0027user\u0027, self._delete_user_callback],"},{"line_number":148,"context_line":"            [\u0027disabled\u0027, \u0027user\u0027, self._user_callback],"},{"line_number":149,"context_line":"            [\u0027deleted\u0027, \u0027project\u0027, self._project_callback],"},{"line_number":150,"context_line":"            [\u0027disabled\u0027, \u0027project\u0027, self._project_callback],"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWH%2F%2B3b0%3D","line":147,"in_reply_to":"AAAAWH%2F%2B9W4%3D","updated":"2014-03-22 11:53:25.000000000","message":"See my response to the change to pass the user_ref around instead of the id.","commit_id":"5a57cd2222f1b665ec10d90d8ff479048505e04e"},{"author":{"_account_id":10521,"name":"Pablo Fernando Cargnelutti","email":"pablo.fernando.cargnelutti@intel.com","username":"pcargnel"},"change_message_id":"b0ccac5faaf024c12d02118b0e312d5aa14f1cbf","unresolved":false,"context_lines":[{"line_number":144,"context_line":"            [\u0027deleted\u0027, \u0027OS-OAUTH1:access_token\u0027,"},{"line_number":145,"context_line":"             self._access_token_callback],"},{"line_number":146,"context_line":"            [\u0027deleted\u0027, \u0027role\u0027, self._role_callback],"},{"line_number":147,"context_line":"            [\u0027deleted\u0027, \u0027user\u0027, self._delete_user_callback],"},{"line_number":148,"context_line":"            [\u0027disabled\u0027, \u0027user\u0027, self._user_callback],"},{"line_number":149,"context_line":"            [\u0027deleted\u0027, \u0027project\u0027, self._project_callback],"},{"line_number":150,"context_line":"            [\u0027disabled\u0027, \u0027project\u0027, self._project_callback],"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWH%2F%2B9W4%3D","line":147,"in_reply_to":"AAAAWH%2F%2FLCw%3D","updated":"2014-03-21 15:15:53.000000000","message":"Yes but the delete_user event is now getting a user_ref in the payload instead of a user id. I think we need this extra one.","commit_id":"5a57cd2222f1b665ec10d90d8ff479048505e04e"}],"keystone/credential/backends/sql.py":[{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"e2bc118dee61bb8f147c5130d30853bba8dda716","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        session \u003d sql.get_session()"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"        with session.begin():"},{"line_number":103,"context_line":"            query \u003d session.query(CredentialModel)"},{"line_number":104,"context_line":"            query \u003d query.filter_by(user_id\u003duser_id)"},{"line_number":105,"context_line":"            query.delete()"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAWH%2F99ac%3D","line":103,"updated":"2014-03-31 22:47:54.000000000","message":"Does this require locking the rows with a .with_lockmode(\u0027update\u0027)? or is the user being already deleted (in theory) by this time sufficient?","commit_id":"bf9c4adff4a60061b7999579c23c36c2cce9c443"}],"keystone/credential/core.py":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"d503ca214877b0b6c80fac25e5b3c9426b1c72fa","unresolved":false,"context_lines":[{"line_number":42,"context_line":"    def __init__(self):"},{"line_number":43,"context_line":"        self.event_callbacks \u003d {"},{"line_number":44,"context_line":"            \u0027deleted\u0027: {"},{"line_number":45,"context_line":"                \u0027user\u0027: [self._delete_user_callback]"},{"line_number":46,"context_line":"            }"},{"line_number":47,"context_line":"        }"},{"line_number":48,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWH%2F%2Bsao%3D","line":45,"updated":"2014-03-25 01:26:28.000000000","message":"same comment here.","commit_id":"5a57cd2222f1b665ec10d90d8ff479048505e04e"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"716a9a7ba1a5997fe409623a99c3528897beb0e3","unresolved":false,"context_lines":[{"line_number":112,"context_line":"    @abc.abstractmethod"},{"line_number":113,"context_line":"    def handle_delete_user(self, user):"},{"line_number":114,"context_line":"        \"\"\"Deletes all credentials for a user.\"\"\""},{"line_number":115,"context_line":"        self._delete_credentials(lambda cr: cr[\u0027user_id\u0027] \u003d\u003d user[\u0027id\u0027])"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"    def _delete_credentials(self, match_fn):"},{"line_number":118,"context_line":"        \"\"\"Do the actual credential deletion work (default implementation)."}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWH%2F%2FK7o%3D","line":115,"updated":"2014-03-20 22:17:54.000000000","message":"Notification code shows that the payload[\u0027resource_info\u0027] should be the ID, the additional lookup user[\u0027id] shouldn\u0027t be needed, and likely will raise an exception.","commit_id":"5a57cd2222f1b665ec10d90d8ff479048505e04e"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"d503ca214877b0b6c80fac25e5b3c9426b1c72fa","unresolved":false,"context_lines":[{"line_number":112,"context_line":"    @abc.abstractmethod"},{"line_number":113,"context_line":"    def handle_delete_user(self, user):"},{"line_number":114,"context_line":"        \"\"\"Deletes all credentials for a user.\"\"\""},{"line_number":115,"context_line":"        self._delete_credentials(lambda cr: cr[\u0027user_id\u0027] \u003d\u003d user[\u0027id\u0027])"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"    def _delete_credentials(self, match_fn):"},{"line_number":118,"context_line":"        \"\"\"Do the actual credential deletion work (default implementation)."}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWH%2F%2BsZ8%3D","line":115,"in_reply_to":"AAAAWH%2F%2FK7o%3D","updated":"2014-03-25 01:26:28.000000000","message":"++ agreed, resource_id should be the UUID of the Keystone resource and resource_type is the Keystone resource, suck as \u0027project\u0027, \u0027user\u0027, \u0027region\u0027 and so on. From those two pieces of information a third party plugin should be able to do a GET and retrieve more information depending on what they are looking for.","commit_id":"5a57cd2222f1b665ec10d90d8ff479048505e04e"}],"keystone/identity/core.py":[{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"716a9a7ba1a5997fe409623a99c3528897beb0e3","unresolved":false,"context_lines":[{"line_number":353,"context_line":"    @domains_configured"},{"line_number":354,"context_line":"    def delete_user(self, user_id, domain_scope\u003dNone):"},{"line_number":355,"context_line":"        domain_id, driver \u003d self._get_domain_id_and_driver(domain_scope)"},{"line_number":356,"context_line":"        user \u003d driver.get_user(user_id)"},{"line_number":357,"context_line":"        self._delete_user(user, driver)"},{"line_number":358,"context_line":""},{"line_number":359,"context_line":"    @notifications.deleted(_USER)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWH%2F%2FBGE%3D","line":356,"updated":"2014-03-20 22:17:54.000000000","message":"Why was this changed to do a .get_user first? If this is to guard the callback against errors, in theory the callback should be smart enough / handle the exception. I would rather not see the driver interface changed.\n\nNotifications are sent after the action is taken in either case, and if the user doesn\u0027t exist there will be an exception before you get into the notification event callback","commit_id":"5a57cd2222f1b665ec10d90d8ff479048505e04e"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"729d956ae8bbd2f9ecf39e46fb3240b384af7ec6","unresolved":false,"context_lines":[{"line_number":353,"context_line":"    @domains_configured"},{"line_number":354,"context_line":"    def delete_user(self, user_id, domain_scope\u003dNone):"},{"line_number":355,"context_line":"        domain_id, driver \u003d self._get_domain_id_and_driver(domain_scope)"},{"line_number":356,"context_line":"        user \u003d driver.get_user(user_id)"},{"line_number":357,"context_line":"        self._delete_user(user, driver)"},{"line_number":358,"context_line":""},{"line_number":359,"context_line":"    @notifications.deleted(_USER)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWH%2F%2B3cE%3D","line":356,"in_reply_to":"AAAAWH%2F%2B9Uo%3D","updated":"2014-03-22 11:53:25.000000000","message":"If the other actions are looking for it in the DB, likely we have a cross dependency that needs to be split apart. I\u0027ll take a closer look at the places we do this, but I would rather see (if at all possible) no dependency on the user / group existing in Identity. This is so that we are less tied to the identity service having all of our data to perform these actions.","commit_id":"5a57cd2222f1b665ec10d90d8ff479048505e04e"},{"author":{"_account_id":10521,"name":"Pablo Fernando Cargnelutti","email":"pablo.fernando.cargnelutti@intel.com","username":"pcargnel"},"change_message_id":"b0ccac5faaf024c12d02118b0e312d5aa14f1cbf","unresolved":false,"context_lines":[{"line_number":353,"context_line":"    @domains_configured"},{"line_number":354,"context_line":"    def delete_user(self, user_id, domain_scope\u003dNone):"},{"line_number":355,"context_line":"        domain_id, driver \u003d self._get_domain_id_and_driver(domain_scope)"},{"line_number":356,"context_line":"        user \u003d driver.get_user(user_id)"},{"line_number":357,"context_line":"        self._delete_user(user, driver)"},{"line_number":358,"context_line":""},{"line_number":359,"context_line":"    @notifications.deleted(_USER)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWH%2F%2B9Uo%3D","line":356,"in_reply_to":"AAAAWH%2F%2FBGE%3D","updated":"2014-03-21 15:15:53.000000000","message":"The situation is that after the user/group is deleted the other actions are looking for it in the DB and are all failing since is not there anymore. I tried to keep the reference before delete the user so any observer of that event can execute code based on the deleted user. In the previous approach these actions were executed by the drivers before the deletion","commit_id":"5a57cd2222f1b665ec10d90d8ff479048505e04e"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"e2bc118dee61bb8f147c5130d30853bba8dda716","unresolved":false,"context_lines":[{"line_number":353,"context_line":"    @domains_configured"},{"line_number":354,"context_line":"    def delete_user(self, user_id, domain_scope\u003dNone):"},{"line_number":355,"context_line":"        domain_id, driver \u003d self._get_domain_id_and_driver(domain_scope)"},{"line_number":356,"context_line":"        self._about_to_delete_user(user_id)"},{"line_number":357,"context_line":"        driver.delete_user(user_id)"},{"line_number":358,"context_line":""},{"line_number":359,"context_line":"    @notifications.deleted(_USER)"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAWH%2F99bw%3D","line":356,"updated":"2014-03-31 22:47:54.000000000","message":"Notifications should occur only after the delete occurs, my guess is that the reason for changing this is the keystone.assignment.backends.ldap.Assignment._handle_delete_user makes a call to ProjectApi.remove_user based upon the \"tenantId\". From what I can see in the code, \"remove_user\" on ProjectAPI is only called from tests.\n\nThe real requirement here is that the user should not need to be looked up from within an assignment backend. If it does, we need to fix that rather than change when the notification is issued.\n\nThis change is potentially introducing a security risk where deletion of a user\u0027s elements (e.g. trusts, tokens) happens before the user is actually removed, allowing for new tokens etc to be issued when running in a multi-keystone (e.g. mod_wsgi) environment.\n\nIn short, notifications need to occur after deletion. If that is not possible in the current code base, we need to fix that first.","commit_id":"bf9c4adff4a60061b7999579c23c36c2cce9c443"}],"keystone/tests/test_backend.py":[{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"716a9a7ba1a5997fe409623a99c3528897beb0e3","unresolved":false,"context_lines":[{"line_number":2398,"context_line":"        self.assertDictContainsSubset(group, group_ref)"},{"line_number":2399,"context_line":""},{"line_number":2400,"context_line":"        self.identity_api.delete_group(group[\u0027id\u0027])"},{"line_number":2401,"context_line":""},{"line_number":2402,"context_line":"        self.assertRaises(exception.GroupNotFound,"},{"line_number":2403,"context_line":"                          self.identity_api.get_group,"},{"line_number":2404,"context_line":"                          group[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWH%2F%2FK5c%3D","line":2401,"updated":"2014-03-20 22:17:54.000000000","message":"Revert whitespace change.","commit_id":"5a57cd2222f1b665ec10d90d8ff479048505e04e"},{"author":{"_account_id":10521,"name":"Pablo Fernando Cargnelutti","email":"pablo.fernando.cargnelutti@intel.com","username":"pcargnel"},"change_message_id":"b0ccac5faaf024c12d02118b0e312d5aa14f1cbf","unresolved":false,"context_lines":[{"line_number":2398,"context_line":"        self.assertDictContainsSubset(group, group_ref)"},{"line_number":2399,"context_line":""},{"line_number":2400,"context_line":"        self.identity_api.delete_group(group[\u0027id\u0027])"},{"line_number":2401,"context_line":""},{"line_number":2402,"context_line":"        self.assertRaises(exception.GroupNotFound,"},{"line_number":2403,"context_line":"                          self.identity_api.get_group,"},{"line_number":2404,"context_line":"                          group[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWH%2F%2B9Uc%3D","line":2401,"in_reply_to":"AAAAWH%2F%2FK5c%3D","updated":"2014-03-21 15:15:53.000000000","message":"Done","commit_id":"5a57cd2222f1b665ec10d90d8ff479048505e04e"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"716a9a7ba1a5997fe409623a99c3528897beb0e3","unresolved":false,"context_lines":[{"line_number":2617,"context_line":"        self.assertDictContainsSubset(user, user_ref_dict)"},{"line_number":2618,"context_line":""},{"line_number":2619,"context_line":"        self.identity_api.delete_user(user[\u0027id\u0027])"},{"line_number":2620,"context_line":""},{"line_number":2621,"context_line":"        self.assertRaises(exception.UserNotFound,"},{"line_number":2622,"context_line":"                          self.identity_api.get_user,"},{"line_number":2623,"context_line":"                          user[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWH%2F%2FK5U%3D","line":2620,"updated":"2014-03-20 22:17:54.000000000","message":"Revert whitespace change.","commit_id":"5a57cd2222f1b665ec10d90d8ff479048505e04e"},{"author":{"_account_id":10521,"name":"Pablo Fernando Cargnelutti","email":"pablo.fernando.cargnelutti@intel.com","username":"pcargnel"},"change_message_id":"b0ccac5faaf024c12d02118b0e312d5aa14f1cbf","unresolved":false,"context_lines":[{"line_number":2617,"context_line":"        self.assertDictContainsSubset(user, user_ref_dict)"},{"line_number":2618,"context_line":""},{"line_number":2619,"context_line":"        self.identity_api.delete_user(user[\u0027id\u0027])"},{"line_number":2620,"context_line":""},{"line_number":2621,"context_line":"        self.assertRaises(exception.UserNotFound,"},{"line_number":2622,"context_line":"                          self.identity_api.get_user,"},{"line_number":2623,"context_line":"                          user[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWH%2F%2B9UM%3D","line":2620,"in_reply_to":"AAAAWH%2F%2FK5U%3D","updated":"2014-03-21 15:15:53.000000000","message":"Done","commit_id":"5a57cd2222f1b665ec10d90d8ff479048505e04e"}],"keystone/token/core.py":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"d503ca214877b0b6c80fac25e5b3c9426b1c72fa","unresolved":false,"context_lines":[{"line_number":111,"context_line":"    def __init__(self):"},{"line_number":112,"context_line":"        self.event_callbacks \u003d {"},{"line_number":113,"context_line":"            \u0027deleted\u0027: {"},{"line_number":114,"context_line":"                \u0027user\u0027: [self._delete_user_callback]"},{"line_number":115,"context_line":"            }"},{"line_number":116,"context_line":"        }"},{"line_number":117,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWH%2F%2BsZI%3D","line":114,"updated":"2014-03-25 01:26:28.000000000","message":"Same comment here as previous.","commit_id":"5a57cd2222f1b665ec10d90d8ff479048505e04e"}]}
