{"comment":{"url":"https://api.github.com/repos/CartoDB/cartodb/comments/13462319","html_url":"https://github.com/CartoDB/cartodb/commit/7fff61d10a86511dfc4bbd8e7c153f93949af13a#commitcomment-13462319","id":13462319,"user":{"login":"juanignaciosl","id":932968,"avatar_url":"https://avatars.githubusercontent.com/u/932968?v=3","gravatar_id":"","url":"https://api.github.com/users/juanignaciosl","html_url":"https://github.com/juanignaciosl","followers_url":"https://api.github.com/users/juanignaciosl/followers","following_url":"https://api.github.com/users/juanignaciosl/following{/other_user}","gists_url":"https://api.github.com/users/juanignaciosl/gists{/gist_id}","starred_url":"https://api.github.com/users/juanignaciosl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juanignaciosl/subscriptions","organizations_url":"https://api.github.com/users/juanignaciosl/orgs","repos_url":"https://api.github.com/users/juanignaciosl/repos","events_url":"https://api.github.com/users/juanignaciosl/events{/privacy}","received_events_url":"https://api.github.com/users/juanignaciosl/received_events","type":"User","site_admin":false},"position":5,"line":544,"path":"app/models/permission.rb","commit_id":"7fff61d10a86511dfc4bbd8e7c153f93949af13a","created_at":"2015-09-28T07:42:21Z","updated_at":"2015-09-28T07:42:21Z","body":"Yep. It's a little strange: you \"normally\" want to update database (group creation/deletion, adding users...). You only want to switch it off when request is a permission request coming from database. That's when you set `update_db_group_permission` to `false`.\r\n\r\nIn this specific line take a look you're inside `revoke_previous_permissions`. You want to clean previous permission unless you've specifically desactivated it.\r\n\r\nTake a look at the full PR (CartoDB/cartodb#5763) instead of this commit and see the usage of `update_db_group_permission`. In summary it avoids the infinite loop of editor requesting permission assignment to db who requests to editor who..."}}