-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9736960
commit 0c4b72a
Showing
10 changed files
with
378 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,18 @@ | ||
connection "metabase" { | ||
plugin = "1024pix/metabase" | ||
plugin = "metabase" | ||
|
||
# Your metabase url | ||
# Your metabase url (requiried) | ||
# url = "https://localhost" | ||
|
||
# Metabase credentials | ||
# Username/password is required for requests. Required except if token (see after) is provided. | ||
# This can also be set via the `METABASE_USER` and `METABASE_PASSWORD` environment variable. | ||
# user = "my_user" | ||
# password = "my_password" | ||
|
||
# Or token | ||
# token = xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | ||
# Token is required for requests. Required except if user/password (see before) is provided. | ||
# This can also be set via the `METABASE_TOKEN` environment variable. | ||
# token = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" | ||
|
||
# Skip TLS verification | ||
# tls_skip_verify = true | ||
# Skip TLS verification, useful in local test. Optionnal. | ||
# tls_skip_verify = false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,53 @@ | ||
# Table: metabase_permission | ||
|
||
List all permissions of Metabase. | ||
List all permissions from Metabase. | ||
|
||
To understand how permision works, you can read official documentation of Metabase [](https://www.metabase.com/docs/latest/permissions/data). | ||
|
||
`db_id` is the database id from `metabase_db` table. | ||
|
||
`group_id` is Metabase group that you can find in `metabase_permission_group` table. | ||
|
||
## Examples | ||
|
||
### List all permissions | ||
|
||
```sql | ||
select | ||
* | ||
from | ||
SELECT | ||
group_id, | ||
db_id, | ||
download_native, | ||
download_schema, | ||
data_native, | ||
data_schema | ||
FROM | ||
metabase_permission; | ||
``` | ||
|
||
### Get permission of one group | ||
Return: | ||
``` | ||
+----------+-------+-----------------+-----------------+-------------+-------------+--------------------------------+ | ||
| group_id | db_id | download_native | download_schema | data_native | data_schema | _ctx | | ||
+----------+-------+-----------------+-----------------+-------------+-------------+--------------------------------+ | ||
| 4 | 1 | <null> | <null> | <null> | limited | {"connection_name":"metabase"} | | ||
| 2 | 5 | full | full | write | all | {"connection_name":"metabase"} | | ||
... | ||
``` | ||
|
||
### Display group name with permission | ||
|
||
```sql | ||
select | ||
* | ||
from | ||
metabase_permission_group | ||
where | ||
group_id=15; | ||
SELECT | ||
group_id, | ||
name, | ||
db_id, | ||
download_native, | ||
download_schema, | ||
data_native, | ||
data_schema | ||
FROM | ||
metabase_permission | ||
INNER JOIN metabase_permission_group ON metabase_permission_group.id = metabase_permission.group_id | ||
ORDER BY | ||
group_id; | ||
``` |
Oops, something went wrong.