Wykres commitów

4795 Commity (c33ec771509e48a333e82c4d3d887d152e614726)

Autor SHA1 Wiadomość Data
Karl Hobley 1bfe3ef427 Merge pull request #1614 from gasman/fix/permission-consistency-2
Fix inconsistencies in our permissions model - part 2
2015-08-18 15:59:35 +01:00
Karl Hobley aba7f7a38a Added page_model_from_string method 2015-08-18 09:39:57 +01:00
Karl Hobley 614cec69ea Removed unused import 2015-08-18 09:28:26 +01:00
Karl Hobley d73fdba0b4 Check specified page type is infact a page 2015-08-17 17:29:26 +01:00
Karl Hobley 96113db353 Use resolve_model_string for finding page model 2015-08-17 17:28:17 +01:00
Karl Hobley 4532010539 Fix crash when invalid page type name is given to page chooser search 2015-08-17 17:04:51 +01:00
Karl Hobley 35f10306ae Tests for page chooser search 2015-08-17 17:03:34 +01:00
Karl Hobley cc25263cac Clarity improvements to the browse view 2015-08-17 15:43:03 +01:00
Karl Hobley 6247c7faa3 No need to define search form so early 2015-08-17 15:15:23 +01:00
Karl Hobley 9a8f0d4d0d Cut out duplicated pagination code 2015-08-17 15:14:36 +01:00
Karl Hobley e58083f398 Use nicer queries for restricing page types 2015-08-17 15:11:34 +01:00
Karl Hobley b4aa3230d4 Fix crash when invalid page type name is given to page chooser 2015-08-17 15:06:10 +01:00
Karl Hobley 240a7f1c73 Improvements to page chooser test suite 2015-08-17 15:06:10 +01:00
Karl Hobley 7e16aa0d8d Removed page class fallback
Under normal circumstances, this fallback isn't needed
2015-08-17 14:15:41 +01:00
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
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