Skip to content
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

Only show editable dashboards in admin changelist view. #131

Merged
merged 1 commit into from
Jul 1, 2021

Conversation

toolness
Copy link
Contributor

This attempts to fix #130 by only listing dashboards that are editable by the user in the Dashboard change list view.

Note that this means that the user will not see viewable-but-not-editable dashboards in the change list view! I originally tried making this possible, but simply not linking to the change view if a user couldn't edit it, but I couldn't figure out how to do this using the Django admin.

@toolness
Copy link
Contributor Author

@simonw if you think this is actually a good approach, I should add some unit tests before merging, which is why I'm currently marking this as a draft.

@toolness
Copy link
Contributor Author

Oops, I also noticed that a test is failing. I will fix it if you think I should keep working on this PR.

@simonw simonw marked this pull request as ready for review July 1, 2021 03:18
@simonw
Copy link
Owner

simonw commented Jul 1, 2021

I think this is a good idea. I'm fine with not showing Dashboards in the view that the user can view but not edit, since those dashboards will be made available to them on the /dashboard/ view anyway.

@simonw
Copy link
Owner

simonw commented Jul 1, 2021

I'm going to merge this and fix any tests.

@simonw simonw merged commit 1fb3f15 into simonw:main Jul 1, 2021
simonw added a commit that referenced this pull request Jul 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The dashboard admin list view links to change views that the user may not have permission to use
2 participants