Merge lp:~widelands-dev/widelands-website/wiki_no_delete into lp:widelands-website
Status: | Merged | ||||
---|---|---|---|---|---|
Merged at revision: | 478 | ||||
Proposed branch: | lp:~widelands-dev/widelands-website/wiki_no_delete | ||||
Merge into: | lp:widelands-website | ||||
Diff against target: |
94 lines (+28/-4) 4 files modified
mainpage/admin.py (+12/-0) wiki/admin.py (+2/-0) wiki/models.py (+1/-0) wiki/views.py (+13/-4) |
||||
To merge this branch: | bzr merge lp:~widelands-dev/widelands-website/wiki_no_delete | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
GunChleoc | Approve | ||
Review via email: mp+334639@code.launchpad.net |
Description of the change
Prevent deleting of wiki articles over the admin page by:
1. Disable the 'Action' selection box in https:/
2. Remove permission 'delete' for model Article. This removes the 'Delete' button from the admin page detail view of an article. This change do not apply to users who already had the permission (the permission get not removed from the django model user_user_
Additionally:
1. Serve a HTTP404 if an article isn't found in backlinks view to prevent server errors
2. Reworked the logic of backlinks, because it didn't worked correct under some circumstances, e.g. if a copied url from browsers addressbar contain percent encoding and is pasted into the article. E.g. [[ Go back to main page | Main%20Page ]]
LGTM - we can always do the more fancy stuff later