

def get(self):
    if groups.current_user.has_permission('admin'):
        groups = models.Group.all(self.current_org)
    else:
        groups = models.Group.select().where((models.Group.id << self.current_user.groups))
    return [g.to_dict() for g in groups]

dataset/ETHPy150Open getredash/redash/redash/handlers/groups.py GroupListResource.get/VarMisuse@11/12 `self`->`groups`