-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Labels
type:BugSomething isn't workingSomething isn't working
Description
Issue Summary
Edit link added to ModelAdmin index view when I remove edit permissions is causing a permission denied redirect.
Steps to Reproduce
- Added a
wagtail_hooks.py
with ModelAdmin configurations; - Override PermissionHelper to not allow editions;
- Configured ModelAdmin to allow inspect view;
- Go to wagtail admin interface and open index view of added ModelAdmin;
- Click on link added on first column content (not the buttons) and you will be redirected to permission denied page.
I think that the correct behavior here will be replacing the edit link of first column content with the inspect link instead. And in case I haven't inspect view enabled, shouldn't add link at all to avoid the permission denied redirect.
- I have confirmed that this issue can be reproduced as described on a fresh Wagtail project: yes
Technical details
- Python version: 3.9.
- Django version: 3.2.
- Wagtail version: 2.15.1.
- Browser version: Chrome 96.
Metadata
Metadata
Assignees
Labels
type:BugSomething isn't workingSomething isn't working