looker-open-source/looker-skills

lookml-access-grants

Use this skill to create Access Grants for row-level or object-level security.

ソースを見る

使い方

  1. インストールコマンドをコピーし、自分の環境へ導入する前にソースを確認します。
  2. 必要なツール、認証情報、対応環境を原文で確認します。
  3. 入力と成果物を指定し、出力を資料と照合します。
npx skills add https://github.com/looker-open-source/looker-skills --skill lookml-access-grants

開始前の確認

  • 導入にはモデル契約、API枠、ファイルへのアクセス許可は含まれません。
  • スター数や導入数は活動の指標であり、独立した品質・安全性試験ではありません。
リポジトリの原文

見出し、例、コード、表、リンク、参照画像を含む原文を表示しています。

Instructions

  1. Define Access Grant:
  • Defined at the Model level.
  • Links a user_attribute to a set of allowed_values.
  1. Apply Access Grant:
  • Use required_access_grants: [grant_name] at the Explore, Join, View, or Field level.
  • User must match all listed grants to see the object.
  1. Best Practices:
  • Exact Match: allowed_values must match the user attribute value distinctively (no wildcards/partial matches).
  • Additive: Grants are additive. If a View requires Grant A and a Field requires Grant B, the user needs both to see the field.

Examples

Basic Access Grant

lookml
# In model file
access_grant: can_view_finance {
  user_attribute: department
  allowed_values: ["finance", "executive"]
}

# In view file
view: finance_data {
  required_access_grants: [can_view_finance]
  # ...
}

Field-Level Security

lookml
dimension: salary {
  type: number
  sql: ${TABLE}.salary ;;
  required_access_grants: [can_view_finance]
}

タスクに関連する項目

同じリポジトリから

関連する Skills

すべての Skills