About lookml-access-grants
A skill for developers configuring LookML access controls across models, Explores, views, and fields. It explains how grants connect user attributes to allowed values and how requirements combine across objects.
Key features
- 01Define model-level access grants
- 02Apply grants to Explores, joins, views, or fields
- 03Match allowed values to user attributes exactly
- 04Understand how multiple grants combine
Use cases
- 01Restrict access to finance views
- 02Set field-level access for salary data
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ lkrdev/ lookml_skills --skill lookml-access-grantsAfter installing, type/lookml-access-grantsin Claude Code to confirm it loaded.
Details
From the project READMEInstructions
- Define Access Grant:
- Defined at the Model level.
- Links a
user_attributeto a set ofallowed_values.
- 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.
- Use
- Best Practices:
- Exact Match:
allowed_valuesmust 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.
- Exact Match:
Examples
Basic Access Grant
# 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
dimension: salary {
type: number
sql: ${TABLE}.salary ;;
required_access_grants: [can_view_finance]
}
Comments
Markdown supported