Skip to content

Only show editable dashboards in admin changelist view.#131

Merged
simonw merged 1 commit intosimonw:mainfrom
toolness:admin-changelist-only-editable
Jul 1, 2021
Merged

Only show editable dashboards in admin changelist view.#131
simonw merged 1 commit intosimonw:mainfrom
toolness:admin-changelist-only-editable

Conversation

@toolness
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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