staff_member_required decorator loses query parameters
|Reported by:||jdetaeye||Owned by:||nobody|
|Severity:||Keywords:||admin staff_member_required sprintdec01 nfa-someday|
|Cc:||Triage Stage:||Ready for checkin|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
To reproduce the problem:
- Open a new browser window
- Enter a admin url that uses a query parameter. A good example is the url for displaying a filtered or sorted list of objects: /admin/yourapp/yourmodel/?yourfield__exact=12
- Since you're not authenticated yet, the login page is shown.
- After a successfull login, you will be redirected to the page: /admin/yourapp/yourmodel/
The query parameter is lost along the way...
Keeping the query parameters is handy when e.g. the user wants to bookmark such a filtered or sorted list.
The fix is pretty simple: The problem is the use of the request.path field, rather than the request.get_full_path method.
The change affects affects both the normal admin as well as the new-forms admin branch, and the same patch applies.
Change History (13)
comment:1 Changed 8 years ago by anonymous
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
- Summary changed from staff_member_required decorator looses query parameters to staff_member_required decorator loses query parameters
comment:2 Changed 8 years ago by SmileyChris
- Patch needs improvement set
- Triage Stage changed from Unreviewed to Accepted
- Version changed from SVN to newforms-admin
comment:9 Changed 7 years ago by jacob
- Resolution set to duplicate
- Status changed from new to closed