Commit graph

4844 commits

Author SHA1 Message Date
Karl Hobley
0ba28e5ca9 Changelog for #1587 2015-08-17 12:43:52 +01:00
Karl Hobley
2a1dde6ca6 Merge pull request #1587 from mvantellingen/page-url-performance
Page url performance
2015-08-17 12:40:38 +01:00
Karl Hobley
cebe5249d0 Changelog/release notes for #1606 2015-08-17 12:16:32 +01:00
Karl Hobley
f259ce4dfc Merge pull request #1618 from marctc/patch-1
Fixed indentation problems
2015-08-17 11:52:50 +01:00
Marc
3b651241ae Fixed indentation problems
The original indentation used was 2 spaces. Fixed to 4 spaces.
2015-08-17 12:49:54 +02:00
Karl Hobley
8eaf25e3e9 Merge pull request #1606 from gasman/fix/permission-consistency
Fix various inconsistencies in our permissions model
2015-08-17 11:48:58 +01:00
hanpama
7a82bc2d94 Change column name (Delete Submission to Actions) 2015-08-16 23:11:45 +09:00
Matt Westcott
faeecf1582 Enforce permissions on search promotions, and register them with the group permissions UI 2015-08-15 22:55:09 +02:00
Matt Westcott
63511a7ee6 Enforce redirect permissions correctly, and register them with the group permissions UI 2015-08-15 22:55:09 +02:00
Matt Westcott
b43e3f8cc7 Register site permissions in the group permissions UI 2015-08-15 22:55:08 +02:00
Matt Westcott
08891c69f7 Fix description of 'edit' page permission
'edit' permission does not provide the ability to add pages.
2015-08-15 22:55:08 +02:00
Karl Hobley
634136fb78 Added image serializer class 2015-08-15 21:29:44 +01:00
Karl Hobley
f88995a9d7 Doc strings for custom serializer fields 2015-08-15 21:29:39 +01:00
Matt Westcott
550947fb0b Reorganise wagtailsnippets.permissions to only consider add/edit/delete as granting access to the snippet admin area 2015-08-15 21:22:38 +02:00
Matt Westcott
2110110d75 Apply appropriate permission checks for adding / changing / deleting snippets.
Previously, *any* permission on the model would be counted as 'user can edit'.
2015-08-15 21:22:38 +02:00
Karl Hobley
d258ddf22d Use MetaField classes in RelatedField 2015-08-15 18:18:01 +01:00
Karl Hobley
82464f6cdd Removed serialize_fields method 2015-08-15 18:18:00 +01:00
Karl Hobley
dd37d3f5ff Made page parent into a DRF field
This adds a bit of messy code into endpoints.py. I'll clean that up in a later PR

Ref: https://github.com/torchbox/wagtail/pull/1579#discussion_r36741886
2015-08-15 18:18:00 +01:00
Karl Hobley
a6462a3ab7 Made "meta" its own field type
Ref: https://github.com/torchbox/wagtail/pull/1579#discussion_r36741624
2015-08-15 18:18:00 +01:00
Karl Hobley
8d6c200e88 Let DRF handle the id field
Ref: https://github.com/torchbox/wagtail/pull/1579#discussion_r36741624
2015-08-15 16:35:00 +01:00
Matt Westcott
8c583e68d8 decorate wrapper functions with functools.wraps 2015-08-15 16:51:55 +02:00
Matt Westcott
a8e7200b1a use triple-quoted string for docstring 2015-08-15 16:46:37 +02:00
Matt Westcott
f8e08929eb Remove unused import of ContentType 2015-08-15 02:39:31 +02:00
Matt Westcott
164013bd43 When registering user/group permissions, specify add/change/delete permissions explicitly.
This ensures that we don't pull in any other permissions that may happen to exist (but are not relevant to the Wagtail admin). Also, ensure that we pick up the appropriate user model as returned by get_user_model, as this is the one used for permission checks in the views.
2015-08-15 02:39:31 +02:00
Matt Westcott
45e3354a44 Check add/change/delete permissions as appropriate within user admin UI
...instead of using change_user for everything
2015-08-15 02:39:30 +02:00
Matt Westcott
e1f4b9a68c Show groups menu item iff user has add, change or delete permission on groups (rather than checking 'auth' permissions en masse) 2015-08-15 02:39:30 +02:00
Matt Westcott
90b009583e Convert remaining permission_required decorators to the wagtailadmin one 2015-08-15 02:39:30 +02:00
Matt Westcott
2c948bbe15 Remove redundant access_admin permission check from styleguide.
All admin views added through register_admin_urls have this applied automatically.
2015-08-15 02:39:30 +02:00
Matt Westcott
7d32c55d7f Add a permission_required decorator as a non-broken replacement for Django's one.
This is functionally equivalent to any_permission_required with a single permission passed, but it's better to make permission_required its own thing so that developers don't have the mental hurdle of seeing an unfamiliar decorator and wondering what 'any' refers to...
2015-08-15 02:39:30 +02:00
Matt Westcott
b3a55a3588 Make documents admin usable by users who have change_document permission but not add_document 2015-08-15 02:39:30 +02:00
Matt Westcott
169eb8a85c Make images admin usable by users who have change_image permission but not add_image 2015-08-15 02:39:29 +02:00
Matt Westcott
04b95ce99e Remove 'delete' permission checkboxes for image and document.
For these models, permission to edit implies permission to delete, so the delete permission is redundant.
2015-08-15 02:39:29 +02:00
Matt Westcott
d11f8efc80 Remove 'user profile' from the set of registered permission types.
This is never used, as Wagtail has no interface for editing user profiles; if one were to exist, it would make more sense for this to be linked to User permissions.
2015-08-15 02:39:29 +02:00
Karl Hobley
5d0c4caf3b Search results messages
- Number of items matched
 - Different message when no items found
2015-08-14 15:50:48 +01:00
Karl Hobley
f9632b98d3 JavaScript for snippet chooser search 2015-08-14 15:50:48 +01:00
Karl Hobley
8ed3b79706 Use main listing template in chooser 2015-08-14 15:50:48 +01:00
Karl Hobley
aa4edc67d3 Snippets chooser pagination now fetches results.html
Instead of going through modal workflow. This is similar to how the chooser works elsewhere in wagtail
2015-08-14 15:50:48 +01:00
Karl Hobley
cc66159441 Added snippet chooser results template
So search results can be loaded with ajax
2015-08-14 15:50:47 +01:00
Karl Hobley
eddc129a69 Added search form to snippets chooser 2015-08-14 15:50:47 +01:00
Karl Hobley
d43fa39f89 Ajaxify snippet search 2015-08-14 15:50:47 +01:00
Karl Hobley
9fced68f89 Add search to snippet chooser view 2015-08-14 15:50:47 +01:00
Karl Hobley
3efbac7dfc Added search to snippet listing view 2015-08-14 15:50:47 +01:00
Karl Hobley
f8a4ff4e6a Added SearchableSnippet test model 2015-08-14 13:58:52 +01:00
Matt Westcott
371c9dc9a5 Merge branch 'kaedroho-fetch-translations' 2015-08-14 13:11:26 +02:00
Karl Hobley
ce743768f5 Fetched translations from transfex 2015-08-14 10:58:35 +01:00
Matt Westcott
a1886d4d5b fix another styleguide link missed when converting to namespaced URLs 2015-08-14 11:44:06 +02:00
Karl Hobley
6a9a80a16d Don't reopen files that are from external hosting
Fixes #1397
2015-08-13 17:28:20 +01:00
Karl Hobley
20036e5b5f Implemented Image.is_stored_locally helper function 2015-08-13 17:19:47 +01:00
Karl Hobley
870ce11bd6 Failing tests for #1397
Testing the following with an external image backend:
 - Uploading through image chooser (fails)
 - Visiting the edit page of an image with a null file_size (fails)
 - Editing an image, changing the image file
 - Adding a new image

The latter two do not fail, I thought I'd add them to reduce risk of regressions in the future
2015-08-13 16:59:08 +01:00
Karl Hobley
ef73c7ec12 Use wagtailsearch in page chooser 2015-08-13 14:51:15 +01:00