if grant_perms:
                    if 'grant_perms' not in changes:
                        changes['grant_perms'] = {}
                    if user not in changes['grant_perms']:
                        changes['grant_perms'][user] = {}