-
Notifications
You must be signed in to change notification settings - Fork 125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docs: Update security policy docs with usergroup and wildcard examples #5210
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made a 2nd commit with the proposed cleanup and adding an example for showing access
, which should be the most common use case for groups with security policies. @begelundmuller Could you validate quickly and then I'll approve?
docs/docs/manage/security.md
Outdated
@@ -40,8 +40,7 @@ When developing access policies, you can leverage a fixed set of user attributes | |||
- `.user.domain` – the domain of the current user's email address, for example `example.com` (string) | |||
- `.user.name` - the current user's name, for example `John Doe` (string) | |||
- `.user.admin` – a boolean value indicating whether the current user is an org or project admin, for example `true` (bool) | |||
<!-- PENDING SUPPORT FOR USER-DEFINED USERGROUPS --> | |||
<!-- - `.user.groups` - a list of usergroups the user belongs to in the project's org. Custom usergroups are not currently supported, so this will always be `["all"]`. --> | |||
- `.user.groups` - a list of usergroups the user belongs to in the project's org (list of strings) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we change this to "user groups". I would probably give an example as well:
.user.groups
- a list of user groups the user belongs to in the project's org (list of strings), e.g. ["marketing", "sales", "finance"]
docs/docs/manage/security.md
Outdated
<!-- | ||
### Use wildcards to select all dimensions and measures | ||
|
||
When building field include policies, you can easily select all fields using `names: '*'`. For example: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would change this to "When defining inclusion or exclusion policies, you can easily automatically select all columns by using names: '*"
as a wildcard. For example:"
docs/docs/manage/security.md
Outdated
names: '*' | ||
``` | ||
|
||
Note that the `'*'` must be quoted (using single or double quotes), and must be provided as a scalar value, not as an entry in a list. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably bold: must be provided as a scalar value
docs/docs/manage/security.md
Outdated
### Filter queries based on the user's groups | ||
|
||
Let's say additionally we want to filter queries based on user's groups and there exist a `group` dimension in the model: | ||
You can inject the groups that a user belongs to into row filter: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would probably change this to: "You can directly inject the groups that a user belongs to into the row filter itself, such as:"
No description provided.