WIP: Les permissions du CMS peuvent être attribuées aux groupes K-Fêt (depuis le site K-Fêt) + quelques améliorations #565

Draft
delobell wants to merge 17 commits from aureplop/kfet-auth_cms into aureplop/kfet-auth

17 commits

Author SHA1 Message Date
Aurélien Delobelle
e3e8608563 Merge branch 'aureplop/kfet-auth' into aureplop/kfet-auth_cms 2019-01-14 22:07:52 +01:00
Martin Pépin
02f1e83420 typos 2017-10-25 20:57:17 +02:00
Aurélien Delobelle
6d90311ae1 Fix tests, force reevaluate field queryset 2017-10-25 20:57:17 +02:00
Aurélien Delobelle
a7dbc64e2b Fix SnippetsCmsForm
+ Prevent querying the database from tests too soon.

=> tests pass.
2017-10-25 20:57:17 +02:00
Aurélien Delobelle
94ab754f82 Move group-related views tests to kfetauth tests 2017-10-25 20:26:35 +02:00
Aurélien Delobelle
94f21c062a SnippetCmsGroupForm should not clean previous permissions 2017-10-25 03:12:22 +02:00
Aurélien Delobelle
e39f88991e Fix migration history 2017-10-24 19:49:52 +02:00
Aurélien Delobelle
03a0c58869 Merge branch 'aureplop/kfet-auth' into aureplop/kfet-auth_cms
+ Move migrations.
2017-10-24 19:48:47 +02:00
Aurélien Delobelle
aa405d212a Fix tests…
…due to merge of aureplop/kfet-auth
2017-10-24 19:44:02 +02:00
Aurélien Delobelle
c524da22fe Merge branch 'aureplop/kfet-auth' into aureplop/kfet-auth_cms
+ Move migrations.
+ Update tests to use new url names and new permissions.
2017-10-24 19:41:45 +02:00
Aurélien Delobelle
097ee44131 Organize migrations to avoid issues with…
…migrations already applied from master.
2017-10-17 16:50:39 +02:00
Aurélien Delobelle
2c76bea1e6 Better display of objects of BasePermissionsField
- Permissions are grouped by content type and displayed under its
verbose_name_plural.
- Default permissions appear before custom ones.
- Use `permissions-field` class to enhance display.
2017-10-17 16:50:39 +02:00
Aurélien Delobelle
07f1a53532 CMS permissions can be managed from group views.
These permissions concern pages, images, documents and access to the
wagtail admin site. Only appropriate elements can be selected: only the
kfet root page and its descendants, same for the kfet root collection
(for images and documents), and kfet snippets (MemberTeam).

Add django-formset-js as dependency to help manipulate formsets.

K-Fêt groups created from "devdata" commands get suitable permissions
for the CMS.
2017-10-17 16:50:39 +02:00
Aurélien Delobelle
82582866b4 Clean forms/views/urls related to kfetauth.Group…
…and it becomes possible to add extra forms/formsets to the create and
update group views.
2017-10-17 16:50:39 +02:00
Aurélien Delobelle
5502c6876a Clean permissions objects
- Define default permissions of kfet models.
- Unused default permissions are deleted.
- `kfet.manage_perms` is now splitted as `kfetauth.(view|add|change)_group` permissions.
2017-10-17 16:49:45 +02:00
Aurélien Delobelle
df7594a105 Move KFetConfigForm to kfet.config
Import in `ready` method of kfet app config of `kfet.forms` may be
annoying because it starts executing `__init__` methods of fields.
Causing failures if these methods does DB calls, as `ready` may be
called before applying migrations.
2017-10-12 13:53:48 +02:00
Aurélien Delobelle
e6fab703ee Use convenience imports 2017-10-12 13:42:06 +02:00