)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":10295,"name":"mariam john","email":"mariamj@us.ibm.com","username":"mariamj"},"change_message_id":"6158883d30ad7b144437260d4d77570f3bce075a","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Do not prompt error when create user with default role"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Do not assign default role again after create a new user"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Closes-Bug: #1260439"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: Id0914da9b8855bdf2b1afe11e1e870250f1a9c70"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"AAAAWH%2F9gIU%3D","line":10,"updated":"2014-04-04 04:16:18.000000000","message":"I think the commit message needs a little more clarification. My understanding of the fix is that we do not want to assign a new user with an existing role and if such an attempt is made, we want to display an error to the user. If that is the case, then shouldn\u0027t the description in the commit message include both these cases.","commit_id":"f3276b71ae1b20242d8ace39917c099ce7ed543c"}],"openstack_dashboard/dashboards/admin/users/forms.py":[{"author":{"_account_id":5094,"name":"Gustavo Knüppe","email":"gustavo.knuppe@hp.com","username":"gustavo-knuppe"},"change_message_id":"c91a36e662218c63bce683c7ab607e1cf2873597","unresolved":false,"context_lines":[{"line_number":134,"context_line":"                except Exception as e:"},{"line_number":135,"context_line":"                    # \"already has role\" is a hardcode str in keystone"},{"line_number":136,"context_line":"                    if not (isinstance(e, keystone_exceptions.Conflict) and"},{"line_number":137,"context_line":"                         e.message.find(\"already has role\") \u003e -1):"},{"line_number":138,"context_line":"                        exceptions.handle(request,"},{"line_number":139,"context_line":"                                          _(\u0027Unable to add user \u0027"},{"line_number":140,"context_line":"                                            \u0027to primary project.\u0027))"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2F8TQ%3D","line":137,"updated":"2014-01-06 13:38:39.000000000","message":"Have you checked if this description checking will work when keystone is running as localized to another language that not english?","commit_id":"1491631737c1d6b1ed0dbe644c8a11f7da0f150b"},{"author":{"_account_id":7585,"name":"Ladislav Smola","email":"lsmola@redhat.com","username":"lsmola"},"change_message_id":"25e15bb4a4889ed6cd6dd04515a9589395c24705","unresolved":false,"context_lines":[{"line_number":134,"context_line":"                except Exception as e:"},{"line_number":135,"context_line":"                    # \"already has role\" is a hardcode str in keystone"},{"line_number":136,"context_line":"                    if not (isinstance(e, keystone_exceptions.Conflict) and"},{"line_number":137,"context_line":"                         e.message.find(\"already has role\") \u003e -1):"},{"line_number":138,"context_line":"                        exceptions.handle(request,"},{"line_number":139,"context_line":"                                          _(\u0027Unable to add user \u0027"},{"line_number":140,"context_line":"                                            \u0027to primary project.\u0027))"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2Fssg%3D","line":137,"in_reply_to":"AAAAUH%2F%2F8TQ%3D","updated":"2014-01-09 13:50:21.000000000","message":"Hmm this search in message is definitely not a good idea. Doesn\u0027t it return some specific exception? If not, I would rather show exception message than this.","commit_id":"1491631737c1d6b1ed0dbe644c8a11f7da0f150b"},{"author":{"_account_id":6704,"name":"chenhaiq","email":"chenhaiq@cn.ibm.com","username":"chenhaiq"},"change_message_id":"ea8cfbe99eb666952308d06215e4320e9ed53dad","unresolved":false,"context_lines":[{"line_number":134,"context_line":"                except Exception as e:"},{"line_number":135,"context_line":"                    # \"already has role\" is a hardcode str in keystone"},{"line_number":136,"context_line":"                    if not (isinstance(e, keystone_exceptions.Conflict) and"},{"line_number":137,"context_line":"                         e.message.find(\"already has role\") \u003e -1):"},{"line_number":138,"context_line":"                        exceptions.handle(request,"},{"line_number":139,"context_line":"                                          _(\u0027Unable to add user \u0027"},{"line_number":140,"context_line":"                                            \u0027to primary project.\u0027))"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2Fp%2FQ%3D","line":137,"in_reply_to":"AAAAUH%2F%2F8TQ%3D","updated":"2014-01-10 01:47:08.000000000","message":"I have checked the message. It is not been translated","commit_id":"1491631737c1d6b1ed0dbe644c8a11f7da0f150b"},{"author":{"_account_id":6704,"name":"chenhaiq","email":"chenhaiq@cn.ibm.com","username":"chenhaiq"},"change_message_id":"8d5e50e708b76c02bbb4135eb9c6bc585063f932","unresolved":false,"context_lines":[{"line_number":134,"context_line":"                except Exception as e:"},{"line_number":135,"context_line":"                    # \"already has role\" is a hardcode str in keystone"},{"line_number":136,"context_line":"                    if not (isinstance(e, keystone_exceptions.Conflict) and"},{"line_number":137,"context_line":"                         e.message.find(\"already has role\") \u003e -1):"},{"line_number":138,"context_line":"                        exceptions.handle(request,"},{"line_number":139,"context_line":"                                          _(\u0027Unable to add user \u0027"},{"line_number":140,"context_line":"                                            \u0027to primary project.\u0027))"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2FeZg%3D","line":137,"in_reply_to":"AAAAUH%2F%2FoOo%3D","updated":"2014-01-13 14:36:27.000000000","message":"The way Gustavo Knüppe menitioned does not work because Horizon use different settings for default role with keystone.\n\nI perfer to not check the error message, because from current implement of keystone, it is not possible to throw another \"Conflict\" exception from add_tenant_user_role code path.","commit_id":"1491631737c1d6b1ed0dbe644c8a11f7da0f150b"},{"author":{"_account_id":7585,"name":"Ladislav Smola","email":"lsmola@redhat.com","username":"lsmola"},"change_message_id":"65ee64d6d55e7403cd160cdca8ded5752747a388","unresolved":false,"context_lines":[{"line_number":134,"context_line":"                except Exception as e:"},{"line_number":135,"context_line":"                    # \"already has role\" is a hardcode str in keystone"},{"line_number":136,"context_line":"                    if not (isinstance(e, keystone_exceptions.Conflict) and"},{"line_number":137,"context_line":"                         e.message.find(\"already has role\") \u003e -1):"},{"line_number":138,"context_line":"                        exceptions.handle(request,"},{"line_number":139,"context_line":"                                          _(\u0027Unable to add user \u0027"},{"line_number":140,"context_line":"                                            \u0027to primary project.\u0027))"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2FoOo%3D","line":137,"in_reply_to":"AAAAUH%2F%2Fp%2FQ%3D","updated":"2014-01-10 10:29:53.000000000","message":"Hmm still, comparing exception by message content seems a bit hacky.\n\nWhat about the way Gustavo Knüppe menitioned in the bug? You can get also default role from local_settings, does it help somehow? Btw. is it normal that the defaults are different in the config files?\n\nThere has to be some clean way to do it, I bet we can find it. :-)","commit_id":"1491631737c1d6b1ed0dbe644c8a11f7da0f150b"},{"author":{"_account_id":6704,"name":"chenhaiq","email":"chenhaiq@cn.ibm.com","username":"chenhaiq"},"change_message_id":"ea8cfbe99eb666952308d06215e4320e9ed53dad","unresolved":false,"context_lines":[{"line_number":134,"context_line":"                except Exception as e:"},{"line_number":135,"context_line":"                    # \"already has role\" is a hardcode str in keystone"},{"line_number":136,"context_line":"                    if not (isinstance(e, keystone_exceptions.Conflict) and"},{"line_number":137,"context_line":"                         e.message.find(\"already has role\") \u003e -1):"},{"line_number":138,"context_line":"                        exceptions.handle(request,"},{"line_number":139,"context_line":"                                          _(\u0027Unable to add user \u0027"},{"line_number":140,"context_line":"                                            \u0027to primary project.\u0027))"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2Fp%2FA%3D","line":137,"in_reply_to":"AAAAUH%2F%2Fssg%3D","updated":"2014-01-10 01:47:08.000000000","message":"keystone_exceptions.Conflict is the specific exception. However, it has been used in other methods too. Checking the message for sure.","commit_id":"1491631737c1d6b1ed0dbe644c8a11f7da0f150b"},{"author":{"_account_id":10247,"name":"Santiago Baldassin","email":"santiago.b.baldassin@intel.com","username":"santibaldassin"},"change_message_id":"d3dd0690c64d4d05a2aff60d99966579ba6cbe9f","unresolved":false,"context_lines":[{"line_number":125,"context_line":"                             _(\u0027User \"%s\" was successfully created.\u0027)"},{"line_number":126,"context_line":"                             % data[\u0027name\u0027])"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"            default_role \u003d api.keystone.get_default_role(self.request)"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"            # If the role is the same as the default role, doesn\u0027t need to"},{"line_number":131,"context_line":"            # grant the same role again"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAWH%2F9lqU%3D","line":128,"updated":"2014-04-03 14:24:39.000000000","message":"There\u0027s no need to call keystone again to get the default role since the view already has it","commit_id":"f3276b71ae1b20242d8ace39917c099ce7ed543c"}]}
