LoginSignup
3
0

More than 3 years have passed since last update.

Redash で Group の Permissions を変える方法

Last updated at Posted at 2020-11-19

RedashのGroupは権限(Permissions)を保持しており、所属するユーザに対して間接的に権限を付与することができる。
所謂ロールとしての機能である。

しかし、作成したGroupは常に以下の権限を保持しており、WebUI上からは変更することができない。
CLIから変更できるのでその方法を記載する。

権限

  • create_dashboard
  • create_query
  • edit_dashboard
  • edit_query
  • view_query
  • view_source
  • execute_query
  • list_users
  • schedule_query
  • list_dashboards
  • list_alerts
  • list_data_sources

FYI: https://github.com/getredash/redash/blob/004bc7a2ac0de041907ab0b9b560151ea7057332/redash/models/users.py#L260

環境

Redash 8.0.0+b32245 (a16f551e)

やりかた

Redash の manage.py を使う。
以下のコマンドを実行することで実現できる。
引数で渡された権限をグループが保持する権限にまるごと置き換える。

/opt/redash
# 変更対象のGroupのID
export GROUP_ID=3
# カンマ区切りで複数付与
docker-compose exec server ./manage.py groups change_permissions --permissions 'super_admin,admin' $GROUP_ID
# 全ての権限を消す
docker-compose exec server ./manage.py groups change_permissions --permissions '' $GROUP_ID
3
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
0