redash/old_migrations/0012_add_list_users_permission.py

8 lines
289 B
Python
Raw Normal View History

2015-08-06 13:24:39 +00:00
from redash import models
if __name__ == '__main__':
default_group = models.Group.select(models.Group.id, models.Group.permissions).where(models.Group.name=='default').first()
2015-08-06 13:24:39 +00:00
default_group.permissions.append('list_users')
default_group.save(only=[models.Group.permissions])