redash/old_migrations/0012_add_list_users_permission.py
Arik Fraimovich 70d545410d Add Flask-Migrate to the project
Also moved old migrations to old_migrations folder (before deleting them entirely).
2016-12-07 17:59:01 +02:00

8 lines
289 B
Python

from redash import models
if __name__ == '__main__':
default_group = models.Group.select(models.Group.id, models.Group.permissions).where(models.Group.name=='default').first()
default_group.permissions.append('list_users')
default_group.save(only=[models.Group.permissions])