Skip to content

Commit

Permalink
Better docs for edit permissions, closes #132
Browse files Browse the repository at this point in the history
  • Loading branch information
simonw committed Jul 1, 2021
1 parent 4c1951e commit 6b07f7c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/saved-dashboards.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ A set of SQL queries can be used to create a saved dashboard. Saved dashboards h

You can create a saved dashboard from the interactive dashboard interface (at `/dashboard/`) - execute some queries, then scroll down to the "Save this dashboard" form.

## View permissions

The following viewing permission policies are available:

- `private`: Only the user who created (owns) the dashboard can view
Expand All @@ -14,6 +16,10 @@ The following viewing permission policies are available:
- `staff`: Any user who is staff can view
- `superuser`: Any user who is a superuser can view

(edit_permissions)=

## Edit permissions

The edit policy controls which users are allowed to edit a dashboard - defaulting to the user who created that dashboard.

Editing currently takes place through the Django Admin - so only users who are staff members with access to that interface will be able to edit their dashboards.
Expand Down
4 changes: 4 additions & 0 deletions docs/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,10 @@ Access to the `/dashboard/` interface is controlled by the Django permissions sy

django_sql_dashboard | dashboard | Can execute arbitrary SQL queries

Dashboard editing is currently handled by the Django admin interface. This means a user needs to have **staff** status (allowing them access to the Django admin interface) in order to edit one of their saved dashboards.

The regular Django permission for "can edit dashboard" is ignored. Instead, a permission system that is specific to Django SQL Dashboard is used to control edit permissions. See {ref}`edit_permissions` for details.

## Additional settings

You can customize the following settings in Django's `settings.py` module:
Expand Down

0 comments on commit 6b07f7c

Please sign in to comment.