From e9f18c3ed9956bec07d6b71e391f7e275534663b Mon Sep 17 00:00:00 2001 From: bleizi Date: Wed, 24 Jan 2024 19:18:02 +0100 Subject: [PATCH 001/102] migrate to django 4.2 (LTS), change requirement and tests. remove depreciated ifnotequal --- .gitlab-ci.yml | 34 +++++++++--------- apps/note/templates/note/amount_input.html | 2 +- note_kfet/templates/autocomplete_model.html | 2 +- requirements.txt | 38 ++++++++++----------- tox.ini | 6 ++-- 5 files changed, 42 insertions(+), 40 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 97110ecd..98fbac88 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,21 +7,6 @@ stages: variables: GIT_SUBMODULE_STRATEGY: recursive -# Debian Buster -py37-django22: - stage: test - image: debian:buster-backports - before_script: - - > - apt-get update && - apt-get install --no-install-recommends -t buster-backports -y - python3-django python3-django-crispy-forms - python3-django-extensions python3-django-filters python3-django-polymorphic - python3-djangorestframework python3-django-oauth-toolkit python3-psycopg2 python3-pil - python3-babel python3-lockfile python3-pip python3-phonenumbers python3-memcache - python3-bs4 python3-setuptools tox texlive-xetex - script: tox -e py37-django22 - # Ubuntu 20.04 py38-django22: stage: test @@ -54,9 +39,26 @@ py39-django22: python3-bs4 python3-setuptools tox texlive-xetex script: tox -e py39-django22 +# Debian Bookworm +py311-django42: + stage: test + image: debian:bookworm + before_script: + - > + apt-get update && + apt-get install --no-install-recommends -y + python3-django python3-django-crispy-forms + python3-django-extensions python3-django-filters python3-django-polymorphic + python3-djangorestframework python3-django-oauth-toolkit python3-psycopg2 python3-pil + python3-babel python3-lockfile python3-pip python3-phonenumbers python3-memcache + python3-bs4 python3-setuptools tox texlive-xetex + script: tox -e py311-django42 + + + linters: stage: quality-assurance - image: debian:buster-backports + image: debian:bookworm before_script: - apt-get update && apt-get install -y tox script: tox -e linters diff --git a/apps/note/templates/note/amount_input.html b/apps/note/templates/note/amount_input.html index d4873115..cbe9d160 100644 --- a/apps/note/templates/note/amount_input.html +++ b/apps/note/templates/note/amount_input.html @@ -9,7 +9,7 @@ SPDX-License-Identifier: GPL-3.0-or-later name="{{ widget.name }}" {# Other attributes are loaded #} {% for name, value in widget.attrs.items %} - {% ifnotequal value False %}{{ name }}{% ifnotequal value True %}="{{ value|stringformat:'s' }}"{% endifnotequal %}{% endifnotequal %} + {% if value is not False %}{{ name }}{% if value is not True %}="{{ value|stringformat:'s' }}"{% endif %}{% endif %} {% endfor %}>
diff --git a/note_kfet/templates/autocomplete_model.html b/note_kfet/templates/autocomplete_model.html index fa24213f..5ffe971d 100644 --- a/note_kfet/templates/autocomplete_model.html +++ b/note_kfet/templates/autocomplete_model.html @@ -8,7 +8,7 @@ SPDX-License-Identifier: GPL-3.0-or-later {% if widget.value != None and widget.value != "" %}value="{{ widget.value }}"{% endif %} name="{{ widget.name }}_name" autocomplete="off" {% for name, value in widget.attrs.items %} - {% ifnotequal value False %}{{ name }}{% ifnotequal value True %}="{{ value|stringformat:'s' }}"{% endifnotequal %}{% endifnotequal %} + {% if value is not False %}{{ name }}{% if value is not True %}="{{ value|stringformat:'s' }}"{% endif %}{% endif %} {% endfor %} aria-describedby="{{widget.attrs.id}}_tooltip"> {% if widget.resetable %} diff --git a/requirements.txt b/requirements.txt index f4ece220..5548fd4b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,19 +1,19 @@ -beautifulsoup4~=4.7.1 -Django~=2.2.15 -django-bootstrap-datepicker-plus~=3.0.5 -django-cas-server~=1.2.0 -django-colorfield~=0.3.2 -django-crispy-forms~=1.7.2 -django-extensions>=2.1.4 -django-filter~=2.1 -django-htcpcp-tea~=0.3.1 -django-mailer~=2.0.1 -django-oauth-toolkit~=1.3.3 -django-phonenumber-field~=5.0.0 -django-polymorphic>=2.0.3,<3.0.0 -djangorestframework>=3.9.0,<3.13.0 -django-rest-polymorphic~=0.1.9 -django-tables2~=2.3.1 -python-memcached~=1.59 -phonenumbers~=8.9.10 -Pillow>=5.4.1 +beautifulsoup4~=4.12.3 +Django~=4.2.9 +django-bootstrap-datepicker-plus~=5.0.5 +django-cas-server~=2.0.0 +django-colorfield~=0.11.0 +django-crispy-forms~=2.1.0 +django-extensions>=3.2.3 +django-filter~=23.5 +django-htcpcp-tea~=0.8.1 +django-mailer~=2.3.1 +django-oauth-toolkit~=2.3.0 +django-phonenumber-field~=7.3.0 +django-polymorphic~=3.1.0 +djangorestframework~=3.14.0 +django-rest-polymorphic~=0.1.10 +django-tables2~=2.7.0 +python-memcached~=1.62 +phonenumbers~=8.13.28 +Pillow>=10.2.0 diff --git a/tox.ini b/tox.ini index ad3c6798..0526236f 100644 --- a/tox.ini +++ b/tox.ini @@ -1,14 +1,14 @@ [tox] envlist = - # Debian Buster Python - py37-django22 - # Ubuntu 20.04 Python py38-django22 # Debian Bullseye Python py39-django22 + # Debian Bookworm Python + py311-django42 + linters skipsdist = True From 2f8c9b54e7c42bbd62dca80d658832c77f36f992 Mon Sep 17 00:00:00 2001 From: bleizi Date: Wed, 24 Jan 2024 19:58:55 +0100 Subject: [PATCH 002/102] Remove importation of django-cas-server which is not compatible with django 4.2 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 5548fd4b..7af89d9f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ beautifulsoup4~=4.12.3 Django~=4.2.9 django-bootstrap-datepicker-plus~=5.0.5 -django-cas-server~=2.0.0 +#django-cas-server~=2.0.0 django-colorfield~=0.11.0 django-crispy-forms~=2.1.0 django-extensions>=3.2.3 From 516a7f4be57360e917143c35abd7b21996999e6d Mon Sep 17 00:00:00 2001 From: bleizi Date: Wed, 24 Jan 2024 20:14:32 +0100 Subject: [PATCH 003/102] Remove importation of django-htcpcp-tea which is not compatible with django 4.2 --- note_kfet/settings/base.py | 2 +- note_kfet/urls.py | 8 +++++--- requirements.txt | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/note_kfet/settings/base.py b/note_kfet/settings/base.py index f3c23f4d..1e9e0752 100644 --- a/note_kfet/settings/base.py +++ b/note_kfet/settings/base.py @@ -41,7 +41,7 @@ INSTALLED_APPS = [ 'bootstrap_datepicker_plus', 'colorfield', 'crispy_forms', - 'django_htcpcp_tea', +# 'django_htcpcp_tea', 'django_tables2', 'mailer', 'phonenumber_field', diff --git a/note_kfet/urls.py b/note_kfet/urls.py index 7fc37fa7..72be36ea 100644 --- a/note_kfet/urls.py +++ b/note_kfet/urls.py @@ -30,9 +30,6 @@ urlpatterns = [ path('accounts/', include('django.contrib.auth.urls')), path('api/', include('api.urls')), path('permission/', include('permission.urls')), - - # Make coffee - path('coffee/', include('django_htcpcp_tea.urls')), ] # During development, serve static and media files @@ -57,6 +54,11 @@ if "debug_toolbar" in settings.INSTALLED_APPS: path('__debug__/', include(debug_toolbar.urls)), ] + urlpatterns +if "django_htcpcp_tea" in settings.INSTALLED_APPS: + # Make coffee + urlpatterns.append( + path('coffee/', include('django_htcpcp_tea.urls')) + ) handler400 = bad_request handler403 = permission_denied diff --git a/requirements.txt b/requirements.txt index 7af89d9f..1750cd66 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,7 +6,7 @@ django-colorfield~=0.11.0 django-crispy-forms~=2.1.0 django-extensions>=3.2.3 django-filter~=23.5 -django-htcpcp-tea~=0.8.1 +#django-htcpcp-tea~=0.8.1 django-mailer~=2.3.1 django-oauth-toolkit~=2.3.0 django-phonenumber-field~=7.3.0 From d228dbf225767303e98f08660abfd66ef332b1e1 Mon Sep 17 00:00:00 2001 From: bleizi Date: Wed, 7 Feb 2024 18:02:56 +0100 Subject: [PATCH 004/102] fix some breaking changes and linters --- apps/member/views.py | 2 +- apps/note/api/views.py | 2 +- apps/note/tests/test_transactions.py | 2 +- apps/permission/scopes.py | 2 ++ apps/treasury/api/views.py | 2 +- apps/treasury/urls.py | 4 ++-- note_kfet/admin.py | 4 ++-- note_kfet/settings/base.py | 3 +++ 8 files changed, 13 insertions(+), 8 deletions(-) diff --git a/apps/member/views.py b/apps/member/views.py index 066a7ef3..e56ed7b2 100644 --- a/apps/member/views.py +++ b/apps/member/views.py @@ -26,7 +26,7 @@ from permission.backends import PermissionBackend from permission.models import Role from permission.views import ProtectQuerysetMixin, ProtectedCreateView -from .forms import UserForm, ProfileForm, ImageForm, ClubForm, MembershipForm,\ +from .forms import UserForm, ProfileForm, ImageForm, ClubForm, MembershipForm, \ CustomAuthenticationForm, MembershipRolesForm from .models import Club, Membership from .tables import ClubTable, UserTable, MembershipTable, ClubManagerTable diff --git a/apps/note/api/views.py b/apps/note/api/views.py index 34ffaf2d..bc4f99ef 100644 --- a/apps/note/api/views.py +++ b/apps/note/api/views.py @@ -13,7 +13,7 @@ from rest_framework import status from api.viewsets import ReadProtectedModelViewSet, ReadOnlyProtectedModelViewSet from permission.backends import PermissionBackend -from .serializers import NotePolymorphicSerializer, AliasSerializer, ConsumerSerializer,\ +from .serializers import NotePolymorphicSerializer, AliasSerializer, ConsumerSerializer, \ TemplateCategorySerializer, TransactionTemplateSerializer, TransactionPolymorphicSerializer, \ TrustSerializer from ..models.notes import Note, Alias, NoteUser, NoteClub, NoteSpecial, Trust diff --git a/apps/note/tests/test_transactions.py b/apps/note/tests/test_transactions.py index 4f5dd6c5..1f0920ec 100644 --- a/apps/note/tests/test_transactions.py +++ b/apps/note/tests/test_transactions.py @@ -10,7 +10,7 @@ from django.urls import reverse from django.utils import timezone from permission.models import Role -from ..api.views import AliasViewSet, ConsumerViewSet, NotePolymorphicViewSet, TemplateCategoryViewSet,\ +from ..api.views import AliasViewSet, ConsumerViewSet, NotePolymorphicViewSet, TemplateCategoryViewSet, \ TransactionTemplateViewSet, TransactionViewSet from ..models import NoteUser, Transaction, TemplateCategory, TransactionTemplate, RecurrentTransaction, \ MembershipTransaction, SpecialTransaction, NoteSpecial, Alias, Note diff --git a/apps/permission/scopes.py b/apps/permission/scopes.py index 65242804..f8fd7687 100644 --- a/apps/permission/scopes.py +++ b/apps/permission/scopes.py @@ -44,6 +44,8 @@ class PermissionOAuth2Validator(OAuth2Validator): subset of permissions. """ + oidc_claim_scope = None # fix breaking change of django-oauth-toolkit 2.0.0 + valid_scopes = set() for t in Permission.PERMISSION_TYPES: diff --git a/apps/treasury/api/views.py b/apps/treasury/api/views.py index e6ba9ced..36388279 100644 --- a/apps/treasury/api/views.py +++ b/apps/treasury/api/views.py @@ -5,7 +5,7 @@ from django_filters.rest_framework import DjangoFilterBackend from rest_framework.filters import SearchFilter from api.viewsets import ReadProtectedModelViewSet -from .serializers import InvoiceSerializer, ProductSerializer, RemittanceTypeSerializer, RemittanceSerializer,\ +from .serializers import InvoiceSerializer, ProductSerializer, RemittanceTypeSerializer, RemittanceSerializer, \ SogeCreditSerializer from ..models import Invoice, Product, RemittanceType, Remittance, SogeCredit diff --git a/apps/treasury/urls.py b/apps/treasury/urls.py index 4fe87924..144ae296 100644 --- a/apps/treasury/urls.py +++ b/apps/treasury/urls.py @@ -3,8 +3,8 @@ from django.urls import path -from .views import InvoiceCreateView, InvoiceListView, InvoiceUpdateView, InvoiceDeleteView, InvoiceRenderView,\ - RemittanceListView, RemittanceCreateView, RemittanceUpdateView, LinkTransactionToRemittanceView,\ +from .views import InvoiceCreateView, InvoiceListView, InvoiceUpdateView, InvoiceDeleteView, InvoiceRenderView, \ + RemittanceListView, RemittanceCreateView, RemittanceUpdateView, LinkTransactionToRemittanceView, \ UnlinkTransactionToRemittanceView, SogeCreditListView, SogeCreditManageView app_name = 'treasury' diff --git a/note_kfet/admin.py b/note_kfet/admin.py index dc209c67..1f26f559 100644 --- a/note_kfet/admin.py +++ b/note_kfet/admin.py @@ -25,8 +25,8 @@ admin_site.register(Site, SiteAdmin) # Add external apps model if "oauth2_provider" in settings.INSTALLED_APPS: - from oauth2_provider.admin import Application, ApplicationAdmin, Grant, \ - GrantAdmin, AccessToken, AccessTokenAdmin, RefreshToken, RefreshTokenAdmin + from oauth2_provider.admin import ApplicationAdmin, GrantAdmin, AccessTokenAdmin, RefreshTokenAdmin + from oauth2_provider.model import Application, Grant, AccessToken, RefreshToken admin_site.register(Application, ApplicationAdmin) admin_site.register(Grant, GrantAdmin) admin_site.register(AccessToken, AccessTokenAdmin) diff --git a/note_kfet/settings/base.py b/note_kfet/settings/base.py index 1e9e0752..fe466b1e 100644 --- a/note_kfet/settings/base.py +++ b/note_kfet/settings/base.py @@ -263,6 +263,9 @@ OAUTH2_PROVIDER = { 'REFRESH_TOKEN_EXPIRE_SECONDS': timedelta(days=14), } +# PKCE (fix a breaking change of django-oauth-toolkit 2.0.0) +PKCE_REQUIRED = False + # Take control on how widget templates are sourced # See https://docs.djangoproject.com/en/2.2/ref/forms/renderers/#templatessetting FORM_RENDERER = 'django.forms.renderers.TemplatesSetting' From b6b81a8b8f1d1b9d3d388abb0f698550b19f96fb Mon Sep 17 00:00:00 2001 From: bleizi Date: Wed, 7 Feb 2024 18:05:32 +0100 Subject: [PATCH 005/102] typo --- note_kfet/admin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/note_kfet/admin.py b/note_kfet/admin.py index 1f26f559..62d2c688 100644 --- a/note_kfet/admin.py +++ b/note_kfet/admin.py @@ -26,7 +26,7 @@ admin_site.register(Site, SiteAdmin) # Add external apps model if "oauth2_provider" in settings.INSTALLED_APPS: from oauth2_provider.admin import ApplicationAdmin, GrantAdmin, AccessTokenAdmin, RefreshTokenAdmin - from oauth2_provider.model import Application, Grant, AccessToken, RefreshToken + from oauth2_provider.models import Application, Grant, AccessToken, RefreshToken admin_site.register(Application, ApplicationAdmin) admin_site.register(Grant, GrantAdmin) admin_site.register(AccessToken, AccessTokenAdmin) From abc88d0118c7f3bbc060058cc5a50a45da3e9f6e Mon Sep 17 00:00:00 2001 From: bleizi Date: Wed, 7 Feb 2024 18:21:08 +0100 Subject: [PATCH 006/102] replace url from django.conf.urls by re_path from django.urls --- apps/api/urls.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/apps/api/urls.py b/apps/api/urls.py index 5d8b8b98..cb342b1c 100644 --- a/apps/api/urls.py +++ b/apps/api/urls.py @@ -2,7 +2,8 @@ # SPDX-License-Identifier: GPL-3.0-or-later from django.conf import settings -from django.conf.urls import url, include +from django.conf.urls import include +from django.urls import re_path from rest_framework import routers from .views import UserInformationView @@ -47,7 +48,7 @@ app_name = 'api' # Wire up our API using automatic URL routing. # Additionally, we include login URLs for the browsable API. urlpatterns = [ - url('^', include(router.urls)), - url('^me/', UserInformationView.as_view()), - url('^api-auth/', include('rest_framework.urls', namespace='rest_framework')), + re_path('^', include(router.urls)), + re_path('^me/', UserInformationView.as_view()), + re_path('^api-auth/', include('rest_framework.urls', namespace='rest_framework')), ] From 82fea65b5edbf58b6bd469cdfef63dab037adef1 Mon Sep 17 00:00:00 2001 From: bleizi Date: Wed, 7 Feb 2024 20:00:58 +0100 Subject: [PATCH 007/102] django_htcpcp_tea in middleware only if in apps --- apps/api/urls.py | 2 +- note_kfet/settings/base.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/api/urls.py b/apps/api/urls.py index cb342b1c..4cb8085e 100644 --- a/apps/api/urls.py +++ b/apps/api/urls.py @@ -2,7 +2,7 @@ # SPDX-License-Identifier: GPL-3.0-or-later from django.conf import settings -from django.conf.urls import include +from django.conf.urls import include from django.urls import re_path from rest_framework import routers diff --git a/note_kfet/settings/base.py b/note_kfet/settings/base.py index fe466b1e..d653dfc6 100644 --- a/note_kfet/settings/base.py +++ b/note_kfet/settings/base.py @@ -90,12 +90,14 @@ MIDDLEWARE = [ 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'django.middleware.locale.LocaleMiddleware', 'django.contrib.sites.middleware.CurrentSiteMiddleware', - 'django_htcpcp_tea.middleware.HTCPCPTeaMiddleware', 'note_kfet.middlewares.SessionMiddleware', 'note_kfet.middlewares.LoginByIPMiddleware', 'note_kfet.middlewares.TurbolinksMiddleware', 'note_kfet.middlewares.ClacksMiddleware', ] +if "django_htcpcp_tea" in INSTALLED_APPS: + MIDDLEWARE.append('django_htcpcp_tea.middleware.HTCPCPTeaMiddleware') + ROOT_URLCONF = 'note_kfet.urls' From 399a32bece44af5b322d3089eb09a9dc31928393 Mon Sep 17 00:00:00 2001 From: bleizi Date: Sun, 11 Feb 2024 16:51:48 +0100 Subject: [PATCH 008/102] default auto field --- note_kfet/settings/base.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/note_kfet/settings/base.py b/note_kfet/settings/base.py index d653dfc6..9ba5bb34 100644 --- a/note_kfet/settings/base.py +++ b/note_kfet/settings/base.py @@ -300,3 +300,6 @@ PHONENUMBER_DEFAULT_REGION = 'FR' # We add custom information to CAS, in order to give a normalized name to other services CAS_AUTH_CLASS = 'member.auth.CustomAuthUser' + +# Default field for primary key +DEFAULT_AUTO_FIELD = "django.db.models.AutoField" From fb3337966e029a1d69f5e25f1c5d5e588ec3af11 Mon Sep 17 00:00:00 2001 From: bleizi Date: Sun, 11 Feb 2024 22:24:37 +0100 Subject: [PATCH 009/102] bootstrap4 is now a standalone package from crispy-forms --- note_kfet/settings/base.py | 2 ++ requirements.txt | 1 + 2 files changed, 3 insertions(+) diff --git a/note_kfet/settings/base.py b/note_kfet/settings/base.py index 9ba5bb34..44c34020 100644 --- a/note_kfet/settings/base.py +++ b/note_kfet/settings/base.py @@ -40,6 +40,7 @@ INSTALLED_APPS = [ # External apps 'bootstrap_datepicker_plus', 'colorfield', + 'crispy_bootstrap4', 'crispy_forms', # 'django_htcpcp_tea', 'django_tables2', @@ -279,6 +280,7 @@ LOGIN_REDIRECT_URL = '/' SESSION_COOKIE_AGE = 60 * 60 * 3 # Use Crispy Bootstrap4 theme +CRISPY_ALLOWED_TEMPLATE_PACKS = 'bootstrap4' CRISPY_TEMPLATE_PACK = 'bootstrap4' # Use Django Table2 Bootstrap4 theme diff --git a/requirements.txt b/requirements.txt index 1750cd66..f4a32c97 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,5 @@ beautifulsoup4~=4.12.3 +crispy-bootstrap4~=2023.1 Django~=4.2.9 django-bootstrap-datepicker-plus~=5.0.5 #django-cas-server~=2.0.0 From 2ee7f41dfebdc53de4a4b3341bc05977c2050ebb Mon Sep 17 00:00:00 2001 From: bleizi Date: Mon, 12 Feb 2024 21:25:07 +0100 Subject: [PATCH 010/102] tests with ubuntu 22.04, django-bootstrap-datepicker-plus is a standalone package and fix encoding in tests --- .gitlab-ci.yml | 38 ++-- apps/activity/forms.py | 3 +- apps/member/forms.py | 5 +- apps/note/forms.py | 3 +- apps/wei/forms/registration.py | 3 +- apps/wei/tests/test_wei_registration.py | 4 +- note_kfet/inputs.py | 261 ------------------------ tox.ini | 8 +- 8 files changed, 34 insertions(+), 291 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 98fbac88..23ba25aa 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,25 +7,8 @@ stages: variables: GIT_SUBMODULE_STRATEGY: recursive -# Ubuntu 20.04 -py38-django22: - stage: test - image: ubuntu:20.04 - before_script: - # Fix tzdata prompt - - ln -sf /usr/share/zoneinfo/Europe/Paris /etc/localtime && echo Europe/Paris > /etc/timezone - - > - apt-get update && - apt-get install --no-install-recommends -y - python3-django python3-django-crispy-forms - python3-django-extensions python3-django-filters python3-django-polymorphic - python3-djangorestframework python3-django-oauth-toolkit python3-psycopg2 python3-pil - python3-babel python3-lockfile python3-pip python3-phonenumbers python3-memcache - python3-bs4 python3-setuptools tox texlive-xetex - script: tox -e py38-django22 - # Debian Bullseye -py39-django22: +py39-django42: stage: test image: debian:bullseye before_script: @@ -37,7 +20,24 @@ py39-django22: python3-djangorestframework python3-django-oauth-toolkit python3-psycopg2 python3-pil python3-babel python3-lockfile python3-pip python3-phonenumbers python3-memcache python3-bs4 python3-setuptools tox texlive-xetex - script: tox -e py39-django22 + script: tox -e py39-django42 + +# Ubuntu 22.04 +py310-django42: + stage: test + image: ubuntu:22.04 + before_script: + # Fix tzdata prompt + - ln -sf /usr/share/zoneinfo/Europe/Paris /etc/localtime && echo Europe/Paris > /etc/timezone + - > + apt-get update && + apt-get install --no-install-recommends -y + python3-django python3-django-crispy-forms + python3-django-extensions python3-django-filters python3-django-polymorphic + python3-djangorestframework python3-django-oauth-toolkit python3-psycopg2 python3-pil + python3-babel python3-lockfile python3-pip python3-phonenumbers python3-memcache + python3-bs4 python3-setuptools tox texlive-xetex + script: tox -e py38-django42 # Debian Bookworm py311-django42: diff --git a/apps/activity/forms.py b/apps/activity/forms.py index 1ca98cef..f8744f14 100644 --- a/apps/activity/forms.py +++ b/apps/activity/forms.py @@ -4,13 +4,14 @@ from datetime import timedelta from random import shuffle +from bootstrap_datepicker_plus.widgets import DateTimePickerInput from django import forms from django.contrib.contenttypes.models import ContentType from django.utils import timezone from django.utils.translation import gettext_lazy as _ from member.models import Club from note.models import Note, NoteUser -from note_kfet.inputs import Autocomplete, DateTimePickerInput +from note_kfet.inputs import Autocomplete from note_kfet.middlewares import get_current_request from permission.backends import PermissionBackend diff --git a/apps/member/forms.py b/apps/member/forms.py index 527816cb..420b35a4 100644 --- a/apps/member/forms.py +++ b/apps/member/forms.py @@ -3,7 +3,7 @@ import io -from PIL import Image, ImageSequence +from bootstrap_datepicker_plus.widgets import DatePickerInput from django import forms from django.conf import settings from django.contrib.auth.forms import AuthenticationForm @@ -13,8 +13,9 @@ from django.forms import CheckboxSelectMultiple from django.utils import timezone from django.utils.translation import gettext_lazy as _ from note.models import NoteSpecial, Alias -from note_kfet.inputs import Autocomplete, AmountInput, DatePickerInput +from note_kfet.inputs import Autocomplete, AmountInput from permission.models import PermissionMask, Role +from PIL import Image, ImageSequence from .models import Profile, Club, Membership diff --git a/apps/note/forms.py b/apps/note/forms.py index 791abb51..f496843a 100644 --- a/apps/note/forms.py +++ b/apps/note/forms.py @@ -2,12 +2,13 @@ # SPDX-License-Identifier: GPL-3.0-or-later from datetime import datetime +from bootstrap_datepicker_plus.widgets import DateTimePickerInput from django import forms from django.contrib.contenttypes.models import ContentType from django.forms import CheckboxSelectMultiple from django.utils.timezone import make_aware from django.utils.translation import gettext_lazy as _ -from note_kfet.inputs import Autocomplete, AmountInput, DateTimePickerInput +from note_kfet.inputs import Autocomplete, AmountInput from .models import TransactionTemplate, NoteClub, Alias diff --git a/apps/wei/forms/registration.py b/apps/wei/forms/registration.py index 408071f4..65a98bfe 100644 --- a/apps/wei/forms/registration.py +++ b/apps/wei/forms/registration.py @@ -1,13 +1,14 @@ # Copyright (C) 2018-2023 by BDE ENS Paris-Saclay # SPDX-License-Identifier: GPL-3.0-or-later +from bootstrap_datepicker_plus.widgets import DatePickerInput from django import forms from django.contrib.auth.models import User from django.db.models import Q from django.forms import CheckboxSelectMultiple from django.utils.translation import gettext_lazy as _ from note.models import NoteSpecial, NoteUser -from note_kfet.inputs import AmountInput, DatePickerInput, Autocomplete, ColorWidget +from note_kfet.inputs import AmountInput, Autocomplete, ColorWidget from ..models import WEIClub, WEIRegistration, Bus, BusTeam, WEIMembership, WEIRole diff --git a/apps/wei/tests/test_wei_registration.py b/apps/wei/tests/test_wei_registration.py index 86dd4cfd..2ca28e43 100644 --- a/apps/wei/tests/test_wei_registration.py +++ b/apps/wei/tests/test_wei_registration.py @@ -439,7 +439,7 @@ class TestWEIRegistration(TestCase): emergency_contact_phone='+33123456789', )) self.assertEqual(response.status_code, 200) - self.assertTrue("This user can't be in her/his first year since he/she has already participated to a WEI." + self.assertTrue("This user can't be in her/his first year since he/she has already participated to a WEI." in str(response.context["form"].errors)) # Check that if the WEI is started, we can't register anyone @@ -635,7 +635,7 @@ class TestWEIRegistration(TestCase): )) self.assertEqual(response.status_code, 200) self.assertFalse(response.context["form"].is_valid()) - self.assertTrue("This team doesn't belong to the given bus." in str(response.context["form"].errors)) + self.assertTrue("This team doesn't belong to the given bus." in str(response.context["form"].errors)) response = self.client.post(reverse("wei:validate_registration", kwargs=dict(pk=self.registration.pk)), dict( roles=[WEIRole.objects.get(name="GC WEI").id], diff --git a/note_kfet/inputs.py b/note_kfet/inputs.py index 6e729c47..e6e7f8f9 100644 --- a/note_kfet/inputs.py +++ b/note_kfet/inputs.py @@ -68,264 +68,3 @@ class ColorWidget(Widget): def value_from_datadict(self, data, files, name): val = super().value_from_datadict(data, files, name) return int(val[1:], 16) - - -""" -The remaining of this file comes from the project `django-bootstrap-datepicker-plus` available on Github: -https://github.com/monim67/django-bootstrap-datepicker-plus -This is distributed under Apache License 2.0. - -This adds datetime pickers with bootstrap. -""" - -"""Contains Base Date-Picker input class for widgets of this package.""" - - -class DatePickerDictionary: - """Keeps track of all date-picker input classes.""" - - _i = 0 - items = dict() - - @classmethod - def generate_id(cls): - """Return a unique ID for each date-picker input class.""" - cls._i += 1 - return 'dp_%s' % cls._i - - -class BasePickerInput(DateTimeBaseInput): - """Base Date-Picker input class for widgets of this package.""" - - template_name = 'bootstrap_datepicker_plus/date-picker.html' - picker_type = 'DATE' - format = '%Y-%m-%d' - config = {} - _default_config = { - 'id': None, - 'picker_type': None, - 'linked_to': None, - 'options': {} # final merged options - } - options = {} # options extended by user - options_param = {} # options passed as parameter - _default_options = { - 'showClose': True, - 'showClear': True, - 'showTodayButton': True, - "locale": "fr", - } - - # source: https://github.com/tutorcruncher/django-bootstrap3-datetimepicker - # file: /blob/31fbb09/bootstrap3_datetime/widgets.py#L33 - format_map = ( - ('DDD', r'%j'), - ('DD', r'%d'), - ('MMMM', r'%B'), - ('MMM', r'%b'), - ('MM', r'%m'), - ('YYYY', r'%Y'), - ('YY', r'%y'), - ('HH', r'%H'), - ('hh', r'%I'), - ('mm', r'%M'), - ('ss', r'%S'), - ('a', r'%p'), - ('ZZ', r'%z'), - ) - - class Media: - """JS/CSS resources needed to render the date-picker calendar.""" - - js = ( - 'https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.9.0/' - 'moment-with-locales.min.js', - 'https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/' - '4.17.47/js/bootstrap-datetimepicker.min.js', - 'bootstrap_datepicker_plus/js/datepicker-widget.js' - ) - css = {'all': ( - 'https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/' - '4.17.47/css/bootstrap-datetimepicker.css', - 'bootstrap_datepicker_plus/css/datepicker-widget.css' - ), } - - @classmethod - def format_py2js(cls, datetime_format): - """Convert python datetime format to moment datetime format.""" - for js_format, py_format in cls.format_map: - datetime_format = datetime_format.replace(py_format, js_format) - return datetime_format - - @classmethod - def format_js2py(cls, datetime_format): - """Convert moment datetime format to python datetime format.""" - for js_format, py_format in cls.format_map: - datetime_format = datetime_format.replace(js_format, py_format) - return datetime_format - - def __init__(self, attrs=None, format=None, options=None): - """Initialize the Date-picker widget.""" - self.format_param = format - self.options_param = options if options else {} - self.config = self._default_config.copy() - self.config['id'] = DatePickerDictionary.generate_id() - self.config['picker_type'] = self.picker_type - self.config['options'] = self._calculate_options() - attrs = attrs if attrs else {} - if 'class' not in attrs: - attrs['class'] = 'form-control' - super().__init__(attrs, self._calculate_format()) - - def _calculate_options(self): - """Calculate and Return the options.""" - _options = self._default_options.copy() - _options.update(self.options) - if self.options_param: - _options.update(self.options_param) - return _options - - def _calculate_format(self): - """Calculate and Return the datetime format.""" - _format = self.format_param if self.format_param else self.format - if self.config['options'].get('format'): - _format = self.format_js2py(self.config['options'].get('format')) - else: - self.config['options']['format'] = self.format_py2js(_format) - return _format - - def get_context(self, name, value, attrs): - """Return widget context dictionary.""" - context = super().get_context( - name, value, attrs) - context['widget']['attrs']['dp_config'] = json_dumps(self.config) - return context - - def start_of(self, event_id): - """ - Set Date-Picker as the start-date of a date-range. - - Args: - - event_id (string): User-defined unique id for linking two fields - """ - DatePickerDictionary.items[str(event_id)] = self - return self - - def end_of(self, event_id, import_options=True): - """ - Set Date-Picker as the end-date of a date-range. - - Args: - - event_id (string): User-defined unique id for linking two fields - - import_options (bool): inherit options from start-date input, - default: TRUE - """ - event_id = str(event_id) - if event_id in DatePickerDictionary.items: - linked_picker = DatePickerDictionary.items[event_id] - self.config['linked_to'] = linked_picker.config['id'] - if import_options: - backup_moment_format = self.config['options']['format'] - self.config['options'].update(linked_picker.config['options']) - self.config['options'].update(self.options_param) - if self.format_param or 'format' in self.options_param: - self.config['options']['format'] = backup_moment_format - else: - self.format = linked_picker.format - # Setting useCurrent is necessary, see following issue - # https://github.com/Eonasdan/bootstrap-datetimepicker/issues/1075 - self.config['options']['useCurrent'] = False - self._link_to(linked_picker) - else: - raise KeyError( - 'start-date not specified for event_id "%s"' % event_id) - return self - - def _link_to(self, linked_picker): - """ - Executed when two date-inputs are linked together. - - This method for sub-classes to override to customize the linking. - """ - pass - - -class DatePickerInput(BasePickerInput): - """ - Widget to display a Date-Picker Calendar on a DateField property. - - Args: - - attrs (dict): HTML attributes of rendered HTML input - - format (string): Python DateTime format eg. "%Y-%m-%d" - - options (dict): Options to customize the widget, see README - """ - - picker_type = 'DATE' - format = '%Y-%m-%d' - format_key = 'DATE_INPUT_FORMATS' - - -class TimePickerInput(BasePickerInput): - """ - Widget to display a Time-Picker Calendar on a TimeField property. - - Args: - - attrs (dict): HTML attributes of rendered HTML input - - format (string): Python DateTime format eg. "%Y-%m-%d" - - options (dict): Options to customize the widget, see README - """ - - picker_type = 'TIME' - format = '%H:%M' - format_key = 'TIME_INPUT_FORMATS' - template_name = 'bootstrap_datepicker_plus/time_picker.html' - - -class DateTimePickerInput(BasePickerInput): - """ - Widget to display a DateTime-Picker Calendar on a DateTimeField property. - - Args: - - attrs (dict): HTML attributes of rendered HTML input - - format (string): Python DateTime format eg. "%Y-%m-%d" - - options (dict): Options to customize the widget, see README - """ - - picker_type = 'DATETIME' - format = '%Y-%m-%d %H:%M' - format_key = 'DATETIME_INPUT_FORMATS' - - -class MonthPickerInput(BasePickerInput): - """ - Widget to display a Month-Picker Calendar on a DateField property. - - Args: - - attrs (dict): HTML attributes of rendered HTML input - - format (string): Python DateTime format eg. "%Y-%m-%d" - - options (dict): Options to customize the widget, see README - """ - - picker_type = 'MONTH' - format = '01/%m/%Y' - format_key = 'DATE_INPUT_FORMATS' - - -class YearPickerInput(BasePickerInput): - """ - Widget to display a Year-Picker Calendar on a DateField property. - - Args: - - attrs (dict): HTML attributes of rendered HTML input - - format (string): Python DateTime format eg. "%Y-%m-%d" - - options (dict): Options to customize the widget, see README - """ - - picker_type = 'YEAR' - format = '01/01/%Y' - format_key = 'DATE_INPUT_FORMATS' - - def _link_to(self, linked_picker): - """Customize the options when linked with other date-time input""" - yformat = self.config['options']['format'].replace('-01-01', '-12-31') - self.config['options']['format'] = yformat diff --git a/tox.ini b/tox.ini index 0526236f..a18af893 100644 --- a/tox.ini +++ b/tox.ini @@ -1,10 +1,10 @@ [tox] envlist = - # Ubuntu 20.04 Python - py38-django22 - # Debian Bullseye Python - py39-django22 + py39-django42 + + # Ubuntu 22.04 Python + py310-django42 # Debian Bookworm Python py311-django42 From b7a71d911d22fe2adfd322ecdeb0dfc4b2b3490f Mon Sep 17 00:00:00 2001 From: bleizi Date: Mon, 12 Feb 2024 22:56:43 +0100 Subject: [PATCH 011/102] _get_validtion_exclusions() now return a set, PIL.Image.ANTIALIAS was renamed LANCZOS and typo in .gitlab-ci.yml --- .gitlab-ci.yml | 2 +- apps/member/forms.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 23ba25aa..4f041867 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -37,7 +37,7 @@ py310-django42: python3-djangorestframework python3-django-oauth-toolkit python3-psycopg2 python3-pil python3-babel python3-lockfile python3-pip python3-phonenumbers python3-memcache python3-bs4 python3-setuptools tox texlive-xetex - script: tox -e py38-django42 + script: tox -e py310-django42 # Debian Bookworm py311-django42: diff --git a/apps/member/forms.py b/apps/member/forms.py index 420b35a4..0d78c726 100644 --- a/apps/member/forms.py +++ b/apps/member/forms.py @@ -33,7 +33,7 @@ class UserForm(forms.ModelForm): # Django usernames can only contain letters, numbers, @, ., +, - and _. # We want to allow users to have uncommon and unpractical usernames: # That is their problem, and we have normalized aliases for us. - return super()._get_validation_exclusions() + ["username"] + return super()._get_validation_exclusions() | {"username"} class Meta: model = User @@ -122,7 +122,7 @@ class ImageForm(forms.Form): frame = frame.crop((x, y, x + w, y + h)) frame = frame.resize( (settings.PIC_WIDTH, settings.PIC_RATIO * settings.PIC_WIDTH), - Image.ANTIALIAS, + Image.LANCZOS, ) frames.append(frame) From 96215cc1ff6ad50cdc79c1b80a1f3885b04d5b31 Mon Sep 17 00:00:00 2001 From: bleizi Date: Tue, 13 Feb 2024 13:43:14 +0100 Subject: [PATCH 012/102] oidc_claim_scope in Class instead of method --- apps/permission/scopes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/permission/scopes.py b/apps/permission/scopes.py index f8fd7687..6770c681 100644 --- a/apps/permission/scopes.py +++ b/apps/permission/scopes.py @@ -35,6 +35,8 @@ class PermissionScopes(BaseScopes): class PermissionOAuth2Validator(OAuth2Validator): + oidc_claim_scope = None # fix breaking change of django-oauth-toolkit 2.0.0 + def validate_scopes(self, client_id, scopes, client, request, *args, **kwargs): """ User can request as many scope as he wants, including invalid scopes, @@ -44,8 +46,6 @@ class PermissionOAuth2Validator(OAuth2Validator): subset of permissions. """ - oidc_claim_scope = None # fix breaking change of django-oauth-toolkit 2.0.0 - valid_scopes = set() for t in Permission.PERMISSION_TYPES: From 6c61daf1c58c1db899e5075d7470d65a2253e08d Mon Sep 17 00:00:00 2001 From: charliep Date: Mon, 11 Mar 2024 10:25:48 +0100 Subject: [PATCH 013/102] Update views.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Passage à la time zone Europe/Paris --- apps/activity/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/activity/views.py b/apps/activity/views.py index 38b87964..6a2b21ca 100644 --- a/apps/activity/views.py +++ b/apps/activity/views.py @@ -315,8 +315,8 @@ X-WR-CALNAME:Kfet Calendar NAME:Kfet Calendar CALSCALE:GREGORIAN BEGIN:VTIMEZONE -TZID:Europe/Berlin -X-LIC-LOCATION:Europe/Berlin +TZID:Europe/Paris +X-LIC-LOCATION:Europe/Paris BEGIN:DAYLIGHT TZOFFSETFROM:+0100 TZOFFSETTO:+0200 From 2eb965291db0f17d1f858e1e062b17daac9c0da0 Mon Sep 17 00:00:00 2001 From: korenstin Date: Thu, 23 May 2024 21:46:01 +0200 Subject: [PATCH 014/102] new_logo --- note_kfet/fixtures/initial.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/note_kfet/fixtures/initial.json b/note_kfet/fixtures/initial.json index 5d54f3e5..f5bf4c08 100644 --- a/note_kfet/fixtures/initial.json +++ b/note_kfet/fixtures/initial.json @@ -4,7 +4,7 @@ "pk": 1, "fields": { "domain": "note.crans.org", - "name": "La Note Kfet \ud83c\udf7b" + "name": "La Note Kfet 🍪" } } ] From ec759dd3c0a0153ccdf6c9d3c6c76fe112f7e75c Mon Sep 17 00:00:00 2001 From: korenstin Date: Thu, 23 May 2024 22:38:09 +0200 Subject: [PATCH 015/102] error py37-django22 --- .gitlab-ci.yml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 97110ecd..f05f8732 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -8,19 +8,19 @@ variables: GIT_SUBMODULE_STRATEGY: recursive # Debian Buster -py37-django22: - stage: test - image: debian:buster-backports - before_script: - - > - apt-get update && - apt-get install --no-install-recommends -t buster-backports -y - python3-django python3-django-crispy-forms - python3-django-extensions python3-django-filters python3-django-polymorphic - python3-djangorestframework python3-django-oauth-toolkit python3-psycopg2 python3-pil - python3-babel python3-lockfile python3-pip python3-phonenumbers python3-memcache - python3-bs4 python3-setuptools tox texlive-xetex - script: tox -e py37-django22 +# py37-django22: +# stage: test +# image: debian:buster-backports +# before_script: +# - > +# apt-get update && +# apt-get install --no-install-recommends -t buster-backports -y +# python3-django python3-django-crispy-forms +# python3-django-extensions python3-django-filters python3-django-polymorphic +# python3-djangorestframework python3-django-oauth-toolkit python3-psycopg2 python3-pil +# python3-babel python3-lockfile python3-pip python3-phonenumbers python3-memcache +# python3-bs4 python3-setuptools tox texlive-xetex +# script: tox -e py37-django22 # Ubuntu 20.04 py38-django22: From 5d30b0e8198620bb5cc7f8b20e83a6bd7ebe1456 Mon Sep 17 00:00:00 2001 From: test Date: Sun, 26 May 2024 15:46:50 +0200 Subject: [PATCH 016/102] charte info --- apps/activity/templates/activity/activity_form.html | 3 +++ locale/fr/LC_MESSAGES/django.po | 4 ++++ note_kfet/templates/base.html | 2 ++ 3 files changed, 9 insertions(+) diff --git a/apps/activity/templates/activity/activity_form.html b/apps/activity/templates/activity/activity_form.html index 757b47b0..8032faae 100644 --- a/apps/activity/templates/activity/activity_form.html +++ b/apps/activity/templates/activity/activity_form.html @@ -17,6 +17,9 @@ SPDX-License-Identifier: GPL-3.0-or-later
+{% endblock %} + +{% block extrajavascript %} + -{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/apps/note/tables.py b/apps/note/tables.py index 3ca2d1d4..a4e944f9 100644 --- a/apps/note/tables.py +++ b/apps/note/tables.py @@ -260,11 +260,13 @@ class ButtonTable(tables.Table): text=_('edit'), accessor='pk', verbose_name=_("Edit"), + orderable=False, ) hideshow = tables.Column( verbose_name=_("Hide/Show"), accessor="pk", + orderable=False, attrs={ 'td': { 'class': 'col-sm-1', @@ -276,7 +278,8 @@ class ButtonTable(tables.Table): delete_col = tables.TemplateColumn(template_code=DELETE_TEMPLATE, extra_context={"delete_trans": _('delete')}, attrs={'td': {'class': 'col-sm-1'}}, - verbose_name=_("Delete"), ) + verbose_name=_("Delete"), + orderable=False, ) def render_amount(self, value): return pretty_money(value) diff --git a/apps/permission/models.py b/apps/permission/models.py index fbb46a90..e975485a 100644 --- a/apps/permission/models.py +++ b/apps/permission/models.py @@ -135,18 +135,18 @@ class Permission(models.Model): # A json encoded Q object with the following grammar # query -> [] | {} (the empty query representing all objects) - # query -> ["AND", query, …] AND multiple queries - # | ["OR", query, …] OR multiple queries + # query -> ["AND", query, ...] AND multiple queries + # | ["OR", query, ...] OR multiple queries # | ["NOT", query] Opposite of query - # query -> {key: value, …} A list of fields and values of a Q object + # query -> {key: value, ...} A list of fields and values of a Q object # key -> string A field name # value -> int | string | bool | null Literal values - # | [parameter, …] A parameter. See compute_param for more details. + # | [parameter, ...] A parameter. See compute_param for more details. # | {"F": oper} An F object - # oper -> [string, …] A parameter. See compute_param for more details. - # | ["ADD", oper, …] Sum multiple F objects or literal + # oper -> [string, ...] A parameter. See compute_param for more details. + # | ["ADD", oper, ...] Sum multiple F objects or literal # | ["SUB", oper, oper] Substract two F objects or literal - # | ["MUL", oper, …] Multiply F objects or literals + # | ["MUL", oper, ...] Multiply F objects or literals # | int | string | bool | null Literal values # | ["F", string] A field # diff --git a/apps/treasury/tables.py b/apps/treasury/tables.py index c5272091..ae87ab1a 100644 --- a/apps/treasury/tables.py +++ b/apps/treasury/tables.py @@ -37,6 +37,7 @@ class InvoiceTable(tables.Table): args=[A('id')], verbose_name=_("delete"), text=_("Delete"), + orderable=False, attrs={ 'th': { 'id': 'delete-membership-header' @@ -70,6 +71,7 @@ class RemittanceTable(tables.Table): verbose_name=_("View"), args=[A("pk")], text=_("View"), + orderable=False, attrs={ 'a': {'class': 'btn btn-primary'} }, ) @@ -97,6 +99,7 @@ class SpecialTransactionTable(tables.Table): verbose_name=_("Remittance"), args=[A("specialtransactionproxy__pk")], text=_("Add"), + orderable=False, attrs={ 'a': {'class': 'btn btn-primary'} }, ) @@ -105,6 +108,7 @@ class SpecialTransactionTable(tables.Table): verbose_name=_("Remittance"), args=[A("specialtransactionproxy__pk")], text=_("Remove"), + orderable=False, attrs={ 'a': {'class': 'btn btn-primary btn-danger'} }, ) @@ -130,10 +134,12 @@ class SogeCreditTable(tables.Table): amount = tables.Column( verbose_name=_("Amount"), + orderable=False, ) valid = tables.Column( verbose_name=_("Valid"), + orderable=False, ) def render_amount(self, value): diff --git a/apps/wei/forms/surveys/wei2023.py b/apps/wei/forms/surveys/wei2023.py index 0ec017bb..488ee7c3 100644 --- a/apps/wei/forms/surveys/wei2023.py +++ b/apps/wei/forms/surveys/wei2023.py @@ -82,7 +82,7 @@ WORDS = { 5: "La quoi ?" }], "kokarde": ["Qu'est-ce que le mot Kokarde t'évoque ?", { - 1: "Vraiment pas mon truc les soirées…", + 1: "Vraiment pas mon truc les soirées...", 2: "Bof, je viens pour manger et je repars aussitôt", 3: "Je kiffe, good vibes", 4: "Perso, je ne m'arrêterai pas de danser sur la piste !", @@ -117,15 +117,15 @@ WORDS = { 5: "Je pourrais en faire à n'importe qui. Pourquoi ne pas créer le club Câl[ENS] ?" }], "vomi": ["Quel est ton rapport au vomi ?", { - 1: "C'est compliqué…", + 1: "C'est compliqué...", 2: "Jamais je ne vomis mais je nettoie quand mes potes vomissent", 3: "Jamais je ne vomis et jamais je ne nettoie celui de quelqu'un d'autre", 4: "Je vomis quelquefois, ça arrive, faites pas cette tête, mais je fins toujours par nettoyer !", 5: "Je vomis à chaque soirée et ce n'est jamais moi qui nettoie" }], "kfet": ["Qu'est ce que la Kfet t'évoque ?", { - 1: "La Kfet, quel lieu de dépravé⋅es sérieux…", - 2: "C'est un endroit à l'hygiène plus que douteuse…", + 1: "La Kfet, quel lieu de dépravé⋅es sérieux...", + 2: "C'est un endroit à l'hygiène plus que douteuse...", 3: "Téma les prix des boissons et des snacks, c'est aberrant !", 4: "En vrai, c'est cool, petit billard, petit canapé, chill !", 5: "Banger, j'y reste jusqu'à la fin de mes jours" @@ -147,7 +147,7 @@ WORDS = { "scolarite": ["Comment tu vois ton cursus à l'ENS ?", { 1: "La tranquillité et le travail", 2: "On va s'amuser tout en bossant", - 3: "Ça va profiter et réviser au dernier moment pour les exams…", + 3: "Ça va profiter et réviser au dernier moment pour les exams...", 4: "Nous festoierons sans songer aux conséquences", 5: "Je ne vois qu'une seule issue : la débauche" }] diff --git a/docs/apps/index.rst b/docs/apps/index.rst index ae2a0178..e16f5196 100644 --- a/docs/apps/index.rst +++ b/docs/apps/index.rst @@ -32,7 +32,7 @@ Applications indispensables * `Note `_ : Les notes associées à des utilisateur⋅rices ou des clubs. * `Activity `_ : - La gestion des activités (créations, gestion, entrées,…) + La gestion des activités (créations, gestion, entrées, ...) * `Permission `_ : Backend de droits, limites les pouvoirs des utilisateur⋅rices * `API <../api>`_ : @@ -64,9 +64,9 @@ Applications facultatives * ``cas-server`` Serveur central d'authentification, permet d'utiliser son compte de la NoteKfet2020 pour se connecter à d'autre application ayant intégrer un client. * `Scripts `_ - Ensemble de commande `./manage.py` pour la gestion de la note: import de données, verification d'intégrité, etc… + Ensemble de commande `./manage.py` pour la gestion de la note: import de données, verification d'intégrité, etc... * `Treasury `_ : - Interface de gestion pour les trésorièr⋅es, émission de factures, remises de chèque, statistiques ... + Interface de gestion pour les trésorièr⋅es, émission de factures, remises de chèque, statistiques... * `WEI `_ : Interface de gestion du WEI. diff --git a/docs/apps/member.rst b/docs/apps/member.rst index d904daff..be44621c 100644 --- a/docs/apps/member.rst +++ b/docs/apps/member.rst @@ -43,7 +43,7 @@ l'utilisateur⋅rice, utiles pour l'adhésion au BDE : * ``address`` : ``CharField``, adresse physique de l'utilisateur⋅rice * ``paid`` : ``BooleanField``, indique si l'utilisateur⋅rice normalien⋅ne est rémunéré⋅e ou non (utile pour différencier les montants d'adhésion aux clubs) * ``phone_number`` : ``CharField``, numéro de téléphone de l'utilisateur⋅rice -* ``section`` : ``CharField``, section de l'ENS à laquelle appartient l'utilisateur⋅rice (exemple : 1A0,…) +* ``section`` : ``CharField``, section de l'ENS à laquelle appartient l'utilisateur⋅rice (exemple : 1A0, ...) Clubs ~~~~~ @@ -101,7 +101,7 @@ Adhésions La Note Kfet offre la possibilité aux clubs de gérer l'adhésion de leurs membres. En plus de réguler les cotisations des adhérent⋅es, des permissions sont octroyées sur la note en fonction des rôles au sein des clubs. Un rôle est une -fonction occupée au sein d'un club (Trésorièr⋅e de club, président⋅e de club, GC Kfet, Res[pot], respo info,…). +fonction occupée au sein d'un club (Trésorièr⋅e de club, président⋅e de club, GC Kfet, Res[pot], respo info, ...). Une adhésion attribue à un⋅e adhérent⋅e ses rôles. Les rôles fournissent les permissions. Par exemple, læ trésorièr⋅e d'un club a le droit de faire des transferts de et vers la note du club, tant que la source reste au-dessus de -50 €. Une adhésion est considérée comme valide si la date du jour est comprise (au sens large) entre les dates de début et diff --git a/docs/apps/registration.rst b/docs/apps/registration.rst index 6db796f2..22b99b23 100644 --- a/docs/apps/registration.rst +++ b/docs/apps/registration.rst @@ -49,7 +49,7 @@ Une fois l'inscription validée, détail de ce qu'il se passe : lui octroyant un faible nombre de permissions de base, telles que la visualisation de son compte. * On adhère la personne au club Kfet si cela est demandé, l'adhésion commence aujourd'hui. Iel dispose d'un unique rôle : « Adhérent⋅e Kfet » , lui octroyant un nombre un peu plus conséquent de permissions basiques, telles que la possibilité de - faire des transactions, d'accéder aux activités, au WEI,… + faire des transactions, d'accéder aux activités, au WEI, ... * Si læ nouvelleau membre a indiqué avoir ouvert un compte à la société générale, alors les transactions sont invalidées, la note n'est pas débitée (commence alors à 0 €). diff --git a/locale/de/LC_MESSAGES/django.po b/locale/de/LC_MESSAGES/django.po index 6542cc2a..d5a7497d 100644 --- a/locale/de/LC_MESSAGES/django.po +++ b/locale/de/LC_MESSAGES/django.po @@ -3431,8 +3431,8 @@ msgid "FAQ (FR)" msgstr "FAQ (FR)" #: note_kfet/templates/base_search.html:15 -msgid "Search by attribute such as name…" -msgstr "Suche nach Attributen wie Name…" +msgid "Search by attribute such as name..." +msgstr "Suche nach Attributen wie Name..." #: note_kfet/templates/base_search.html:23 msgid "There is no results." diff --git a/locale/es/LC_MESSAGES/django.po b/locale/es/LC_MESSAGES/django.po index 73702a57..deb0be1a 100644 --- a/locale/es/LC_MESSAGES/django.po +++ b/locale/es/LC_MESSAGES/django.po @@ -3381,8 +3381,8 @@ msgid "FAQ (FR)" msgstr "FAQ (FR)" #: note_kfet/templates/base_search.html:15 -msgid "Search by attribute such as name…" -msgstr "Buscar con atributo, como el nombre…" +msgid "Search by attribute such as name..." +msgstr "Buscar con atributo, como el nombre..." #: note_kfet/templates/base_search.html:23 msgid "There is no results." diff --git a/locale/fr/LC_MESSAGES/django.po b/locale/fr/LC_MESSAGES/django.po index 50f83a93..87291da0 100644 --- a/locale/fr/LC_MESSAGES/django.po +++ b/locale/fr/LC_MESSAGES/django.po @@ -1671,8 +1671,8 @@ msgstr "Consommer" #: apps/note/templates/note/conso_form.html:43 #: apps/note/templates/note/transaction_form.html:69 #: apps/note/templates/note/transaction_form.html:96 -msgid "Name or alias…" -msgstr "Pseudo ou alias…" +msgid "Name or alias..." +msgstr "Pseudo ou alias..." #: apps/note/templates/note/conso_form.html:53 msgid "Select consumptions" @@ -1777,8 +1777,8 @@ msgid "Current price" msgstr "Prix actuel" #: apps/note/templates/note/transactiontemplate_list.html:13 -msgid "Name of the button…" -msgstr "Nom du bouton…" +msgid "Name of the button..." +msgstr "Nom du bouton..." #: apps/note/templates/note/transactiontemplate_list.html:15 msgid "New button" @@ -3130,8 +3130,8 @@ msgstr "" "coût d'adhésion." #: apps/wei/templates/wei/weimembership_list.html:27 -msgid "View unvalidated registrations…" -msgstr "Voir les inscriptions non validées…" +msgid "View unvalidated registrations..." +msgstr "Voir les inscriptions non validées..." #: apps/wei/templates/wei/weiregistration_confirm_delete.html:16 msgid "This registration is already validated and can't be deleted." @@ -3151,8 +3151,8 @@ msgid "There is no pre-registration found with this pattern." msgstr "Il n'y a pas de pré-inscription en attente avec cette entrée." #: apps/wei/templates/wei/weiregistration_list.html:27 -msgid "View validated memberships…" -msgstr "Voir les adhésions validées…" +msgid "View validated membershipis..." +msgstr "Voir les adhésions validées..." #: apps/wei/views.py:58 msgid "Search WEI" @@ -3413,8 +3413,8 @@ msgid "Charte Info (FR)" msgstr "Charte Info (FR)" #: note_kfet/templates/base_search.html:15 -msgid "Search by attribute such as name…" -msgstr "Chercher par un attribut tel que le nom…" +msgid "Search by attribute such as name..." +msgstr "Chercher par un attribut tel que le nom..." #: note_kfet/templates/base_search.html:23 msgid "There is no results." diff --git a/note_kfet/templates/base_search.html b/note_kfet/templates/base_search.html index f526c0e1..cb5b04b1 100644 --- a/note_kfet/templates/base_search.html +++ b/note_kfet/templates/base_search.html @@ -12,7 +12,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
+ placeholder="{% trans "Search by attribute such as name..." %}">
{% if table.data %} @@ -75,4 +75,4 @@ SPDX-License-Identifier: GPL-3.0-or-later init_table(); }); -{% endblock %} \ No newline at end of file +{% endblock %} From 73ff35c232ef248618c294d33f3a5e0fcf8f120d Mon Sep 17 00:00:00 2001 From: mcngnt Date: Thu, 29 Aug 2024 12:42:26 +0200 Subject: [PATCH 084/102] updated bus descr --- apps/wei/forms/surveys/wei2024.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/apps/wei/forms/surveys/wei2024.py b/apps/wei/forms/surveys/wei2024.py index 5e2d2b60..cf0659d2 100644 --- a/apps/wei/forms/surveys/wei2024.py +++ b/apps/wei/forms/surveys/wei2024.py @@ -25,15 +25,14 @@ buses_descr = [ ], [ "Va[car]me 🎷🍎🔊", "#fd7a28", 3, - """Ici c'est le bus du bruit. Que ce soit les groupes de musique du Bureau des Arts ou la fanfare, on sera là pour vous - ambiancer ! On fera en sorte que vous vous souveniez de votre WEI et de son Vacarme !""", + """Ici, c'est le bus du bruit. Si vous voulez réveiller les autres bus en musique, apprendre de merveilleuses mélodies au kazoo tout le week-end, ou simplement profiter d'une bonne ambiance musicale, le BDA et la F[ENS]foire sont là pour vous. Vous pourrez également goûter au célèbre cocktail de la fanfare, concocté pour l'occasion par les tout nouveaux "meilleurs artisans v*********** de France" ! Alors que vous soyez artiste dans l'âme ou que vous souhaitiez juste faire le plus grand Vacarme, rejoignez-nous !""", ], [ - "[Kar]aïbes", "#a5cfdd", 0, + "[Kar]aïbes 🏝️🏴‍☠️🥥", "#a5cfdd", 3, """Ahoy, explorateurs du WEI ! Le bus Karaibes t’invite à une traversée sous les tropiques, où l’ambiance est toujours au beau fixe ! ☀️🍹 Ici, c’est soleil, rhum, et bonne humeur assurée : une atmosphère de vacances où l’on se laisse porter par la chaleur humaine et la fête. Que tu sois un pirate en quête de sensations fortes ou un amateur de chill avec un cocktail à la main, tu seras à ta place dans notre bus. Les soirées seront marquées par des rythmes tropicaux qui te feront vibrer jusqu’à l’aube. Prêt à embarquer pour une aventure inoubliable avec les meilleurs matelots du WEI ? On t’attend sur le pont du Karaibes pour lever l’ancre ensemble !""", ], [ - "[Kar]di [Bus]", "#e46398", 0, + "[Kar]di [Bus] 🎙️💅", "#e46398", 2.5, """Bienvenue à bord du Kardi Bus, la seul, l’unique, l’inimitable pépite de ce weekend d’intégration ! Inspiré par les icônes suprêmes de la pop culture telles les Bratz, les Winx et autres Mean Girls, notre bus est un sanctuaire de style, d’audace et de pur plaisir. A nos cotés attends toi à siroter tes meilleurs Cosmo, sex on the Beach et autres cocktails @@ -42,7 +41,7 @@ buses_descr = [ Bus !""", ], [ - "Sparta[bus] 🐺🐒🏉", "#ebdac2", 0, + "Sparta[bus] 🐺🐒🏉", "#ebdac2", 5, """Dans notre bus, on vous donne un avant goût des plus grandes assos de l'ENS : les Kyottes et l'Aspique (clubs de rugby féminin et masculin, mais pas que). Bien entendu, qui dit rugby dit les copaings, le pastaga et la Pena Bayona, mais vous verrez par vous même qu'on est ouvert⋅e à toutes propositions quand il s'agit de faire la fête. Pour les casse-cous comme @@ -62,7 +61,7 @@ buses_descr = [ musique !""", ], [ - "Techno [kar]ade", "#8065a3", 0, + "Techno [kar]ade 🔊🚩", "#8065a3", 3, """Avis à tous·tes les gauchos, amoureux·ses de la fête et des manifs : le Techno [kar]ade vous ouvre grand ses bras pour finir en beauté votre première inté. Préparez-vous à vous abreuver de cocktails (savamment élaborés) à la vibration d’un système son fabriqué pour l’occasion. Des sets technos à « Mon père était tellement de gauche » en passant par « Female @@ -72,7 +71,7 @@ buses_descr = [ (nombreux⋅ses) 3A+ qui auront répondu à l’appel. Bref, rejoignez-nous, on est super cools :)""" ], [ - "[Bus]ka-P", "#7c4768", 0, + "[Bus]ka-P 🥇🍻🎤", "#7c4768", 4.5, """Booska-p, c’est le « site N°1 du Rap français ». Le [Bus]ka-p ? Le bus N°1 sur l’ambiance au WEI. Les nuits vont être courtes, les cocktails vont couler à flots : tout sera réuni pour vivre un week-end dont tu te souviendras toute ta vie. Au programme pas un seul temps mort et un maximum de rencontres pour bien commencer ta première année à l’ENS. Et bien @@ -245,7 +244,6 @@ class WEISurvey2024(WEISurvey): raise ValueError("Survey is not ended, can't calculate score") bus_info = self.get_algorithm_class().get_bus_information(bus) - print(bus_info) # Score is the given score by the bus subtracted to the mid-score of the buses. s = 0 for question in WORDS: From f50849b4f8040a437f94d49054371d8d4ee8cb18 Mon Sep 17 00:00:00 2001 From: mcngnt Date: Thu, 29 Aug 2024 14:01:55 +0200 Subject: [PATCH 085/102] delete print --- apps/wei/forms/surveys/wei2024.py | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/apps/wei/forms/surveys/wei2024.py b/apps/wei/forms/surveys/wei2024.py index cf0659d2..ef3f37f9 100644 --- a/apps/wei/forms/surveys/wei2024.py +++ b/apps/wei/forms/surveys/wei2024.py @@ -81,30 +81,13 @@ buses_descr = [ ] -def print_survey_info(i): - s = {"recap": { - "1": 0, - }} - s_ = {f"bus{i}": {f"{i}": 0 for i in range(1, 5 + 1)} for i in range(len(buses_descr))} - s.update(s_) - s.update({f"bus{i}": {f"{join}": join for join in range(1, 5 + 1)}}) - s = {"scores": s} - json_str = json.dumps(s) - print(json_str) - - - def print_bus(i): return f"""

{buses_descr[i][0]}


Alcoolomètre : {buses_descr[i][2]} / 5 🍻

{buses_descr[i][3]}
""" - - def print_all_buses(): - # for i in range(len(buses_descr)): - # print_survey_info(i) liste = [print_bus(i) for i in range(len(buses_descr))] return "



".join(liste) From b92e6e4e10657634ccf366d1e6a7a8244b35dde6 Mon Sep 17 00:00:00 2001 From: mcngnt Date: Thu, 29 Aug 2024 18:36:20 +0200 Subject: [PATCH 086/102] linting --- apps/wei/forms/surveys/wei2024.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/apps/wei/forms/surveys/wei2024.py b/apps/wei/forms/surveys/wei2024.py index ef3f37f9..6ececf4d 100644 --- a/apps/wei/forms/surveys/wei2024.py +++ b/apps/wei/forms/surveys/wei2024.py @@ -1,8 +1,6 @@ # Copyright (C) 2018-2024 by BDE ENS Paris-Saclay # SPDX-License-Identifier: GPL-3.0-or-later -import json - from functools import lru_cache from django import forms @@ -25,11 +23,20 @@ buses_descr = [ ], [ "Va[car]me 🎷🍎🔊", "#fd7a28", 3, - """Ici, c'est le bus du bruit. Si vous voulez réveiller les autres bus en musique, apprendre de merveilleuses mélodies au kazoo tout le week-end, ou simplement profiter d'une bonne ambiance musicale, le BDA et la F[ENS]foire sont là pour vous. Vous pourrez également goûter au célèbre cocktail de la fanfare, concocté pour l'occasion par les tout nouveaux "meilleurs artisans v*********** de France" ! Alors que vous soyez artiste dans l'âme ou que vous souhaitiez juste faire le plus grand Vacarme, rejoignez-nous !""", + """Ici, c'est le bus du bruit. Si vous voulez réveiller les autres bus en musique, apprendre de merveilleuses + mélodies au kazoo tout le week-end, ou simplement profiter d'une bonne ambiance musicale, le BDA et la + F[ENS]foire sont là pour vous. Vous pourrez également goûter au célèbre cocktail de la fanfare, concocté + pour l'occasion par les tout nouveaux "meilleurs artisans v*********** de France" ! Alors que vous soyez artiste + dans l'âme ou que vous souhaitiez juste faire le plus grand Vacarme, rejoignez-nous !""", ], [ "[Kar]aïbes 🏝️🏴‍☠️🥥", "#a5cfdd", 3, - """Ahoy, explorateurs du WEI ! Le bus Karaibes t’invite à une traversée sous les tropiques, où l’ambiance est toujours au beau fixe ! ☀️🍹 Ici, c’est soleil, rhum, et bonne humeur assurée : une atmosphère de vacances où l’on se laisse porter par la chaleur humaine et la fête. Que tu sois un pirate en quête de sensations fortes ou un amateur de chill avec un cocktail à la main, tu seras à ta place dans notre bus. Les soirées seront marquées par des rythmes tropicaux qui te feront vibrer jusqu’à l’aube. Prêt à embarquer pour une aventure inoubliable avec les meilleurs matelots du WEI ? On t’attend sur le pont du Karaibes pour lever l’ancre ensemble !""", + """Ahoy, explorateurs du WEI ! Le bus Karaibes t’invite à une traversée sous les tropiques, où l’ambiance est + toujours au beau fixe ! ☀️🍹 Ici, c’est soleil, rhum, et bonne humeur assurée : une atmosphère de vacances où + l’on se laisse porter par la chaleur humaine et la fête. Que tu sois un pirate en quête de sensations fortes ou + un amateur de chill avec un cocktail à la main, tu seras à ta place dans notre bus. Les soirées seront marquées + par des rythmes tropicaux qui te feront vibrer jusqu’à l’aube. Prêt à embarquer pour une aventure inoubliable + avec les meilleurs matelots du WEI ? On t’attend sur le pont du Karaibes pour lever l’ancre ensemble !""", ], [ "[Kar]di [Bus] 🎙️💅", "#e46398", 2.5, @@ -81,7 +88,6 @@ buses_descr = [ ] - def print_bus(i): return f"""

{buses_descr[i][0]}


Alcoolomètre : {buses_descr[i][2]} / 5 🍻

{buses_descr[i][3]}
""" From 7b5eefcc0a36b1cd1e1da943cc9f0956440a3bf5 Mon Sep 17 00:00:00 2001 From: nicomarg Date: Thu, 29 Aug 2024 19:23:26 +0200 Subject: [PATCH 087/102] Update 2 files - /apps/registration/views.py - /apps/permission/fixtures/initial.json --- apps/permission/fixtures/initial.json | 13 +++++++++++++ apps/registration/views.py | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/apps/permission/fixtures/initial.json b/apps/permission/fixtures/initial.json index 9e4ba924..63626d27 100644 --- a/apps/permission/fixtures/initial.json +++ b/apps/permission/fixtures/initial.json @@ -3851,6 +3851,19 @@ "for_club": null, "name": "Membre de club", "permissions": [ + 1, + 2, + 3, + 4, + 5, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, 22 ] } diff --git a/apps/registration/views.py b/apps/registration/views.py index f0314285..00c718be 100644 --- a/apps/registration/views.py +++ b/apps/registration/views.py @@ -300,7 +300,7 @@ class FutureUserDetailView(ProtectQuerysetMixin, LoginRequiredMixin, FormMixin, # join_bde = True # join_kfet = True - if not join_bde: + if not join_bde or any(b for _, b in join_clubs): # This software belongs to the BDE. form.add_error('join_bde', _("You must join the BDE.")) return super().form_invalid(form) From 7fea619a9f335ada31b657126a6c700ae55b5223 Mon Sep 17 00:00:00 2001 From: nicomarg Date: Thu, 29 Aug 2024 20:02:06 +0200 Subject: [PATCH 088/102] add permission to make transfers with members of your club --- apps/permission/fixtures/initial.json | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/apps/permission/fixtures/initial.json b/apps/permission/fixtures/initial.json index 63626d27..5b8dbed9 100644 --- a/apps/permission/fixtures/initial.json +++ b/apps/permission/fixtures/initial.json @@ -3751,6 +3751,21 @@ "permanent": false, "description": "Modifier bouffe" } + }, { + "model": "permission.permission", + "pk": 239, + "fields": { + "model": [ + "note", + "alias" + ], + "query": "[\"AND\", [\"OR\", {\"note__noteuser__user__memberships__club\": \"club\", \"note__noteuser__user__memberships__date_start__lte\": [\"today\"], \"note__noteuser__user__memberships__date_end__gte\": [\"today\"]}, {\"note__noteclub__isnull\": false}], {\"note__is_active\": true}]", + "type": "view", + "mask": 1, + "field": "", + "permanent": false, + "description": "Voir les alias des notes des clubs et des adhérent⋅es du club BDE" + } }, { "model": "permission.role", @@ -3926,7 +3941,8 @@ 142, 182, 184, - 185 + 185, + 239 ] } }, From e2426bd6a64cea0c463a08ba6cdbeb17498dae2e Mon Sep 17 00:00:00 2001 From: nicomarg Date: Thu, 29 Aug 2024 20:03:43 +0200 Subject: [PATCH 089/102] Bugfix --- apps/registration/views.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/apps/registration/views.py b/apps/registration/views.py index 00c718be..99159a78 100644 --- a/apps/registration/views.py +++ b/apps/registration/views.py @@ -300,10 +300,13 @@ class FutureUserDetailView(ProtectQuerysetMixin, LoginRequiredMixin, FormMixin, # join_bde = True # join_kfet = True - if not join_bde or any(b for _, b in join_clubs): + if not (join_bde or any(b for _, b in join_clubs)): # This software belongs to the BDE. - form.add_error('join_bde', _("You must join the BDE.")) + form.add_error('join_bde', _("You must join a club.")) return super().form_invalid(form) + + if join_kfet and not join_bde: + forl.add_error('join_bde', _("You must also join the parent club BDE.")) # Calculate required registration fee fee = 0 From 361de9f8b4b2be2d828c788dff2c50befab04b88 Mon Sep 17 00:00:00 2001 From: nicomarg Date: Thu, 29 Aug 2024 21:06:34 +0200 Subject: [PATCH 090/102] more bug fixing --- apps/permission/fixtures/initial.json | 7 ++++--- apps/registration/views.py | 3 ++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/apps/permission/fixtures/initial.json b/apps/permission/fixtures/initial.json index 5b8dbed9..918362e3 100644 --- a/apps/permission/fixtures/initial.json +++ b/apps/permission/fixtures/initial.json @@ -3751,7 +3751,8 @@ "permanent": false, "description": "Modifier bouffe" } - }, { + }, + { "model": "permission.permission", "pk": 239, "fields": { @@ -3759,12 +3760,12 @@ "note", "alias" ], - "query": "[\"AND\", [\"OR\", {\"note__noteuser__user__memberships__club\": \"club\", \"note__noteuser__user__memberships__date_start__lte\": [\"today\"], \"note__noteuser__user__memberships__date_end__gte\": [\"today\"]}, {\"note__noteclub__isnull\": false}], {\"note__is_active\": true}]", + "query": "[\"AND\", [\"OR\", {\"note__noteuser__user__memberships__club\": [\"club\"], \"note__noteuser__user__memberships__date_start__lte\": [\"today\"], \"note__noteuser__user__memberships__date_end__gte\": [\"today\"]}, {\"note__noteclub__isnull\": false}], {\"note__is_active\": true}]", "type": "view", "mask": 1, "field": "", "permanent": false, - "description": "Voir les alias des notes des clubs et des adhérent⋅es du club BDE" + "description": "Voir les alias des notes des clubs et des adhérent⋅es du club" } }, { diff --git a/apps/registration/views.py b/apps/registration/views.py index 99159a78..2a2e0a16 100644 --- a/apps/registration/views.py +++ b/apps/registration/views.py @@ -306,7 +306,8 @@ class FutureUserDetailView(ProtectQuerysetMixin, LoginRequiredMixin, FormMixin, return super().form_invalid(form) if join_kfet and not join_bde: - forl.add_error('join_bde', _("You must also join the parent club BDE.")) + form.add_error('join_bde', _("You must also join the parent club BDE.")) + return super().form_invalid(form) # Calculate required registration fee fee = 0 From 7552e55c8ddc3f9f3de6b2f403d3088259aa888c Mon Sep 17 00:00:00 2001 From: mcngnt Date: Thu, 29 Aug 2024 22:19:11 +0200 Subject: [PATCH 091/102] removed diet filed --- apps/wei/forms/surveys/wei2024.py | 2 ++ ...0010_remove_weiregistration_specific_diet.py | 17 +++++++++++++++++ apps/wei/models.py | 6 ------ apps/wei/templates/wei/attribute_bus_1A.html | 5 +---- apps/wei/templates/wei/weimembership_form.html | 5 +---- 5 files changed, 21 insertions(+), 14 deletions(-) create mode 100644 apps/wei/migrations/0010_remove_weiregistration_specific_diet.py diff --git a/apps/wei/forms/surveys/wei2024.py b/apps/wei/forms/surveys/wei2024.py index 6ececf4d..ceaf221f 100644 --- a/apps/wei/forms/surveys/wei2024.py +++ b/apps/wei/forms/surveys/wei2024.py @@ -1,6 +1,8 @@ # Copyright (C) 2018-2024 by BDE ENS Paris-Saclay # SPDX-License-Identifier: GPL-3.0-or-later +import json + from functools import lru_cache from django import forms diff --git a/apps/wei/migrations/0010_remove_weiregistration_specific_diet.py b/apps/wei/migrations/0010_remove_weiregistration_specific_diet.py new file mode 100644 index 00000000..119927c0 --- /dev/null +++ b/apps/wei/migrations/0010_remove_weiregistration_specific_diet.py @@ -0,0 +1,17 @@ +# Generated by Django 4.2.15 on 2024-08-29 20:15 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('wei', '0009_weiregistration_specific_diet'), + ] + + operations = [ + migrations.RemoveField( + model_name='weiregistration', + name='specific_diet', + ), + ] diff --git a/apps/wei/models.py b/apps/wei/models.py index 80584268..76fd465d 100644 --- a/apps/wei/models.py +++ b/apps/wei/models.py @@ -232,12 +232,6 @@ class WEIRegistration(models.Model): verbose_name=_("health issues"), ) - specific_diet = models.TextField( - blank=True, - default="", - verbose_name=_("specific diet"), - ) - emergency_contact_name = models.CharField( max_length=255, verbose_name=_("emergency contact name"), diff --git a/apps/wei/templates/wei/attribute_bus_1A.html b/apps/wei/templates/wei/attribute_bus_1A.html index 89dc692b..1140ed49 100644 --- a/apps/wei/templates/wei/attribute_bus_1A.html +++ b/apps/wei/templates/wei/attribute_bus_1A.html @@ -25,12 +25,9 @@
{% trans 'department'|capfirst %}
{{ object.user.profile.get_department_display }}
-
{% trans 'health issues'|capfirst %}
+
{% trans 'health issues or specific diet'|capfirst %}
{{ object.health_issues|default:"—" }}
-
{% trans 'specific diet'|capfirst %}
-
{{ object.specific_diet|default:"—" }}
-
{% trans 'suggested bus'|capfirst %}
{{ survey.information.selected_bus_name }}
diff --git a/apps/wei/templates/wei/weimembership_form.html b/apps/wei/templates/wei/weimembership_form.html index ec6ebed4..ff3024ca 100644 --- a/apps/wei/templates/wei/weimembership_form.html +++ b/apps/wei/templates/wei/weimembership_form.html @@ -64,12 +64,9 @@ SPDX-License-Identifier: GPL-3.0-or-later
{% trans 'birth date'|capfirst %}
{{ registration.birth_date }}
-
{% trans 'health issues'|capfirst %}
+
{% trans 'health issues or specific diet'|capfirst %}
{{ registration.health_issues }}
-
{% trans 'specific diet'|capfirst %}
-
{{ registration.specific_diet }}
-
{% trans 'emergency contact name'|capfirst %}
{{ registration.emergency_contact_name }}
From 185a2cabf257f936d47d651e2509f7d449a17fed Mon Sep 17 00:00:00 2001 From: mcngnt Date: Thu, 29 Aug 2024 22:47:33 +0200 Subject: [PATCH 092/102] corrected emoji + linting --- apps/wei/forms/surveys/wei2024.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/apps/wei/forms/surveys/wei2024.py b/apps/wei/forms/surveys/wei2024.py index ceaf221f..13d619dc 100644 --- a/apps/wei/forms/surveys/wei2024.py +++ b/apps/wei/forms/surveys/wei2024.py @@ -1,8 +1,6 @@ # Copyright (C) 2018-2024 by BDE ENS Paris-Saclay # SPDX-License-Identifier: GPL-3.0-or-later -import json - from functools import lru_cache from django import forms @@ -57,7 +55,7 @@ buses_descr = [ pour les plus calmes, vous trouverez au bus Aspique-Kyottes les 2A+ qui vous feront kiffer votre WEI.""", ], [ - "Zanzo[Bus] 🤩👽🐔", "#FFFF", 3, + "Zanzo[Bus] 🤯🚸🐒", "#FFFF", 3, """Dans un entre-trois bien senti entre zinzinerie, enfance et vieillerie, le Zanzo[BUS] est un concentré de fun mêlé à de la dinguerie à gogo. N'hésitez plus et rejoignez-nous pour un WEI toujours plus déjanté !""", ], From 0fbb19c5fd9560d0ec2488603b97ee6d1c96eff1 Mon Sep 17 00:00:00 2001 From: bleizi Date: Thu, 5 Sep 2024 19:48:54 +0200 Subject: [PATCH 093/102] limite mail sending to 10 per minute and purge fail mail log --- note.cron | 1 + note_kfet/settings/base.py | 1 + 2 files changed, 2 insertions(+) diff --git a/note.cron b/note.cron index a54ad031..dc1f6460 100644 --- a/note.cron +++ b/note.cron @@ -9,6 +9,7 @@ MAILTO=notekfet2020@lists.crans.org * * * * * root cd /var/www/note_kfet && env/bin/python manage.py send_mail -c 1 -v 0 * * * * * root cd /var/www/note_kfet && env/bin/python manage.py retry_deferred -c 1 -v 0 00 0 * * * root cd /var/www/note_kfet && env/bin/python manage.py purge_mail_log 7 -v 0 + 00 0 * * * root cd /var/www/note_kfet && env/bin/python manage.py purge_mail_log -r failure 30 -v 0 # Faire une sauvegarde de la base de données 00 2 * * * root cd /var/www/note_kfet && apps/scripts/shell/backup_db # Vérifier la cohérence de la base et mailer en cas de problème diff --git a/note_kfet/settings/base.py b/note_kfet/settings/base.py index eb0b013d..8378448d 100644 --- a/note_kfet/settings/base.py +++ b/note_kfet/settings/base.py @@ -225,6 +225,7 @@ MEDIA_URL = '/media/' # Use mailer in production to place emails in a queue before sending them to avoid spam EMAIL_BACKEND = 'mailer.backend.DbBackend' MAILER_EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' +MAILER_EMAIL_MAX_BATCH = 10 EMAIL_USE_SSL = os.getenv('EMAIL_USE_SSL', False) EMAIL_HOST = os.getenv('EMAIL_HOST', 'smtp.example.org') EMAIL_PORT = os.getenv('EMAIL_PORT', 25) From d1ef367bab880dd59038eb4efad9682d6941e661 Mon Sep 17 00:00:00 2001 From: Nicolas Margulies Date: Thu, 5 Sep 2024 20:17:45 +0200 Subject: [PATCH 094/102] Permissions for child clubs, also changed spaces for tabs --- apps/permission/fixtures/initial.json | 8784 +++++++++++++------------ apps/registration/views.py | 2 +- 2 files changed, 4410 insertions(+), 4376 deletions(-) diff --git a/apps/permission/fixtures/initial.json b/apps/permission/fixtures/initial.json index 918362e3..2b69cbbc 100644 --- a/apps/permission/fixtures/initial.json +++ b/apps/permission/fixtures/initial.json @@ -1,4380 +1,4414 @@ [ - { - "model": "permission.permissionmask", - "pk": 1, - "fields": { - "rank": 0, - "description": "Droits basiques" - } - }, - { - "model": "permission.permissionmask", - "pk": 2, - "fields": { - "rank": 1, - "description": "Droits note seulement" - } - }, - { - "model": "permission.permissionmask", - "pk": 3, - "fields": { - "rank": 42, - "description": "Tous mes droits" - } - }, - { - "model": "permission.permission", - "pk": 1, - "fields": { - "model": [ - "auth", - "user" - ], - "query": "{\"pk\": [\"user\", \"pk\"]}", - "type": "view", - "mask": 1, - "field": "", - "permanent": true, - "description": "Voir son compte utilisateur⋅rice" - } - }, - { - "model": "permission.permission", - "pk": 2, - "fields": { - "model": [ - "member", - "profile" - ], - "query": "{\"user\": [\"user\"]}", - "type": "view", - "mask": 1, - "field": "", - "permanent": true, - "description": "Voir son profil" - } - }, - { - "model": "permission.permission", - "pk": 3, - "fields": { - "model": [ - "note", - "note" - ], - "query": "{\"pk\": [\"user\", \"note\", \"pk\"]}", - "type": "view", - "mask": 1, - "field": "", - "permanent": true, - "description": "Voir sa propre note d'utilisateur⋅rice" - } - }, - { - "model": "permission.permission", - "pk": 4, - "fields": { - "model": [ - "authtoken", - "token" - ], - "query": "{\"user\": [\"user\"]}", - "type": "view", - "mask": 1, - "field": "", - "permanent": true, - "description": "Voir son jeton d'authentification à l'API" - } - }, - { - "model": "permission.permission", - "pk": 5, - "fields": { - "model": [ - "note", - "transaction" - ], - "query": "[\"OR\", {\"source\": [\"user\", \"note\"]}, {\"destination\": [\"user\", \"note\"]}]", - "type": "view", - "mask": 1, - "field": "", - "permanent": true, - "description": "Voir ses propres transactions" - } - }, - { - "model": "permission.permission", - "pk": 6, - "fields": { - "model": [ - "note", - "alias" - ], - "query": "[\"AND\", [\"OR\", {\"note__noteuser__user__memberships__club__name\": \"BDE\", \"note__noteuser__user__memberships__date_start__lte\": [\"today\"], \"note__noteuser__user__memberships__date_end__gte\": [\"today\"]}, {\"note__noteclub__isnull\": false}], {\"note__is_active\": true}]", - "type": "view", - "mask": 1, - "field": "", - "permanent": false, - "description": "Voir les alias des notes des clubs et des adhérent⋅es du club BDE" - } - }, - { - "model": "permission.permission", - "pk": 7, - "fields": { - "model": [ - "auth", - "user" - ], - "query": "{\"pk\": [\"user\", \"pk\"]}", - "type": "change", - "mask": 1, - "field": "last_login", - "permanent": true, - "description": "Modifier sa propre date de dernière connexion" - } - }, - { - "model": "permission.permission", - "pk": 8, - "fields": { - "model": [ - "auth", - "user" - ], - "query": "{\"pk\": [\"user\", \"pk\"]}", - "type": "change", - "mask": 1, - "field": "username", - "permanent": true, - "description": "Changer son propre pseudo" - } - }, - { - "model": "permission.permission", - "pk": 9, - "fields": { - "model": [ - "auth", - "user" - ], - "query": "{\"pk\": [\"user\", \"pk\"]}", - "type": "change", - "mask": 1, - "field": "first_name", - "permanent": true, - "description": "Changer son propre prénom" - } - }, - { - "model": "permission.permission", - "pk": 10, - "fields": { - "model": [ - "auth", - "user" - ], - "query": "{\"pk\": [\"user\", \"pk\"]}", - "type": "change", - "mask": 1, - "field": "last_name", - "permanent": true, - "description": "Changer son propre nom de famille" - } - }, - { - "model": "permission.permission", - "pk": 11, - "fields": { - "model": [ - "auth", - "user" - ], - "query": "{\"pk\": [\"user\", \"pk\"]}", - "type": "change", - "mask": 1, - "field": "email", - "permanent": true, - "description": "Changer sa propre adresse e-mail" - } - }, - { - "model": "permission.permission", - "pk": 12, - "fields": { - "model": [ - "authtoken", - "token" - ], - "query": "{\"user\": [\"user\"]}", - "type": "delete", - "mask": 1, - "field": "", - "permanent": true, - "description": "Supprimer son jeton d'authentification à l'API" - } - }, - { - "model": "permission.permission", - "pk": 13, - "fields": { - "model": [ - "authtoken", - "token" - ], - "query": "{\"user\": [\"user\"]}", - "type": "add", - "mask": 1, - "field": "", - "permanent": true, - "description": "Créer un jeton d'authentification à l'API" - } - }, - { - "model": "permission.permission", - "pk": 14, - "fields": { - "model": [ - "note", - "alias" - ], - "query": "{\"note\": [\"user\", \"note\"]}", - "type": "delete", - "mask": 1, - "field": "", - "permanent": true, - "description": "Supprimer un alias à sa note" - } - }, - { - "model": "permission.permission", - "pk": 15, - "fields": { - "model": [ - "note", - "alias" - ], - "query": "{\"note\": [\"user\", \"note\"]}", - "type": "add", - "mask": 1, - "field": "", - "permanent": false, - "description": "Ajouter un alias à sa note" - } - }, - { - "model": "permission.permission", - "pk": 16, - "fields": { - "model": [ - "note", - "noteuser" - ], - "query": "{\"pk\": [\"user\", \"note\", \"pk\"]}", - "type": "change", - "mask": 1, - "field": "display_image", - "permanent": false, - "description": "Changer l'image de sa note" - } - }, - { - "model": "permission.permission", - "pk": 17, - "fields": { - "model": [ - "note", - "transaction" - ], - "query": "[\"AND\", {\"source\": [\"user\", \"note\"]}, [\"OR\", {\"source__balance__gte\": {\"F\": [\"MUL\", [\"F\", \"amount\"], [\"F\", \"quantity\"]]}}, {\"valid\": false}]]", - "type": "add", - "mask": 1, - "field": "", - "permanent": false, - "description": "Transférer de l'argent depuis sa propre note en restant positif" - } - }, - { - "model": "permission.permission", - "pk": 19, - "fields": { - "model": [ - "note", - "note" - ], - "query": "[\"OR\", {\"pk\": [\"club\", \"note\", \"pk\"]}, {\"noteuser__user__memberships__club\": [\"club\"], \"noteuser__user__memberships__date_start__lte\": [\"today\"], \"noteuser__user__memberships__date_end__gte\": [\"today\"]}]", - "type": "view", - "mask": 2, - "field": "", - "permanent": false, - "description": "Voir les notes des membres du club" - } - }, - { - "model": "permission.permission", - "pk": 20, - "fields": { - "model": [ - "note", - "transaction" - ], - "query": "[\"AND\", [\"OR\", {\"source\": [\"club\", \"note\"]}, {\"destination\": [\"club\", \"note\"]}], [\"OR\", {\"source__balance__gte\": {\"F\": [\"SUB\", [\"MUL\", [\"F\", \"amount\"], [\"F\", \"quantity\"]], 2000]}}, {\"valid\": false}]]", - "type": "add", - "mask": 2, - "field": "", - "permanent": false, - "description": "Créer une transaction de ou vers la note d'un club" - } - }, - { - "model": "permission.permission", - "pk": 21, - "fields": { - "model": [ - "note", - "recurrenttransaction" - ], - "query": "[\"AND\", {\"destination\": [\"club\", \"note\"]}, [\"OR\", {\"source__balance__gte\": {\"F\": [\"SUB\", [\"MUL\", [\"F\", \"amount\"], [\"F\", \"quantity\"]], 2000]}}, {\"valid\": false}]]", - "type": "add", - "mask": 2, - "field": "", - "permanent": false, - "description": "Créer une transaction en appuyant sur un bouton lié à un club" - } - }, - { - "model": "permission.permission", - "pk": 22, - "fields": { - "model": [ - "member", - "club" - ], - "query": "{\"pk\": [\"club\", \"pk\"]}", - "type": "view", - "mask": 1, - "field": "", - "permanent": false, - "description": "Voir les informations d'un club" - } - }, - { - "model": "permission.permission", - "pk": 23, - "fields": { - "model": [ - "note", - "transaction" - ], - "query": "{}", - "type": "change", - "mask": 2, - "field": "valid", - "permanent": false, - "description": "Mettre à jour le statut de validation d'une transaction" - } - }, - { - "model": "permission.permission", - "pk": 24, - "fields": { - "model": [ - "note", - "transaction" - ], - "query": "{}", - "type": "view", - "mask": 2, - "field": "", - "permanent": false, - "description": "Voir toutes les transactions" - } - }, - { - "model": "permission.permission", - "pk": 25, - "fields": { - "model": [ - "note", - "notespecial" - ], - "query": "{}", - "type": "view", - "mask": 2, - "field": "", - "permanent": false, - "description": "Afficher l'interface crédit/retrait" - } - }, - { - "model": "permission.permission", - "pk": 26, - "fields": { - "model": [ - "note", - "specialtransaction" - ], - "query": "{}", - "type": "add", - "mask": 2, - "field": "", - "permanent": false, - "description": "Créer un crédit ou un retrait quelconque" - } - }, - { - "model": "permission.permission", - "pk": 27, - "fields": { - "model": [ - "note", - "templatecategory" - ], - "query": "{}", - "type": "view", - "mask": 2, - "field": "", - "permanent": false, - "description": "Voir toutes les catégories de boutons" - } - }, - { - "model": "permission.permission", - "pk": 28, - "fields": { - "model": [ - "note", - "templatecategory" - ], - "query": "{}", - "type": "change", - "mask": 3, - "field": "", - "permanent": false, - "description": "Changer une catégorie de boutons" - } - }, - { - "model": "permission.permission", - "pk": 29, - "fields": { - "model": [ - "note", - "templatecategory" - ], - "query": "{}", - "type": "add", - "mask": 3, - "field": "", - "permanent": false, - "description": "Créer une catégorie de boutons" - } - }, - { - "model": "permission.permission", - "pk": 30, - "fields": { - "model": [ - "note", - "transactiontemplate" - ], - "query": "{}", - "type": "view", - "mask": 2, - "field": "", - "permanent": false, - "description": "Voir tous les boutons" - } - }, - { - "model": "permission.permission", - "pk": 31, - "fields": { - "model": [ - "note", - "transactiontemplate" - ], - "query": "{}", - "type": "add", - "mask": 3, - "field": "", - "permanent": false, - "description": "Ajouter un bouton" - } - }, - { - "model": "permission.permission", - "pk": 32, - "fields": { - "model": [ - "note", - "transactiontemplate" - ], - "query": "{}", - "type": "change", - "mask": 3, - "field": "", - "permanent": false, - "description": "Modifier un bouton" - } - }, - { - "model": "permission.permission", - "pk": 33, - "fields": { - "model": [ - "note", - "transaction" - ], - "query": "{}", - "type": "add", - "mask": 2, - "field": "", - "permanent": false, - "description": "Créer n'importe quelle transaction" - } - }, - { - "model": "permission.permission", - "pk": 34, - "fields": { - "model": [ - "activity", - "activity" - ], - "query": "[\"OR\", {\"valid\": true}, {\"creater\": [\"user\"]}]", - "type": "view", - "mask": 1, - "field": "", - "permanent": false, - "description": "Voir toutes les activités valides" - } - }, - { - "model": "permission.permission", - "pk": 36, - "fields": { - "model": [ - "activity", - "activity" - ], - "query": "{\"creater\": [\"user\"], \"valid\": false}", - "type": "add", - "mask": 1, - "field": "", - "permanent": false, - "description": "Proposer des activités" - } - }, - { - "model": "permission.permission", - "pk": 37, - "fields": { - "model": [ - "activity", - "activity" - ], - "query": "{}", - "type": "change", - "mask": 2, - "field": "valid", - "permanent": false, - "description": "Valider des activités" - } - }, - { - "model": "permission.permission", - "pk": 38, - "fields": { - "model": [ - "activity", - "activity" - ], - "query": "{}", - "type": "change", - "mask": 2, - "field": "open", - "permanent": false, - "description": "Ouvrir des activités" - } - }, - { - "model": "permission.permission", - "pk": 39, - "fields": { - "model": [ - "activity", - "guest" - ], - "query": "{\"inviter\": [\"user\", \"note\"], \"activity__activity_type__can_invite\": true}", - "type": "add", - "mask": 1, - "field": "", - "permanent": false, - "description": "Inviter des personnes à des activités" - } - }, - { - "model": "permission.permission", - "pk": 40, - "fields": { - "model": [ - "activity", - "guest" - ], - "query": "{\"inviter\": [\"user\", \"note\"]}", - "type": "view", - "mask": 1, - "field": "", - "permanent": true, - "description": "Voir les personnes qu'on a invitées" - } - }, - { - "model": "permission.permission", - "pk": 41, - "fields": { - "model": [ - "activity", - "activity" - ], - "query": "{}", - "type": "view", - "mask": 2, - "field": "", - "permanent": false, - "description": "Voir toutes les activités" - } - }, - { - "model": "permission.permission", - "pk": 42, - "fields": { - "model": [ - "activity", - "guest" - ], - "query": "{}", - "type": "view", - "mask": 2, - "field": "", - "permanent": false, - "description": "Voir toutes les personnes invitées" - } - }, - { - "model": "permission.permission", - "pk": 43, - "fields": { - "model": [ - "activity", - "entry" - ], - "query": "{\"activity__open\": true}", - "type": "add", - "mask": 2, - "field": "", - "permanent": false, - "description": "Gérer les entrées d'une activité ouverte" - } - }, - { - "model": "permission.permission", - "pk": 44, - "fields": { - "model": [ - "activity", - "guesttransaction" - ], - "query": "{}", - "type": "add", - "mask": 2, - "field": "", - "permanent": false, - "description": "Créer une transaction d'invitation" - } - }, - { - "model": "permission.permission", - "pk": 45, - "fields": { - "model": [ - "activity", - "guesttransaction" - ], - "query": "{}", - "type": "view", - "mask": 2, - "field": "", - "permanent": false, - "description": "Voir toutes les transactions d'invitation" - } - }, - { - "model": "permission.permission", - "pk": 46, - "fields": { - "model": [ - "activity", - "guesttransaction" - ], - "query": "{}", - "type": "change", - "mask": 2, - "field": "valid", - "permanent": false, - "description": "Valider les transactions d'invitation" - } - }, - { - "model": "permission.permission", - "pk": 47, - "fields": { - "model": [ - "member", - "club" - ], - "query": "{\"pk\": [\"club\", \"pk\"]}", - "type": "change", - "mask": 2, - "field": "", - "permanent": false, - "description": "Modifier un club" - } - }, - { - "model": "permission.permission", - "pk": 48, - "fields": { - "model": [ - "member", - "membership" - ], - "query": "{\"user\": [\"user\"]}", - "type": "view", - "mask": 1, - "field": "", - "permanent": true, - "description": "Voir mes adhésions" - } - }, - { - "model": "permission.permission", - "pk": 49, - "fields": { - "model": [ - "member", - "membership" - ], - "query": "{\"club\": [\"club\"]}", - "type": "view", - "mask": 3, - "field": "", - "permanent": false, - "description": "Voir les adhérent⋅es du club" - } - }, - { - "model": "permission.permission", - "pk": 50, - "fields": { - "model": [ - "member", - "membership" - ], - "query": "{\"club\": [\"club\"]}", - "type": "add", - "mask": 2, - "field": "", - "permanent": false, - "description": "Ajouter un⋅e membre à un club" - } - }, - { - "model": "permission.permission", - "pk": 51, - "fields": { - "model": [ - "member", - "membership" - ], - "query": "{}", - "type": "change", - "mask": 3, - "field": "roles", - "permanent": false, - "description": "Modifier les rôles d'une adhésion" - } - }, - { - "model": "permission.permission", - "pk": 52, - "fields": { - "model": [ - "member", - "profile" - ], - "query": "{\"user\": [\"user\"]}", - "type": "change", - "mask": 1, - "field": "", - "permanent": true, - "description": "Modifier son profil" - } - }, - { - "model": "permission.permission", - "pk": 53, - "fields": { - "model": [ - "member", - "profile" - ], - "query": "{}", - "type": "change", - "mask": 3, - "field": "", - "permanent": false, - "description": "Modifier n'importe quel profil" - } - }, - { - "model": "permission.permission", - "pk": 54, - "fields": { - "model": [ - "auth", - "user" - ], - "query": "{}", - "type": "change", - "mask": 3, - "field": "", - "permanent": false, - "description": "Modifier n'importe quel⋅le utilisateur⋅rice" - } - }, - { - "model": "permission.permission", - "pk": 55, - "fields": { - "model": [ - "auth", - "user" - ], - "query": "{}", - "type": "add", - "mask": 3, - "field": "", - "permanent": false, - "description": "Ajouter un⋅e utilisateur⋅rice" - } - }, - { - "model": "permission.permission", - "pk": 56, - "fields": { - "model": [ - "member", - "profile" - ], - "query": "{\"email_confirmed\": false, \"registration_valid\": false}", - "type": "add", - "mask": 3, - "field": "", - "permanent": false, - "description": "Ajouter un profil" - } - }, - { - "model": "permission.permission", - "pk": 57, - "fields": { - "model": [ - "auth", - "user" - ], - "query": "{\"profile__registration_valid\": false}", - "type": "delete", - "mask": 3, - "field": "", - "permanent": false, - "description": "Supprimer une pré-inscription" - } - }, - { - "model": "permission.permission", - "pk": 58, - "fields": { - "model": [ - "member", - "profile" - ], - "query": "{\"registration_valid\": false}", - "type": "delete", - "mask": 3, - "field": "", - "permanent": false, - "description": "Supprimer le profil d'une pré-inscription" - } - }, - { - "model": "permission.permission", - "pk": 59, - "fields": { - "model": [ - "note", - "transactiontemplate" - ], - "query": "{\"destination\": [\"club\", \"note\"]}", - "type": "view", - "mask": 2, - "field": "", - "permanent": false, - "description": "Voir les boutons d'un club" - } - }, - { - "model": "permission.permission", - "pk": 60, - "fields": { - "model": [ - "note", - "transactiontemplate" - ], - "query": "{\"destination\": [\"club\", \"note\"]}", - "type": "add", - "mask": 3, - "field": "", - "permanent": false, - "description": "Créer un bouton d'un club" - } - }, - { - "model": "permission.permission", - "pk": 61, - "fields": { - "model": [ - "note", - "transactiontemplate" - ], - "query": "{\"destination\": [\"club\", \"note\"]}", - "type": "change", - "mask": 3, - "field": "", - "permanent": false, - "description": "Modifier le bouton d'un club" - } - }, - { - "model": "permission.permission", - "pk": 62, - "fields": { - "model": [ - "note", - "transaction" - ], - "query": "[\"OR\", {\"source\": [\"club\", \"note\"]}, {\"destination\": [\"club\", \"note\"]}]", - "type": "view", - "mask": 2, - "field": "", - "permanent": false, - "description": "Voir les transactions d'un club" - } - }, - { - "model": "permission.permission", - "pk": 63, - "fields": { - "model": [ - "treasury", - "invoice" - ], - "query": "{}", - "type": "view", - "mask": 3, - "field": "", - "permanent": false, - "description": "Voir les factures" - } - }, - { - "model": "permission.permission", - "pk": 64, - "fields": { - "model": [ - "treasury", - "invoice" - ], - "query": "{}", - "type": "add", - "mask": 3, - "field": "", - "permanent": false, - "description": "Ajouter une facture" - } - }, - { - "model": "permission.permission", - "pk": 65, - "fields": { - "model": [ - "treasury", - "invoice" - ], - "query": "{}", - "type": "change", - "mask": 3, - "field": "", - "permanent": false, - "description": "Modifier une facture" - } - }, - { - "model": "permission.permission", - "pk": 66, - "fields": { - "model": [ - "treasury", - "product" - ], - "query": "{}", - "type": "view", - "mask": 3, - "field": "", - "permanent": false, - "description": "Voir les produits" - } - }, - { - "model": "permission.permission", - "pk": 67, - "fields": { - "model": [ - "treasury", - "product" - ], - "query": "{}", - "type": "add", - "mask": 3, - "field": "", - "permanent": false, - "description": "Ajouter des produits" - } - }, - { - "model": "permission.permission", - "pk": 68, - "fields": { - "model": [ - "treasury", - "product" - ], - "query": "{}", - "type": "change", - "mask": 3, - "field": "", - "permanent": false, - "description": "Modifier un produit" - } - }, - { - "model": "permission.permission", - "pk": 69, - "fields": { - "model": [ - "treasury", - "product" - ], - "query": "{}", - "type": "delete", - "mask": 3, - "field": "", - "permanent": false, - "description": "Supprimer un produit" - } - }, - { - "model": "permission.permission", - "pk": 70, - "fields": { - "model": [ - "treasury", - "sogecredit" - ], - "query": "{}", - "type": "add", - "mask": 3, - "field": "", - "permanent": false, - "description": "Ajouter un crédit de la Soci\u00e9t\u00e9 g\u00e9n\u00e9rale" - } - }, - { - "model": "permission.permission", - "pk": 71, - "fields": { - "model": [ - "treasury", - "sogecredit" - ], - "query": "{}", - "type": "view", - "mask": 3, - "field": "", - "permanent": false, - "description": "Voir tous les crédits de la Soci\u00e9t\u00e9 g\u00e9n\u00e9rale" - } - }, - { - "model": "permission.permission", - "pk": 72, - "fields": { - "model": [ - "treasury", - "sogecredit" - ], - "query": "{}", - "type": "change", - "mask": 3, - "field": "", - "permanent": false, - "description": "Modifier un crédit de la Soci\u00e9t\u00e9 g\u00e9n\u00e9rale" - } - }, - { - "model": "permission.permission", - "pk": 73, - "fields": { - "model": [ - "treasury", - "sogecredit" - ], - "query": "{}", - "type": "delete", - "mask": 3, - "field": "", - "permanent": false, - "description": "Supprimer un crédit de la Soci\u00e9t\u00e9 g\u00e9n\u00e9rale" - } - }, - { - "model": "permission.permission", - "pk": 74, - "fields": { - "model": [ - "wei", - "weiclub" - ], - "query": "{}", - "type": "add", - "mask": 3, - "field": "", - "permanent": false, - "description": "Créer un WEI" - } - }, - { - "model": "permission.permission", - "pk": 75, - "fields": { - "model": [ - "wei", - "weiclub" - ], - "query": "{}", - "type": "change", - "mask": 3, - "field": "", - "permanent": false, - "description": "Modifier tous les WEI" - } - }, - { - "model": "permission.permission", - "pk": 76, - "fields": { - "model": [ - "wei", - "weiclub" - ], - "query": "{\"pk\": [\"club\", \"pk\"]}", - "type": "change", - "mask": 3, - "field": "", - "permanent": false, - "description": "Modifier ce WEI" - } - }, - { - "model": "permission.permission", - "pk": 77, - "fields": { - "model": [ - "wei", - "weiclub" - ], - "query": "{\"pk\": [\"club\", \"pk\"]}", - "type": "view", - "mask": 1, - "field": "", - "permanent": true, - "description": "Voir mon WEI" - } - }, - { - "model": "permission.permission", - "pk": 78, - "fields": { - "model": [ - "wei", - "weiclub" - ], - "query": "{\"membership_start__lte\": [\"today\"], \"year\": [\"today\", \"year\"]}", - "type": "view", - "mask": 1, - "field": "", - "permanent": true, - "description": "Voir le dernier WEI" - } - }, - { - "model": "permission.permission", - "pk": 79, - "fields": { - "model": [ - "wei", - "weirole" - ], - "query": "{}", - "type": "view", - "mask": 1, - "field": "", - "permanent": false, - "description": "Voir les rôles pour le WEI" - } - }, - { - "model": "permission.permission", - "pk": 83, - "fields": { - "model": [ - "wei", - "weiregistration" - ], - "query": "{\"user\": [\"user\"], \"wei__year\": [\"today\", \"year\"], \"wei__membership_start__lte\": [\"today\"], \"wei__membership_end__gte\": [\"today\"], \"membership\": null}", - "type": "add", - "mask": 1, - "field": "", - "permanent": true, - "description": "M'inscrire au dernier WEI" - } - }, - { - "model": "permission.permission", - "pk": 84, - "fields": { - "model": [ - "wei", - "weiregistration" - ], - "query": "{\"wei\": [\"club\"], \"first_year\": true, \"wei__membership_start__lte\": [\"today\"], \"wei__membership_end__gte\": [\"today\"], \"membership\": null}", - "type": "add", - "mask": 2, - "field": "", - "permanent": false, - "description": "Inscrire un⋅e 1A au WEI" - } - }, - { - "model": "permission.permission", - "pk": 85, - "fields": { - "model": [ - "wei", - "weiregistration" - ], - "query": "{\"wei\": [\"club\"], \"wei__membership_end__gte\": [\"today\"], \"membership\": null}", - "type": "add", - "mask": 2, - "field": "", - "permanent": false, - "description": "Inscrire n'importe qui au WEI" - } - }, - { - "model": "permission.permission", - "pk": 86, - "fields": { - "model": [ - "wei", - "weiregistration" - ], - "query": "{\"wei\": [\"club\"]}", - "type": "delete", - "mask": 3, - "field": "", - "permanent": false, - "description": "Supprimer une inscription WEI" - } - }, - { - "model": "permission.permission", - "pk": 87, - "fields": { - "model": [ - "wei", - "weiregistration" - ], - "query": "[\"AND\", {\"user\": [\"user\"]}, [\"OR\", {\"wei\": [\"club\"]}, {\"wei__year\": [\"today\", \"year\"], \"membership\": null}]]", - "type": "view", - "mask": 1, - "field": "", - "permanent": true, - "description": "Voir ma propre inscription WEI" - } - }, - { - "model": "permission.permission", - "pk": 88, - "fields": { - "model": [ - "wei", - "weiregistration" - ], - "query": "{\"wei\": [\"club\"]}", - "type": "view", - "mask": 2, - "field": "", - "permanent": false, - "description": "Voir toutes les inscriptions WEI" - } - }, - { - "model": "permission.permission", - "pk": 89, - "fields": { - "model": [ - "wei", - "weiregistration" - ], - "query": "{\"wei\": [\"club\"], \"wei__membership_end__gte\": [\"today\"]}", - "type": "change", - "mask": 3, - "field": "soge_credit", - "permanent": false, - "description": "Indiquer si une inscription WEI est payée par la Société générale" - } - }, - { - "model": "permission.permission", - "pk": 90, - "fields": { - "model": [ - "wei", - "weiregistration" - ], - "query": "[\"AND\", {\"user\": [\"user\"], \"wei__membership_start__lte\": [\"today\"], \"wei__membership_end__gte\": [\"today\"]}, [\"OR\", {\"wei\": [\"club\"]}, {\"wei__year\": [\"today\", \"year\"], \"membership\": null}]]", - "type": "change", - "mask": 1, - "field": "soge_credit", - "permanent": true, - "description": "Indiquer si mon inscription WEI est payée par la Société générale tant qu'elle n'est pas validée" - } - }, - { - "model": "permission.permission", - "pk": 91, - "fields": { - "model": [ - "wei", - "weiregistration" - ], - "query": "{\"wei\": [\"club\"], \"wei__membership_end__gte\": [\"today\"]}", - "type": "change", - "mask": 2, - "field": "caution_check", - "permanent": false, - "description": "Dire si un chèque de caution est donné pour une inscription WEI" - } - }, - { - "model": "permission.permission", - "pk": 92, - "fields": { - "model": [ - "wei", - "weiregistration" - ], - "query": "{\"wei\": [\"club\"], \"wei__membership_end__gte\": [\"today\"]}", - "type": "change", - "mask": 3, - "field": "birth_date", - "permanent": false, - "description": "Modifier la date de naissance d'une inscription WEI" - } - }, - { - "model": "permission.permission", - "pk": 93, - "fields": { - "model": [ - "wei", - "weiregistration" - ], - "query": "[\"AND\", {\"user\": [\"user\"], \"wei__membership_start__lte\": [\"today\"], \"wei__membership_end__gte\": [\"today\"]}, [\"OR\", {\"wei\": [\"club\"]}, {\"wei__year\": [\"today\", \"year\"], \"membership\": null}]]", - "type": "change", - "mask": 1, - "field": "birth_date", - "permanent": true, - "description": "Modifier la date de naissance de ma propre inscription WEI" - } - }, - { - "model": "permission.permission", - "pk": 94, - "fields": { - "model": [ - "wei", - "weiregistration" - ], - "query": "{\"wei\": [\"club\"], \"wei__membership_end__gte\": [\"today\"]}", - "type": "change", - "mask": 3, - "field": "gender", - "permanent": false, - "description": "Modifier le genre de toute inscription WEI" - } - }, - { - "model": "permission.permission", - "pk": 95, - "fields": { - "model": [ - "wei", - "weiregistration" - ], - "query": "[\"AND\", {\"user\": [\"user\"], \"wei__membership_start__lte\": [\"today\"], \"wei__membership_end__gte\": [\"today\"]}, [\"OR\", {\"wei\": [\"club\"]}, {\"wei__year\": [\"today\", \"year\"], \"membership\": null}]]", - "type": "change", - "mask": 1, - "field": "gender", - "permanent": true, - "description": "Modifier le genre de ma propre inscription WEI" - } - }, - { - "model": "permission.permission", - "pk": 96, - "fields": { - "model": [ - "wei", - "weiregistration" - ], - "query": "{\"wei\": [\"club\"], \"wei__membership_end__gte\": [\"today\"]}", - "type": "change", - "mask": 3, - "field": "health_issues", - "permanent": false, - "description": "Modifier les problèmes de santé de toutes les inscriptions WEI" - } - }, - { - "model": "permission.permission", - "pk": 97, - "fields": { - "model": [ - "wei", - "weiregistration" - ], - "query": "[\"AND\", {\"user\": [\"user\"], \"wei__membership_start__lte\": [\"today\"], \"wei__membership_end__gte\": [\"today\"]}, [\"OR\", {\"wei\": [\"club\"]}, {\"wei__year\": [\"today\", \"year\"], \"membership\": null}]]", - "type": "change", - "mask": 1, - "field": "health_issues", - "permanent": true, - "description": "Modifier mes problèmes de santé de mon inscription WEI" - } - }, - { - "model": "permission.permission", - "pk": 98, - "fields": { - "model": [ - "wei", - "weiregistration" - ], - "query": "{\"wei\": [\"club\"], \"wei__membership_end__gte\": [\"today\"]}", - "type": "change", - "mask": 3, - "field": "emergency_contact_name", - "permanent": false, - "description": "Modifier le nom du contact en cas d'urgence de toute inscription WEI" - } - }, - { - "model": "permission.permission", - "pk": 99, - "fields": { - "model": [ - "wei", - "weiregistration" - ], - "query": "[\"AND\", {\"user\": [\"user\"], \"wei__membership_start__lte\": [\"today\"], \"wei__membership_end__gte\": [\"today\"]}, [\"OR\", {\"wei\": [\"club\"]}, {\"wei__year\": [\"today\", \"year\"], \"membership\": null}]]", - "type": "change", - "mask": 1, - "field": "emergency_contact_name", - "permanent": true, - "description": "Modifier le nom du contact en cas d'urgence de mon inscription WEI" - } - }, - { - "model": "permission.permission", - "pk": 100, - "fields": { - "model": [ - "wei", - "weiregistration" - ], - "query": "{\"wei\": [\"club\"], \"wei__membership_end__gte\": [\"today\"]}", - "type": "change", - "mask": 3, - "field": "emergency_contact_phone", - "permanent": false, - "description": "Modifier le téléphone du contact en cas d'urgence de toute inscription WEI" - } - }, - { - "model": "permission.permission", - "pk": 101, - "fields": { - "model": [ - "wei", - "weiregistration" - ], - "query": "[\"AND\", {\"user\": [\"user\"], \"wei__membership_start__lte\": [\"today\"], \"wei__membership_end__gte\": [\"today\"]}, [\"OR\", {\"wei\": [\"club\"]}, {\"wei__year\": [\"today\", \"year\"], \"membership\": null}]]", - "type": "change", - "mask": 1, - "field": "emergency_contact_phone", - "permanent": true, - "description": "Modifier le téléphone du contact en cas d'urgence de mon inscription WEI" - } - }, - { - "model": "permission.permission", - "pk": 102, - "fields": { - "model": [ - "wei", - "weiregistration" - ], - "query": "{\"wei\": [\"club\"], \"wei__membership_end__gte\": [\"today\"]}", - "type": "change", - "mask": 3, - "field": "information_json", - "permanent": false, - "description": "Modifier les informations (sondage 1A, ...) d'une inscription WEI" - } - }, - { - "model": "permission.permission", - "pk": 103, - "fields": { - "model": [ - "wei", - "bus" - ], - "query": "{\"wei\": [\"club\"]}", - "type": "add", - "mask": 3, - "field": "", - "permanent": false, - "description": "Ajouter un bus au WEI" - } - }, - { - "model": "permission.permission", - "pk": 104, - "fields": { - "model": [ - "wei", - "bus" - ], - "query": "{\"wei\": [\"club\"], \"wei__membership_end__gte\": [\"today\"]}", - "type": "change", - "mask": 3, - "field": "name", - "permanent": false, - "description": "Modifier le nom d'un bus d'un WEI" - } - }, - { - "model": "permission.permission", - "pk": 105, - "fields": { - "model": [ - "wei", - "bus" - ], - "query": "{\"wei\": [\"club\"], \"wei__membership_end__gte\": [\"today\"]}", - "type": "change", - "mask": 3, - "field": "description", - "permanent": false, - "description": "Modifier la description d'un bus d'un WEI" - } - }, - { - "model": "permission.permission", - "pk": 106, - "fields": { - "model": [ - "wei", - "busteam" - ], - "query": "{\"bus__wei\": [\"club\"], \"bus__wei__membership_end__gte\": [\"today\"]}", - "type": "add", - "mask": 3, - "field": "", - "permanent": false, - "description": "Créer une équipe WEI" - } - }, - { - "model": "permission.permission", - "pk": 107, - "fields": { - "model": [ - "wei", - "busteam" - ], - "query": "{\"bus__wei\": [\"club\"], \"bus__wei__membership_end__gte\": [\"today\"]}", - "type": "change", - "mask": 3, - "field": "", - "permanent": false, - "description": "Modifier une équipe WEI" - } - }, - { - "model": "permission.permission", - "pk": 108, - "fields": { - "model": [ - "wei", - "bus" - ], - "query": "[\"AND\", {\"wei\": [\"club\"]}, [\"OR\", [\"NOT\", [\"membership\", \"weimembership\", \"registration\", \"first_year\"]], {\"wei__date_end__lte\": [\"today\"]}]]", - "type": "view", - "mask": 1, - "field": "", - "permanent": true, - "description": "Voir tous les bus WEI si on est en 2A+ ou que le WEI est terminé" - } - }, - { - "model": "permission.permission", - "pk": 109, - "fields": { - "model": [ - "wei", - "busteam" - ], - "query": "[\"AND\", {\"bus__wei\": [\"club\"]}, [\"OR\", [\"NOT\", [\"membership\", \"weimembership\", \"registration\", \"first_year\"]], {\"bus__wei__date_end__lte\": [\"today\"]}]]", - "type": "view", - "mask": 1, - "field": "", - "permanent": true, - "description": "Voir toutes les équipes WEI si on est en 2A+ ou que le WEI est terminé" - } - }, - { - "model": "permission.permission", - "pk": 110, - "fields": { - "model": [ - "wei", - "weimembership" - ], - "query": "[\"AND\", {\"club\": [\"club\"], \"club__weiclub__membership_end__gte\": [\"today\"]}, [\"OR\", {\"registration__soge_credit\": true}, {\"user__note__balance__gte\": {\"F\": [\"F\", \"fee\"]}}]]", - "type": "add", - "mask": 2, - "field": "", - "permanent": false, - "description": "Créer une adhésion WEI pour le dernier WEI" - } - }, - { - "model": "permission.permission", - "pk": 111, - "fields": { - "model": [ - "wei", - "weimembership" - ], - "query": "{\"club\": [\"club\"], \"club__weiclub__membership_end__gte\": [\"today\"]}", - "type": "change", - "mask": 2, - "field": "bus", - "permanent": false, - "description": "Modifier le bus d'une adhésion WEI" - } - }, - { - "model": "permission.permission", - "pk": 112, - "fields": { - "model": [ - "wei", - "weimembership" - ], - "query": "{\"club\": [\"club\"], \"club__weiclub__membership_end__gte\": [\"today\"]}", - "type": "change", - "mask": 2, - "field": "team", - "permanent": false, - "description": "Modifier l'équipe d'une adhésion WEI" - } - }, - { - "model": "permission.permission", - "pk": 113, - "fields": { - "model": [ - "wei", - "weimembership" - ], - "query": "{\"club\": [\"club\"]}", - "type": "view", - "mask": 2, - "field": "", - "permanent": false, - "description": "Voir toutes les adhésions au WEI" - } - }, - { - "model": "permission.permission", - "pk": 114, - "fields": { - "model": [ - "wei", - "weimembership" - ], - "query": "[\"AND\", {\"user\": [\"user\"], \"club\": [\"club\"]}, [\"OR\", {\"registration__first_year\": false}, {\"club__weiclub__date_end__lte\": [\"today\"]}]]", - "type": "view", - "mask": 1, - "field": "", - "permanent": true, - "description": "Voir mes adhésions WEI passées" - } - }, - { - "model": "permission.permission", - "pk": 115, - "fields": { - "model": [ - "wei", - "weimembership" - ], - "query": "{\"club\": [\"club\"], \"bus\": [\"membership\", \"weimembership\", \"bus\"]}", - "type": "view", - "mask": 2, - "field": "", - "permanent": false, - "description": "Voir les membres du bus" - } - }, - { - "model": "permission.permission", - "pk": 116, - "fields": { - "model": [ - "wei", - "weimembership" - ], - "query": "{\"club\": [\"club\"], \"team\": [\"membership\", \"weimembership\", \"team\"]}", - "type": "view", - "mask": 2, - "field": "", - "permanent": false, - "description": "Voir les membres de l'équipe" - } - }, - { - "model": "permission.permission", - "pk": 117, - "fields": { - "model": [ - "wei", - "bus" - ], - "query": "{\"pk\": [\"membership\", \"weimembership\", \"bus\", \"pk\"], \"wei__date_end__gte\": [\"today\"]}", - "type": "change", - "mask": 3, - "field": "name", - "permanent": false, - "description": "Modifier le nom du bus" - } - }, - { - "model": "permission.permission", - "pk": 118, - "fields": { - "model": [ - "wei", - "bus" - ], - "query": "{\"pk\": [\"membership\", \"weimembership\", \"bus\", \"pk\"], \"wei__date_end__gte\": [\"today\"]}", - "type": "change", - "mask": 3, - "field": "description", - "permanent": false, - "description": "Modifier la description du bus" - } - }, - { - "model": "permission.permission", - "pk": 119, - "fields": { - "model": [ - "wei", - "busteam" - ], - "query": "{\"bus\": [\"membership\", \"weimembership\", \"bus\"], \"bus__wei__date_end__gte\": [\"today\"]}", - "type": "add", - "mask": 3, - "field": "", - "permanent": false, - "description": "Ajouter une équipe à mon bus" - } - }, - { - "model": "permission.permission", - "pk": 120, - "fields": { - "model": [ - "wei", - "busteam" - ], - "query": "{\"bus\": [\"membership\", \"weimembership\", \"bus\"], \"bus__wei__date_end__gte\": [\"today\"]}", - "type": "change", - "mask": 3, - "field": "name", - "permanent": false, - "description": "Modifier le nom d'une équipe de mon bus" - } - }, - { - "model": "permission.permission", - "pk": 121, - "fields": { - "model": [ - "wei", - "busteam" - ], - "query": "{\"bus\": [\"membership\", \"weimembership\", \"bus\"], \"bus__wei__date_end__gte\": [\"today\"]}", - "type": "change", - "mask": 3, - "field": "color", - "permanent": false, - "description": "Modifier la couleur d'une équipe de mon bus" - } - }, - { - "model": "permission.permission", - "pk": 122, - "fields": { - "model": [ - "wei", - "busteam" - ], - "query": "{\"bus\": [\"membership\", \"weimembership\", \"bus\"], \"bus__wei__date_end__gte\": [\"today\"]}", - "type": "change", - "mask": 3, - "field": "description", - "permanent": false, - "description": "Modifier la description d'une équipe de mon bus" - } - }, - { - "model": "permission.permission", - "pk": 123, - "fields": { - "model": [ - "wei", - "busteam" - ], - "query": "{\"pk\": [\"membership\", \"weimembership\", \"team\", \"pk\"], \"bus__wei__date_end__gte\": [\"today\"]}", - "type": "change", - "mask": 3, - "field": "name", - "permanent": false, - "description": "Modifier le nom de mon équipe" - } - }, - { - "model": "permission.permission", - "pk": 124, - "fields": { - "model": [ - "wei", - "busteam" - ], - "query": "{\"pk\": [\"membership\", \"weimembership\", \"team\", \"pk\"], \"bus__wei__date_end__gte\": [\"today\"]}", - "type": "change", - "mask": 3, - "field": "color", - "permanent": false, - "description": "Modifier la couleur de mon équipe" - } - }, - { - "model": "permission.permission", - "pk": 125, - "fields": { - "model": [ - "wei", - "busteam" - ], - "query": "{\"pk\": [\"membership\", \"weimembership\", \"team\", \"pk\"], \"bus__wei__date_end__gte\": [\"today\"]}", - "type": "change", - "mask": 3, - "field": "description", - "permanent": false, - "description": "Modifier la description de mon équipe" - } - }, - { - "model": "permission.permission", - "pk": 126, - "fields": { - "model": [ - "activity", - "activity" - ], - "query": "{\"entries__note__user\": [\"user\"]}", - "type": "view", - "mask": 1, - "field": "", - "permanent": true, - "description": "Voir mes activités passées, même après la fin de l'adhésion BDE" - } - }, - { - "model": "permission.permission", - "pk": 127, - "fields": { - "model": [ - "note", - "transaction" - ], - "query": "[\"AND\", [\"OR\", {\"source\": [\"club\", \"note\"]}, {\"destination\": [\"club\", \"note\"]}], [\"OR\", {\"source__balance__gte\": {\"F\": [\"SUB\", [\"MUL\", [\"F\", \"amount\"], [\"F\", \"quantity\"]], 2000]}, \"valid\": false}, {\"destination__balance__gte\": {\"F\": [\"SUB\", [\"MUL\", [\"F\", \"amount\"], [\"F\", \"quantity\"]], 2000]}, \"valid\": true}]]", - "type": "change", - "mask": 2, - "field": "valid", - "permanent": false, - "description": "Modifier le statut de validation d'une transaction de club si c'est possible" - } - }, - { - "model": "permission.permission", - "pk": 128, - "fields": { - "model": [ - "wei", - "weiregistration" - ], - "query": "{\"wei\": [\"club\"], \"wei__membership_end__gte\": [\"today\"]}", - "type": "change", - "mask": 3, - "field": "clothing_cut", - "permanent": false, - "description": "Modifier la coupe de vêtements d'une inscription WEI" - } - }, - { - "model": "permission.permission", - "pk": 129, - "fields": { - "model": [ - "wei", - "weiregistration" - ], - "query": "[\"AND\", {\"user\": [\"user\"], \"wei__membership_start__lte\": [\"today\"], \"wei__membership_end__gte\": [\"today\"]}, [\"OR\", {\"wei\": [\"club\"]}, {\"wei__year\": [\"today\", \"year\"], \"membership\": null}]]", - "type": "change", - "mask": 1, - "field": "clothing_cut", - "permanent": true, - "description": "Modifier ma coupe de vêtements de mon inscription WEI" - } - }, - { - "model": "permission.permission", - "pk": 130, - "fields": { - "model": [ - "wei", - "weiregistration" - ], - "query": "{\"wei\": [\"club\"], \"wei__membership_end__gte\": [\"today\"]}", - "type": "change", - "mask": 3, - "field": "clothing_size", - "permanent": false, - "description": "Modifier la taille de vêtements d'une inscription WEI" - } - }, - { - "model": "permission.permission", - "pk": 131, - "fields": { - "model": [ - "wei", - "weiregistration" - ], - "query": "[\"AND\", {\"user\": [\"user\"], \"wei__membership_start__lte\": [\"today\"], \"wei__membership_end__gte\": [\"today\"]}, [\"OR\", {\"wei\": [\"club\"]}, {\"wei__year\": [\"today\", \"year\"], \"membership\": null}]]", - "type": "change", - "mask": 1, - "field": "clothing_size", - "permanent": true, - "description": "Modifier la taille de vêtements de mon inscription WEI" - } - }, - { - "model": "permission.permission", - "pk": 132, - "fields": { - "model": [ - "note", - "recurrenttransaction" - ], - "query": "{}", - "type": "add", - "mask": 2, - "field": "", - "permanent": false, - "description": "Créer une transaction depuis un bouton" - } - }, - { - "model": "permission.permission", - "pk": 133, - "fields": { - "model": [ - "note", - "transaction" - ], - "query": "[\"AND\", [\"OR\", {\"source\": [\"club\", \"note\"]}, {\"destination\": [\"club\", \"note\"]}], [\"OR\", {\"source__balance__gte\": {\"F\": [\"SUB\", [\"MUL\", [\"F\", \"amount\"], [\"F\", \"quantity\"]], 2000]}, \"valid\": true}, {\"destination__balance__gte\": {\"F\": [\"SUB\", [\"MUL\", [\"F\", \"amount\"], [\"F\", \"quantity\"]], 2000]}, \"valid\": false}]]", - "type": "change", - "mask": 2, - "field": "invalidity_reason", - "permanent": false, - "description": "Modifier la raison d'invalidité d'une transaction de club" - } - }, - { - "model": "permission.permission", - "pk": 134, - "fields": { - "model": [ - "note", - "transaction" - ], - "query": "{}", - "type": "change", - "mask": 2, - "field": "invalidity_reason", - "permanent": false, - "description": "Modifier la raison d'invalidité d'une transaction" - } - }, - { - "model": "permission.permission", - "pk": 135, - "fields": { - "model": [ - "auth", - "user" - ], - "query": "{}", - "type": "view", - "mask": 3, - "field": "", - "permanent": false, - "description": "Voir n'importe quel⋅le utilisateur⋅rice" - } - }, - { - "model": "permission.permission", - "pk": 136, - "fields": { - "model": [ - "member", - "profile" - ], - "query": "{}", - "type": "view", - "mask": 3, - "field": "", - "permanent": false, - "description": "Voir n'importe quel profil" - } - }, - { - "model": "permission.permission", - "pk": 137, - "fields": { - "model": [ - "member", - "club" - ], - "query": "{}", - "type": "view", - "mask": 3, - "field": "", - "permanent": false, - "description": "Voir n'importe quel club" - } - }, - { - "model": "permission.permission", - "pk": 138, - "fields": { - "model": [ - "member", - "club" - ], - "query": "{}", - "type": "change", - "mask": 3, - "field": "", - "permanent": false, - "description": "Modifier n'importe quel club" - } - }, - { - "model": "permission.permission", - "pk": 139, - "fields": { - "model": [ - "note", - "noteclub" - ], - "query": "{}", - "type": "add", - "mask": 3, - "field": "", - "permanent": false, - "description": "Créer une note de club" - } - }, - { - "model": "permission.permission", - "pk": 140, - "fields": { - "model": [ - "member", - "club" - ], - "query": "{}", - "type": "add", - "mask": 3, - "field": "", - "permanent": false, - "description": "Créer un club" - } - }, - { - "model": "permission.permission", - "pk": 141, - "fields": { - "model": [ - "auth", - "user" - ], - "query": "{\"memberships__club\": [\"club\"], \"memberships__date_start__lte\": [\"today\"], \"memberships__date_end__gte\": [\"today\"]}", - "type": "view", - "mask": 3, - "field": "", - "permanent": false, - "description": "Voir les membres de mon club" - } - }, - { - "model": "permission.permission", - "pk": 142, - "fields": { - "model": [ - "note", - "note" - ], - "query": "{\"noteclub__club\": [\"club\"]}", - "type": "view", - "mask": 2, - "field": "", - "permanent": false, - "description": "Voir la note de mon club" - } - }, - { - "model": "permission.permission", - "pk": 143, - "fields": { - "model": [ - "note", - "noteuser" - ], - "query": "{}", - "type": "add", - "mask": 3, - "field": "", - "permanent": false, - "description": "Créer une note d'utilisateur⋅rice" - } - }, - { - "model": "permission.permission", - "pk": 144, - "fields": { - "model": [ - "wei", - "weiregistration" - ], - "query": "[\"AND\", {\"user\": [\"user\"], \"wei__membership_start__lte\": [\"today\"], \"wei__membership_end__gte\": [\"today\"], \"first_year\": false, \"membership\": null}]", - "type": "change", - "mask": 1, - "field": "information_json", - "permanent": true, - "description": "Modifier mes préférences en terme de bus et d'équipe si mon inscription n'est pas validée et que je suis en 2A+" - } - }, - { - "model": "permission.permission", - "pk": 145, - "fields": { - "model": [ - "note", - "noteclub" - ], - "query": "{}", - "type": "view", - "mask": 2, - "field": "", - "permanent": false, - "description": "Voir toutes les notes de club" - } - }, - { - "model": "permission.permission", - "pk": 146, - "fields": { - "model": [ - "member", - "membership" - ], - "query": "{}", - "type": "view", - "mask": 3, - "field": "", - "permanent": false, - "description": "Voir toustes les adhérent⋅es de tous les clubs" - } - }, - { - "model": "permission.permission", - "pk": 147, - "fields": { - "model": [ - "member", - "membership" - ], - "query": "{}", - "type": "add", - "mask": 3, - "field": "", - "permanent": false, - "description": "Ajouter un⋅e membre à n'importe quel club" - } - }, - { - "model": "permission.permission", - "pk": 148, - "fields": { - "model": [ - "activity", - "activity" - ], - "query": "{\"valid\": false}", - "type": "change", - "mask": 2, - "field": "", - "permanent": false, - "description": "Modifier une activité non validée" - } - }, - { - "model": "permission.permission", - "pk": 149, - "fields": { - "model": [ - "activity", - "activity" - ], - "query": "{\"valid\": false}", - "type": "delete", - "mask": 2, - "field": "", - "permanent": false, - "description": "Supprimer une activité non validée" - } - }, - { - "model": "permission.permission", - "pk": 150, - "fields": { - "model": [ - "note", - "note" - ], - "query": "{}", - "type": "view", - "mask": 2, - "field": "", - "permanent": false, - "description": "Voir toutes les notes" - } - }, - { - "model": "permission.permission", - "pk": 151, - "fields": { - "model": [ - "treasury", - "invoice" - ], - "query": "{}", - "type": "delete", - "mask": 3, - "field": "", - "permanent": false, - "description": "Supprimer une facture" - } - }, - { - "model": "permission.permission", - "pk": 152, - "fields": { - "model": [ - "activity", - "activity" - ], - "query": "[\"AND\", {\"valid\": false}, {\"creater\": [\"user\"]}]", - "type": "change", - "mask": 1, - "field": "name", - "permanent": false, - "description": "Modifier le nom d'une activité non validée dont on est l'auteur⋅rice" - } - }, - { - "model": "permission.permission", - "pk": 153, - "fields": { - "model": [ - "activity", - "activity" - ], - "query": "[\"AND\", {\"valid\": false}, {\"creater\": [\"user\"]}]", - "type": "change", - "mask": 1, - "field": "description", - "permanent": false, - "description": "Modifier la description d'une activité non validée dont on est l'auteur⋅rice" - } - }, - { - "model": "permission.permission", - "pk": 154, - "fields": { - "model": [ - "activity", - "activity" - ], - "query": "[\"AND\", {\"valid\": false}, {\"creater\": [\"user\"]}]", - "type": "change", - "mask": 1, - "field": "location", - "permanent": false, - "description": "Modifier le lieu d'une activité non validée dont on est l'auteur⋅rice" - } - }, - { - "model": "permission.permission", - "pk": 155, - "fields": { - "model": [ - "activity", - "activity" - ], - "query": "[\"AND\", {\"valid\": false}, {\"creater\": [\"user\"]}]", - "type": "change", - "mask": 1, - "field": "activity_type", - "permanent": false, - "description": "Modifier le type d'une activité non validée dont on est l'auteur⋅rice" - } - }, - { - "model": "permission.permission", - "pk": 156, - "fields": { - "model": [ - "activity", - "activity" - ], - "query": "[\"AND\", {\"valid\": false}, {\"creater\": [\"user\"]}]", - "type": "change", - "mask": 1, - "field": "organizer", - "permanent": false, - "description": "Modifier l'organisateur d'une activité non validée dont on est l'auteur⋅rice" - } - }, - { - "model": "permission.permission", - "pk": 157, - "fields": { - "model": [ - "activity", - "activity" - ], - "query": "[\"AND\", {\"valid\": false}, {\"creater\": [\"user\"]}]", - "type": "change", - "mask": 1, - "field": "attendees_club", - "permanent": false, - "description": "Modifier le club attendu d'une activité non validée dont on est l'auteur⋅rice" - } - }, - { - "model": "permission.permission", - "pk": 158, - "fields": { - "model": [ - "activity", - "activity" - ], - "query": "[\"AND\", {\"valid\": false}, {\"creater\": [\"user\"]}]", - "type": "change", - "mask": 1, - "field": "date_start", - "permanent": false, - "description": "Modifier la date de début d'une activité non validée dont on est l'auteur⋅rice" - } - }, - { - "model": "permission.permission", - "pk": 159, - "fields": { - "model": [ - "activity", - "activity" - ], - "query": "[\"AND\", {\"valid\": false}, {\"creater\": [\"user\"]}]", - "type": "change", - "mask": 1, - "field": "date_end", - "permanent": false, - "description": "Modifier la date de fin d'une activité non validée dont on est l'auteur⋅rice" - } - }, - { - "model": "permission.permission", - "pk": 160, - "fields": { - "model": [ - "activity", - "guest" - ], - "query": "{\"inviter\": [\"user\", \"note\"], \"entry\": null}", - "type": "delete", - "mask": 1, - "field": "", - "permanent": false, - "description": "Supprimer ses propres invitations non validées à une activité" - } - }, - { - "model": "permission.permission", - "pk": 161, - "fields": { - "model": [ - "note", - "noteuser" - ], - "query": "[\"AND\", {\"user\": [\"user\"]}, [\"OR\", {\"inactivity_reason\": \"manual\"}, {\"is_active\": true}]]", - "type": "change", - "mask": 1, - "field": "is_active", - "permanent": true, - "description": "(Dé)bloquer sa propre note manuellement" - } - }, - { - "model": "permission.permission", - "pk": 162, - "fields": { - "model": [ - "note", - "noteuser" - ], - "query": "[\"AND\", {\"user\": [\"user\"]}, [\"OR\", {\"inactivity_reason\": \"manual\"}, {\"is_active\": true}]]", - "type": "change", - "mask": 1, - "field": "inactivity_reason", - "permanent": true, - "description": "(Dé)bloquer sa propre note et indiquer que cela a été fait manuellement" - } - }, - { - "model": "permission.permission", - "pk": 163, - "fields": { - "model": [ - "note", - "note" - ], - "query": "{}", - "type": "change", - "mask": 3, - "field": "is_active", - "permanent": false, - "description": "(Dé)bloquer n'importe quelle note, y compris en mode forcé" - } - }, - { - "model": "permission.permission", - "pk": 164, - "fields": { - "model": [ - "note", - "note" - ], - "query": "{}", - "type": "change", - "mask": 3, - "field": "inactivity_reason", - "permanent": false, - "description": "(Dé)bloquer n'importe quelle note et indiquer la raison" - } - }, - { - "model": "permission.permission", - "pk": 165, - "fields": { - "model": [ - "auth", - "user" - ], - "query": "{}", - "type": "change", - "mask": 1, - "field": "password", - "permanent": true, - "description": "Changer son mot de passe" - } - }, - { - "model": "permission.permission", - "pk": 166, - "fields": { - "model": [ - "note", - "transaction" - ], - "query": "[\"OR\", {\"source__balance__gte\": 0}, [\"AND\", [\"NOT\", {\"recurrenttransaction__template__category__name\": \"Alcool\"}], {\"source__balance__gte\": {\"F\": [\"SUB\", [\"MUL\", [\"F\", \"amount\"], [\"F\", \"quantity\"]], 2000]}}], {\"valid\": false}]", - "type": "add", - "mask": 2, - "field": "", - "permanent": false, - "description": "Créer une transaction quelconque tant que la source reste positive s'il s'agit d'alcool, sinon au-dessus de -20€" - } - }, - { - "model": "permission.permission", - "pk": 167, - "fields": { - "model": [ - "note", - "transaction" - ], - "query": "[\"OR\", {\"source__balance__gte\": {\"F\": [\"SUB\", [\"MUL\", [\"F\", \"amount\"], [\"F\", \"quantity\"]], 2000]}, \"valid\": false}, {\"destination__balance__gte\": {\"F\": [\"SUB\", [\"MUL\", [\"F\", \"amount\"], [\"F\", \"quantity\"]], 2000]}, \"valid\": true}]", - "type": "change", - "mask": 2, - "field": "valid", - "permanent": false, - "description": "Modifier le statut de validation d'une transaction si tout le monde reste au dessus de -20 €" - } - }, - { - "model": "permission.permission", - "pk": 168, - "fields": { - "model": [ - "note", - "transaction" - ], - "query": "[\"OR\", {\"source__balance__gte\": {\"F\": [\"SUB\", [\"MUL\", [\"F\", \"amount\"], [\"F\", \"quantity\"]], 2000]}, \"valid\": false}, {\"destination__balance__gte\": {\"F\": [\"SUB\", [\"MUL\", [\"F\", \"amount\"], [\"F\", \"quantity\"]], 2000]}, \"valid\": true}]", - "type": "change", - "mask": 2, - "field": "invalidity_reason", - "permanent": false, - "description": "Modifier la raison d'invalidité d'une transaction si tout le monde reste au dessus de -20 €" - } - }, - { - "model": "permission.permission", - "pk": 169, - "fields": { - "model": [ - "note", - "noteclub" - ], - "query": "{\"club\": [\"club\"]}", - "type": "change", - "mask": 2, - "field": "display_image", - "permanent": false, - "description": "Changer l'image de la note de son club" - } - }, - { - "model": "permission.permission", - "pk": 170, - "fields": { - "model": [ - "note", - "alias" - ], - "query": "{\"note__is_active\": true}", - "type": "add", - "mask": 3, - "field": "", - "permanent": false, - "description": "Ajouter n'importe quel alias à une note non bloquée" - } - }, - { - "model": "permission.permission", - "pk": 171, - "fields": { - "model": [ - "note", - "alias" - ], - "query": "{\"note__is_active\": true}", - "type": "delete", - "mask": 3, - "field": "", - "permanent": false, - "description": "Supprimer n'importe quel alias à une note non bloquée" - } - }, - { - "model": "permission.permission", - "pk": 172, - "fields": { - "model": [ - "treasury", - "remittance" - ], - "query": "{}", - "type": "view", - "mask": 3, - "field": "", - "permanent": false, - "description": "Voir toutes les remises" - } - }, - { - "model": "permission.permission", - "pk": 173, - "fields": { - "model": [ - "treasury", - "remittance" - ], - "query": "{}", - "type": "add", - "mask": 3, - "field": "", - "permanent": false, - "description": "Ajouter une remise" - } - }, - { - "model": "permission.permission", - "pk": 174, - "fields": { - "model": [ - "treasury", - "remittance" - ], - "query": "{}", - "type": "change", - "mask": 3, - "field": "", - "permanent": false, - "description": "Modifier une remise" - } - }, - { - "model": "permission.permission", - "pk": 175, - "fields": { - "model": [ - "treasury", - "remittance" - ], - "query": "{}", - "type": "delete", - "mask": 3, - "field": "", - "permanent": false, - "description": "Supprimer une remise" - } - }, - { - "model": "permission.permission", - "pk": 176, - "fields": { - "model": [ - "auth", - "user" - ], - "query": "{\"profile__registration_valid\": false}", - "type": "change", - "mask": 3, - "field": "", - "permanent": false, - "description": "Modifier n'importe quel⋅le utilisateur⋅rice non encore inscrit⋅e" - } - }, - { - "model": "permission.permission", - "pk": 177, - "fields": { - "model": [ - "member", - "profile" - ], - "query": "{\"registration_valid\": false}", - "type": "change", - "mask": 3, - "field": "", - "permanent": false, - "description": "Modifier n'importe quel profil non encore inscrit" - } - }, - { - "model": "permission.permission", - "pk": 178, - "fields": { - "model": [ - "note", - "alias" - ], - "query": "{}", - "type": "view", - "mask": 3, - "field": "", - "permanent": false, - "description": "Voir tous les alias, y compris ceux des non adhérent⋅es" - } - }, - { - "model": "permission.permission", - "pk": 179, - "fields": { - "model": [ - "note", - "alias" - ], - "query": "{\"note__noteuser__user\": [\"user\"]}", - "type": "view", - "mask": 1, - "field": "", - "permanent": true, - "description": "Voir ses propres alias, pour toujours" - } - }, - { - "model": "permission.permission", - "pk": 180, - "fields": { - "model": [ - "auth", - "user" - ], - "query": "{\"profile__registration_valid\": false}", - "type": "view", - "mask": 2, - "field": "", - "permanent": false, - "description": "Voir n'importe quel⋅le utilisateur⋅rice non encore inscrit⋅e" - } - }, - { - "model": "permission.permission", - "pk": 181, - "fields": { - "model": [ - "member", - "profile" - ], - "query": "{\"registration_valid\": false}", - "type": "view", - "mask": 2, - "field": "", - "permanent": false, - "description": "Voir n'importe quel profil non encore inscrit" - } - }, - { - "model": "permission.permission", - "pk": 182, - "fields": { - "model": [ - "auth", - "user" - ], - "query": "{\"memberships__club__name\": \"BDE\", \"memberships__roles__name\": \"Adhérent⋅e BDE\", \"memberships__date_start__lte\": [\"today\"], \"memberships__date_end__gte\": [\"today\"]}", - "type": "view", - "mask": 2, - "field": "", - "permanent": false, - "description": "Voir n'importe quel⋅le utilisateur⋅rice qui est adhérent⋅e BDE" - } - }, - { - "model": "permission.permission", - "pk": 183, - "fields": { - "model": [ - "note", - "note" - ], - "query": "{}", - "type": "change", - "mask": 3, - "field": "display_image", - "permanent": false, - "description": "Changer l'image de n'importe quelle note" - } - }, - { - "model": "permission.permission", - "pk": 184, - "fields": { - "model": [ - "note", - "noteclub" - ], - "query": "[\"AND\", {\"club\": [\"club\"]}, [\"OR\", {\"inactivity_reason\": \"manual\"}, {\"is_active\": true}]]", - "type": "change", - "mask": 3, - "field": "is_active", - "permanent": false, - "description": "(Dé)bloquer la note de son club manuellement" - } - }, - { - "model": "permission.permission", - "pk": 185, - "fields": { - "model": [ - "note", - "noteclub" - ], - "query": "[\"AND\", {\"club\": [\"club\"]}, [\"OR\", {\"inactivity_reason\": \"manual\"}, {\"is_active\": true}]]", - "type": "change", - "mask": 3, - "field": "inactivity_reason", - "permanent": false, - "description": "(Dé)bloquer la note de son club et indiquer que cela a été fait manuellement" - } - }, - { - "model": "permission.permission", - "pk": 186, - "fields": { - "model": [ - "oauth2_provider", - "application" - ], - "query": "{\"user\": [\"user\"]}", - "type": "view", - "mask": 1, - "field": "", - "permanent": true, - "description": "Voir ses applications OAuth2" - } - }, - { - "model": "permission.permission", - "pk": 187, - "fields": { - "model": [ - "oauth2_provider", - "application" - ], - "query": "{\"user\": [\"user\"]}", - "type": "add", - "mask": 1, - "field": "", - "permanent": true, - "description": "Créer une application OAuth2" - } - }, - { - "model": "permission.permission", - "pk": 188, - "fields": { - "model": [ - "oauth2_provider", - "application" - ], - "query": "{\"user\": [\"user\"]}", - "type": "change", - "mask": 1, - "field": "", - "permanent": true, - "description": "Modifier une application OAuth2" - } - }, - { - "model": "permission.permission", - "pk": 189, - "fields": { - "model": [ - "oauth2_provider", - "application" - ], - "query": "{\"user\": [\"user\"]}", - "type": "delete", - "mask": 1, - "field": "", - "permanent": true, - "description": "Supprimer une application OAuth2" - } - }, - { - "model": "permission.permission", - "pk": 190, - "fields": { - "model": [ - "note", - "trust" - ], - "query": "{\"trusting\": [\"user\", \"note\"]}", - "type": "delete", - "mask": 1, - "field": "", - "permanent": true, - "description": "Supprimer une amitié à sa note" - } - }, - { - "model": "permission.permission", - "pk": 191, - "fields": { - "model": [ - "note", - "trust" - ], - "query": "{\"trusting\": [\"user\", \"note\"]}", - "type": "add", - "mask": 1, - "field": "", - "permanent": false, - "description": "Ajouter une amitié à sa note" - } - }, - { - "model": "permission.permission", - "pk": 192, - "fields": { - "model": [ - "note", - "trust" - ], - "query": "{\"trusting__is_active\": true}", - "type": "add", - "mask": 3, - "field": "", - "permanent": false, - "description": "Ajouter une amitié à une note non bloquée" - } - }, - { - "model": "permission.permission", - "pk": 193, - "fields": { - "model": [ - "note", - "trust" - ], - "query": "{\"trusting__is_active\": true}", - "type": "delete", - "mask": 3, - "field": "", - "permanent": false, - "description": "Supprimer une amitié à une note non bloquée" - } - }, - { - "model": "permission.permission", - "pk": 194, - "fields": { - "model": [ - "note", - "trust" - ], - "query": "{}", - "type": "view", - "mask": 3, - "field": "", - "permanent": false, - "description": "Voir toutes les amitiés, y compris celles des non adhérent⋅es" - } - }, - { - "model": "permission.permission", - "pk": 195, - "fields": { - "model": [ - "note", - "trust" - ], - "query": "{\"trusting__noteuser__user\": [\"user\"]}", - "type": "view", - "mask": 1, - "field": "", - "permanent": true, - "description": "Voir ses propres amitiés, pour toujours" - } - }, - { - "model": "permission.permission", - "pk": 196, - "fields": { - "model": [ - "note", - "transaction" - ], - "query": "[\"AND\", {\"source__trusting__trusted\": [\"user\", \"note\"]}, [\"OR\", {\"source__balance__gte\": {\"F\": [\"MUL\", [\"F\", \"amount\"], [\"F\", \"quantity\"]]}}, {\"valid\": false}]]", - "type": "add", - "mask": 1, - "field": "", - "permanent": false, - "description": "Transférer de l'argent depuis une note amie en restant positif" - } - }, - { - "model": "permission.permission", - "pk": 197, - "fields": { - "model": [ - "note", - "specialtransaction" - ], - "query": "{\"source__notespecial__gte\":0}", - "type": "add", - "mask": 2, - "field": "", - "permanent": false, - "description": "Créer un crédit quelconque" + { + "model": "permission.permissionmask", + "pk": 1, + "fields": { + "rank": 0, + "description": "Droits basiques" } }, - { - "model": "permission.permission", - "pk": 198, - "fields": { - "model": [ - "note", - "trust" - ], - "query": "{\"trusted__noteuser__user\": [\"user\"]}", - "type": "view", - "mask": 1, - "field": "", - "permanent": true, - "description": "Voir ceux nous ayant pour ami, pour toujours" - } - }, - { - "model": "permission.permission", - "pk": 199, - "fields": { - "model": [ - "activity", - "activity" - ], - "query": "{\"opener__in\": [\"user\", \"note\", \"activity_responsible\", [\"all\"]], \"open\": true, \"activity_type__manage_entries\":true}", - "type": "view", - "mask": 2, - "field": "", - "permanent": false, - "description": "Voir les activités ouvertes dont l'utilisateur⋅rice est ouvreur⋅se" - } - }, - { - "model": "permission.permission", - "pk": 200, - "fields": { - "model": [ - "activity", - "activity" - ], - "query": "{\"opener__in\": [\"user\", \"note\", \"activity_responsible\", [\"all\"]], \"open\": true, \"activity_type__manage_entries\":true}", - "type": "change", - "mask": 2, - "field": "open", - "permanent": false, - "description": "Fermer les activités ouvertes dont l'utilisateur⋅rice est ouvreur⋅se" - } - }, - { - "model": "permission.permission", - "pk": 201, - "fields": { - "model": [ - "activity", - "entry" - ], - "query": "{\"activity__opener__in\": [\"user\", \"note\", \"activity_responsible\", [\"all\"]], \"activity__open\": true, \"activity__activity_type__manage_entries\":true}", - "type": "add", - "mask": 2, - "field": "", - "permanent": false, - "description": "Faire les entrées des activités ouvertes dont l'utilisateur⋅rice est ouvreur⋅se" - } - }, - { - "model": "permission.permission", - "pk": 202, - "fields": { - "model": [ - "activity", - "entry" - ], - "query": "{\"activity__opener__in\": [\"user\", \"note\", \"activity_responsible\", [\"all\"]]}", - "type": "view", - "mask": 2, - "field": "", - "permanent": false, - "description": "Voir les entrées des activités dont l'utilisateur⋅rice est ouvreur⋅se" - } - }, - { - "model": "permission.permission", - "pk": 203, - "fields": { - "model": [ - "activity", - "guest" - ], - "query": "{\"activity__opener__in\": [\"user\", \"note\", \"activity_responsible\", [\"all\"]]}", - "type": "view", - "mask": 2, - "field": "", - "permanent": false, - "description": "Voir les invité⋅es des activités dont l'utilisateur⋅rice est ouvreur⋅se" - } - }, - { - "model": "permission.permission", - "pk": 204, - "fields": { - "model": [ - "activity", - "guesttransaction" - ], - "query": "[\"NOT\", {\"pk__isnull\": [\"user\", \"note\", \"activity_responsible\", [\"filter\", {\"activity__open\": true, \"activity__activity_type__manage_entries\":true}], [\"exists\"]]}]", - "type": "add", - "mask": 2, - "field": "", - "permanent": false, - "description": "Créer une transaction d'invitation lorsque l'utilisateur⋅rice est ouvreur⋅se d'une activité ouverte" - } - }, - { + { + "model": "permission.permissionmask", + "pk": 2, + "fields": { + "rank": 1, + "description": "Droits note seulement" + } + }, + { + "model": "permission.permissionmask", + "pk": 3, + "fields": { + "rank": 42, + "description": "Tous mes droits" + } + }, + { + "model": "permission.permission", + "pk": 1, + "fields": { + "model": [ + "auth", + "user" + ], + "query": "{\"pk\": [\"user\", \"pk\"]}", + "type": "view", + "mask": 1, + "field": "", + "permanent": true, + "description": "Voir son compte utilisateur⋅rice" + } + }, + { + "model": "permission.permission", + "pk": 2, + "fields": { + "model": [ + "member", + "profile" + ], + "query": "{\"user\": [\"user\"]}", + "type": "view", + "mask": 1, + "field": "", + "permanent": true, + "description": "Voir son profil" + } + }, + { + "model": "permission.permission", + "pk": 3, + "fields": { + "model": [ + "note", + "note" + ], + "query": "{\"pk\": [\"user\", \"note\", \"pk\"]}", + "type": "view", + "mask": 1, + "field": "", + "permanent": true, + "description": "Voir sa propre note d'utilisateur⋅rice" + } + }, + { + "model": "permission.permission", + "pk": 4, + "fields": { + "model": [ + "authtoken", + "token" + ], + "query": "{\"user\": [\"user\"]}", + "type": "view", + "mask": 1, + "field": "", + "permanent": true, + "description": "Voir son jeton d'authentification à l'API" + } + }, + { + "model": "permission.permission", + "pk": 5, + "fields": { + "model": [ + "note", + "transaction" + ], + "query": "[\"OR\", {\"source\": [\"user\", \"note\"]}, {\"destination\": [\"user\", \"note\"]}]", + "type": "view", + "mask": 1, + "field": "", + "permanent": true, + "description": "Voir ses propres transactions" + } + }, + { + "model": "permission.permission", + "pk": 6, + "fields": { + "model": [ + "note", + "alias" + ], + "query": "[\"AND\", [\"OR\", {\"note__noteuser__user__memberships__club__name\": \"BDE\", \"note__noteuser__user__memberships__date_start__lte\": [\"today\"], \"note__noteuser__user__memberships__date_end__gte\": [\"today\"]}, {\"note__noteclub__isnull\": false}], {\"note__is_active\": true}]", + "type": "view", + "mask": 1, + "field": "", + "permanent": false, + "description": "Voir les alias des notes des clubs et des adhérent⋅es du club BDE" + } + }, + { + "model": "permission.permission", + "pk": 7, + "fields": { + "model": [ + "auth", + "user" + ], + "query": "{\"pk\": [\"user\", \"pk\"]}", + "type": "change", + "mask": 1, + "field": "last_login", + "permanent": true, + "description": "Modifier sa propre date de dernière connexion" + } + }, + { + "model": "permission.permission", + "pk": 8, + "fields": { + "model": [ + "auth", + "user" + ], + "query": "{\"pk\": [\"user\", \"pk\"]}", + "type": "change", + "mask": 1, + "field": "username", + "permanent": true, + "description": "Changer son propre pseudo" + } + }, + { + "model": "permission.permission", + "pk": 9, + "fields": { + "model": [ + "auth", + "user" + ], + "query": "{\"pk\": [\"user\", \"pk\"]}", + "type": "change", + "mask": 1, + "field": "first_name", + "permanent": true, + "description": "Changer son propre prénom" + } + }, + { + "model": "permission.permission", + "pk": 10, + "fields": { + "model": [ + "auth", + "user" + ], + "query": "{\"pk\": [\"user\", \"pk\"]}", + "type": "change", + "mask": 1, + "field": "last_name", + "permanent": true, + "description": "Changer son propre nom de famille" + } + }, + { + "model": "permission.permission", + "pk": 11, + "fields": { + "model": [ + "auth", + "user" + ], + "query": "{\"pk\": [\"user\", \"pk\"]}", + "type": "change", + "mask": 1, + "field": "email", + "permanent": true, + "description": "Changer sa propre adresse e-mail" + } + }, + { + "model": "permission.permission", + "pk": 12, + "fields": { + "model": [ + "authtoken", + "token" + ], + "query": "{\"user\": [\"user\"]}", + "type": "delete", + "mask": 1, + "field": "", + "permanent": true, + "description": "Supprimer son jeton d'authentification à l'API" + } + }, + { + "model": "permission.permission", + "pk": 13, + "fields": { + "model": [ + "authtoken", + "token" + ], + "query": "{\"user\": [\"user\"]}", + "type": "add", + "mask": 1, + "field": "", + "permanent": true, + "description": "Créer un jeton d'authentification à l'API" + } + }, + { + "model": "permission.permission", + "pk": 14, + "fields": { + "model": [ + "note", + "alias" + ], + "query": "{\"note\": [\"user\", \"note\"]}", + "type": "delete", + "mask": 1, + "field": "", + "permanent": true, + "description": "Supprimer un alias à sa note" + } + }, + { + "model": "permission.permission", + "pk": 15, + "fields": { + "model": [ + "note", + "alias" + ], + "query": "{\"note\": [\"user\", \"note\"]}", + "type": "add", + "mask": 1, + "field": "", + "permanent": false, + "description": "Ajouter un alias à sa note" + } + }, + { + "model": "permission.permission", + "pk": 16, + "fields": { + "model": [ + "note", + "noteuser" + ], + "query": "{\"pk\": [\"user\", \"note\", \"pk\"]}", + "type": "change", + "mask": 1, + "field": "display_image", + "permanent": false, + "description": "Changer l'image de sa note" + } + }, + { + "model": "permission.permission", + "pk": 17, + "fields": { + "model": [ + "note", + "transaction" + ], + "query": "[\"AND\", {\"source\": [\"user\", \"note\"]}, [\"OR\", {\"source__balance__gte\": {\"F\": [\"MUL\", [\"F\", \"amount\"], [\"F\", \"quantity\"]]}}, {\"valid\": false}]]", + "type": "add", + "mask": 1, + "field": "", + "permanent": false, + "description": "Transférer de l'argent depuis sa propre note en restant positif" + } + }, + { + "model": "permission.permission", + "pk": 19, + "fields": { + "model": [ + "note", + "note" + ], + "query": "[\"OR\", {\"pk\": [\"club\", \"note\", \"pk\"]}, {\"noteuser__user__memberships__club\": [\"club\"], \"noteuser__user__memberships__date_start__lte\": [\"today\"], \"noteuser__user__memberships__date_end__gte\": [\"today\"]}]", + "type": "view", + "mask": 2, + "field": "", + "permanent": false, + "description": "Voir les notes des membres du club" + } + }, + { + "model": "permission.permission", + "pk": 20, + "fields": { + "model": [ + "note", + "transaction" + ], + "query": "[\"AND\", [\"OR\", {\"source\": [\"club\", \"note\"]}, {\"destination\": [\"club\", \"note\"]}], [\"OR\", {\"source__balance__gte\": {\"F\": [\"SUB\", [\"MUL\", [\"F\", \"amount\"], [\"F\", \"quantity\"]], 2000]}}, {\"valid\": false}]]", + "type": "add", + "mask": 2, + "field": "", + "permanent": false, + "description": "Créer une transaction de ou vers la note d'un club" + } + }, + { + "model": "permission.permission", + "pk": 21, + "fields": { + "model": [ + "note", + "recurrenttransaction" + ], + "query": "[\"AND\", {\"destination\": [\"club\", \"note\"]}, [\"OR\", {\"source__balance__gte\": {\"F\": [\"SUB\", [\"MUL\", [\"F\", \"amount\"], [\"F\", \"quantity\"]], 2000]}}, {\"valid\": false}]]", + "type": "add", + "mask": 2, + "field": "", + "permanent": false, + "description": "Créer une transaction en appuyant sur un bouton lié à un club" + } + }, + { + "model": "permission.permission", + "pk": 22, + "fields": { + "model": [ + "member", + "club" + ], + "query": "{\"pk\": [\"club\", \"pk\"]}", + "type": "view", + "mask": 1, + "field": "", + "permanent": false, + "description": "Voir les informations d'un club" + } + }, + { + "model": "permission.permission", + "pk": 23, + "fields": { + "model": [ + "note", + "transaction" + ], + "query": "{}", + "type": "change", + "mask": 2, + "field": "valid", + "permanent": false, + "description": "Mettre à jour le statut de validation d'une transaction" + } + }, + { + "model": "permission.permission", + "pk": 24, + "fields": { + "model": [ + "note", + "transaction" + ], + "query": "{}", + "type": "view", + "mask": 2, + "field": "", + "permanent": false, + "description": "Voir toutes les transactions" + } + }, + { + "model": "permission.permission", + "pk": 25, + "fields": { + "model": [ + "note", + "notespecial" + ], + "query": "{}", + "type": "view", + "mask": 2, + "field": "", + "permanent": false, + "description": "Afficher l'interface crédit/retrait" + } + }, + { + "model": "permission.permission", + "pk": 26, + "fields": { + "model": [ + "note", + "specialtransaction" + ], + "query": "{}", + "type": "add", + "mask": 2, + "field": "", + "permanent": false, + "description": "Créer un crédit ou un retrait quelconque" + } + }, + { + "model": "permission.permission", + "pk": 27, + "fields": { + "model": [ + "note", + "templatecategory" + ], + "query": "{}", + "type": "view", + "mask": 2, + "field": "", + "permanent": false, + "description": "Voir toutes les catégories de boutons" + } + }, + { + "model": "permission.permission", + "pk": 28, + "fields": { + "model": [ + "note", + "templatecategory" + ], + "query": "{}", + "type": "change", + "mask": 3, + "field": "", + "permanent": false, + "description": "Changer une catégorie de boutons" + } + }, + { + "model": "permission.permission", + "pk": 29, + "fields": { + "model": [ + "note", + "templatecategory" + ], + "query": "{}", + "type": "add", + "mask": 3, + "field": "", + "permanent": false, + "description": "Créer une catégorie de boutons" + } + }, + { + "model": "permission.permission", + "pk": 30, + "fields": { + "model": [ + "note", + "transactiontemplate" + ], + "query": "{}", + "type": "view", + "mask": 2, + "field": "", + "permanent": false, + "description": "Voir tous les boutons" + } + }, + { + "model": "permission.permission", + "pk": 31, + "fields": { + "model": [ + "note", + "transactiontemplate" + ], + "query": "{}", + "type": "add", + "mask": 3, + "field": "", + "permanent": false, + "description": "Ajouter un bouton" + } + }, + { + "model": "permission.permission", + "pk": 32, + "fields": { + "model": [ + "note", + "transactiontemplate" + ], + "query": "{}", + "type": "change", + "mask": 3, + "field": "", + "permanent": false, + "description": "Modifier un bouton" + } + }, + { + "model": "permission.permission", + "pk": 33, + "fields": { + "model": [ + "note", + "transaction" + ], + "query": "{}", + "type": "add", + "mask": 2, + "field": "", + "permanent": false, + "description": "Créer n'importe quelle transaction" + } + }, + { + "model": "permission.permission", + "pk": 34, + "fields": { + "model": [ + "activity", + "activity" + ], + "query": "[\"OR\", {\"valid\": true}, {\"creater\": [\"user\"]}]", + "type": "view", + "mask": 1, + "field": "", + "permanent": false, + "description": "Voir toutes les activités valides" + } + }, + { + "model": "permission.permission", + "pk": 36, + "fields": { + "model": [ + "activity", + "activity" + ], + "query": "{\"creater\": [\"user\"], \"valid\": false}", + "type": "add", + "mask": 1, + "field": "", + "permanent": false, + "description": "Proposer des activités" + } + }, + { + "model": "permission.permission", + "pk": 37, + "fields": { + "model": [ + "activity", + "activity" + ], + "query": "{}", + "type": "change", + "mask": 2, + "field": "valid", + "permanent": false, + "description": "Valider des activités" + } + }, + { + "model": "permission.permission", + "pk": 38, + "fields": { + "model": [ + "activity", + "activity" + ], + "query": "{}", + "type": "change", + "mask": 2, + "field": "open", + "permanent": false, + "description": "Ouvrir des activités" + } + }, + { + "model": "permission.permission", + "pk": 39, + "fields": { + "model": [ + "activity", + "guest" + ], + "query": "{\"inviter\": [\"user\", \"note\"], \"activity__activity_type__can_invite\": true}", + "type": "add", + "mask": 1, + "field": "", + "permanent": false, + "description": "Inviter des personnes à des activités" + } + }, + { + "model": "permission.permission", + "pk": 40, + "fields": { + "model": [ + "activity", + "guest" + ], + "query": "{\"inviter\": [\"user\", \"note\"]}", + "type": "view", + "mask": 1, + "field": "", + "permanent": true, + "description": "Voir les personnes qu'on a invitées" + } + }, + { + "model": "permission.permission", + "pk": 41, + "fields": { + "model": [ + "activity", + "activity" + ], + "query": "{}", + "type": "view", + "mask": 2, + "field": "", + "permanent": false, + "description": "Voir toutes les activités" + } + }, + { + "model": "permission.permission", + "pk": 42, + "fields": { + "model": [ + "activity", + "guest" + ], + "query": "{}", + "type": "view", + "mask": 2, + "field": "", + "permanent": false, + "description": "Voir toutes les personnes invitées" + } + }, + { + "model": "permission.permission", + "pk": 43, + "fields": { + "model": [ + "activity", + "entry" + ], + "query": "{\"activity__open\": true}", + "type": "add", + "mask": 2, + "field": "", + "permanent": false, + "description": "Gérer les entrées d'une activité ouverte" + } + }, + { + "model": "permission.permission", + "pk": 44, + "fields": { + "model": [ + "activity", + "guesttransaction" + ], + "query": "{}", + "type": "add", + "mask": 2, + "field": "", + "permanent": false, + "description": "Créer une transaction d'invitation" + } + }, + { + "model": "permission.permission", + "pk": 45, + "fields": { + "model": [ + "activity", + "guesttransaction" + ], + "query": "{}", + "type": "view", + "mask": 2, + "field": "", + "permanent": false, + "description": "Voir toutes les transactions d'invitation" + } + }, + { + "model": "permission.permission", + "pk": 46, + "fields": { + "model": [ + "activity", + "guesttransaction" + ], + "query": "{}", + "type": "change", + "mask": 2, + "field": "valid", + "permanent": false, + "description": "Valider les transactions d'invitation" + } + }, + { + "model": "permission.permission", + "pk": 47, + "fields": { + "model": [ + "member", + "club" + ], + "query": "{\"pk\": [\"club\", \"pk\"]}", + "type": "change", + "mask": 2, + "field": "", + "permanent": false, + "description": "Modifier un club" + } + }, + { + "model": "permission.permission", + "pk": 48, + "fields": { + "model": [ + "member", + "membership" + ], + "query": "{\"user\": [\"user\"]}", + "type": "view", + "mask": 1, + "field": "", + "permanent": true, + "description": "Voir mes adhésions" + } + }, + { + "model": "permission.permission", + "pk": 49, + "fields": { + "model": [ + "member", + "membership" + ], + "query": "{\"club\": [\"club\"]}", + "type": "view", + "mask": 3, + "field": "", + "permanent": false, + "description": "Voir les adhérent⋅es du club" + } + }, + { + "model": "permission.permission", + "pk": 50, + "fields": { + "model": [ + "member", + "membership" + ], + "query": "{\"club\": [\"club\"]}", + "type": "add", + "mask": 2, + "field": "", + "permanent": false, + "description": "Ajouter un⋅e membre à un club" + } + }, + { + "model": "permission.permission", + "pk": 51, + "fields": { + "model": [ + "member", + "membership" + ], + "query": "{}", + "type": "change", + "mask": 3, + "field": "roles", + "permanent": false, + "description": "Modifier les rôles d'une adhésion" + } + }, + { + "model": "permission.permission", + "pk": 52, + "fields": { + "model": [ + "member", + "profile" + ], + "query": "{\"user\": [\"user\"]}", + "type": "change", + "mask": 1, + "field": "", + "permanent": true, + "description": "Modifier son profil" + } + }, + { + "model": "permission.permission", + "pk": 53, + "fields": { + "model": [ + "member", + "profile" + ], + "query": "{}", + "type": "change", + "mask": 3, + "field": "", + "permanent": false, + "description": "Modifier n'importe quel profil" + } + }, + { + "model": "permission.permission", + "pk": 54, + "fields": { + "model": [ + "auth", + "user" + ], + "query": "{}", + "type": "change", + "mask": 3, + "field": "", + "permanent": false, + "description": "Modifier n'importe quel⋅le utilisateur⋅rice" + } + }, + { + "model": "permission.permission", + "pk": 55, + "fields": { + "model": [ + "auth", + "user" + ], + "query": "{}", + "type": "add", + "mask": 3, + "field": "", + "permanent": false, + "description": "Ajouter un⋅e utilisateur⋅rice" + } + }, + { + "model": "permission.permission", + "pk": 56, + "fields": { + "model": [ + "member", + "profile" + ], + "query": "{\"email_confirmed\": false, \"registration_valid\": false}", + "type": "add", + "mask": 3, + "field": "", + "permanent": false, + "description": "Ajouter un profil" + } + }, + { + "model": "permission.permission", + "pk": 57, + "fields": { + "model": [ + "auth", + "user" + ], + "query": "{\"profile__registration_valid\": false}", + "type": "delete", + "mask": 3, + "field": "", + "permanent": false, + "description": "Supprimer une pré-inscription" + } + }, + { + "model": "permission.permission", + "pk": 58, + "fields": { + "model": [ + "member", + "profile" + ], + "query": "{\"registration_valid\": false}", + "type": "delete", + "mask": 3, + "field": "", + "permanent": false, + "description": "Supprimer le profil d'une pré-inscription" + } + }, + { + "model": "permission.permission", + "pk": 59, + "fields": { + "model": [ + "note", + "transactiontemplate" + ], + "query": "{\"destination\": [\"club\", \"note\"]}", + "type": "view", + "mask": 2, + "field": "", + "permanent": false, + "description": "Voir les boutons d'un club" + } + }, + { + "model": "permission.permission", + "pk": 60, + "fields": { + "model": [ + "note", + "transactiontemplate" + ], + "query": "{\"destination\": [\"club\", \"note\"]}", + "type": "add", + "mask": 3, + "field": "", + "permanent": false, + "description": "Créer un bouton d'un club" + } + }, + { + "model": "permission.permission", + "pk": 61, + "fields": { + "model": [ + "note", + "transactiontemplate" + ], + "query": "{\"destination\": [\"club\", \"note\"]}", + "type": "change", + "mask": 3, + "field": "", + "permanent": false, + "description": "Modifier le bouton d'un club" + } + }, + { + "model": "permission.permission", + "pk": 62, + "fields": { + "model": [ + "note", + "transaction" + ], + "query": "[\"OR\", {\"source\": [\"club\", \"note\"]}, {\"destination\": [\"club\", \"note\"]}]", + "type": "view", + "mask": 2, + "field": "", + "permanent": false, + "description": "Voir les transactions d'un club" + } + }, + { + "model": "permission.permission", + "pk": 63, + "fields": { + "model": [ + "treasury", + "invoice" + ], + "query": "{}", + "type": "view", + "mask": 3, + "field": "", + "permanent": false, + "description": "Voir les factures" + } + }, + { + "model": "permission.permission", + "pk": 64, + "fields": { + "model": [ + "treasury", + "invoice" + ], + "query": "{}", + "type": "add", + "mask": 3, + "field": "", + "permanent": false, + "description": "Ajouter une facture" + } + }, + { + "model": "permission.permission", + "pk": 65, + "fields": { + "model": [ + "treasury", + "invoice" + ], + "query": "{}", + "type": "change", + "mask": 3, + "field": "", + "permanent": false, + "description": "Modifier une facture" + } + }, + { + "model": "permission.permission", + "pk": 66, + "fields": { + "model": [ + "treasury", + "product" + ], + "query": "{}", + "type": "view", + "mask": 3, + "field": "", + "permanent": false, + "description": "Voir les produits" + } + }, + { + "model": "permission.permission", + "pk": 67, + "fields": { + "model": [ + "treasury", + "product" + ], + "query": "{}", + "type": "add", + "mask": 3, + "field": "", + "permanent": false, + "description": "Ajouter des produits" + } + }, + { + "model": "permission.permission", + "pk": 68, + "fields": { + "model": [ + "treasury", + "product" + ], + "query": "{}", + "type": "change", + "mask": 3, + "field": "", + "permanent": false, + "description": "Modifier un produit" + } + }, + { + "model": "permission.permission", + "pk": 69, + "fields": { + "model": [ + "treasury", + "product" + ], + "query": "{}", + "type": "delete", + "mask": 3, + "field": "", + "permanent": false, + "description": "Supprimer un produit" + } + }, + { + "model": "permission.permission", + "pk": 70, + "fields": { + "model": [ + "treasury", + "sogecredit" + ], + "query": "{}", + "type": "add", + "mask": 3, + "field": "", + "permanent": false, + "description": "Ajouter un crédit de la Soci\u00e9t\u00e9 g\u00e9n\u00e9rale" + } + }, + { + "model": "permission.permission", + "pk": 71, + "fields": { + "model": [ + "treasury", + "sogecredit" + ], + "query": "{}", + "type": "view", + "mask": 3, + "field": "", + "permanent": false, + "description": "Voir tous les crédits de la Soci\u00e9t\u00e9 g\u00e9n\u00e9rale" + } + }, + { + "model": "permission.permission", + "pk": 72, + "fields": { + "model": [ + "treasury", + "sogecredit" + ], + "query": "{}", + "type": "change", + "mask": 3, + "field": "", + "permanent": false, + "description": "Modifier un crédit de la Soci\u00e9t\u00e9 g\u00e9n\u00e9rale" + } + }, + { + "model": "permission.permission", + "pk": 73, + "fields": { + "model": [ + "treasury", + "sogecredit" + ], + "query": "{}", + "type": "delete", + "mask": 3, + "field": "", + "permanent": false, + "description": "Supprimer un crédit de la Soci\u00e9t\u00e9 g\u00e9n\u00e9rale" + } + }, + { + "model": "permission.permission", + "pk": 74, + "fields": { + "model": [ + "wei", + "weiclub" + ], + "query": "{}", + "type": "add", + "mask": 3, + "field": "", + "permanent": false, + "description": "Créer un WEI" + } + }, + { + "model": "permission.permission", + "pk": 75, + "fields": { + "model": [ + "wei", + "weiclub" + ], + "query": "{}", + "type": "change", + "mask": 3, + "field": "", + "permanent": false, + "description": "Modifier tous les WEI" + } + }, + { + "model": "permission.permission", + "pk": 76, + "fields": { + "model": [ + "wei", + "weiclub" + ], + "query": "{\"pk\": [\"club\", \"pk\"]}", + "type": "change", + "mask": 3, + "field": "", + "permanent": false, + "description": "Modifier ce WEI" + } + }, + { + "model": "permission.permission", + "pk": 77, + "fields": { + "model": [ + "wei", + "weiclub" + ], + "query": "{\"pk\": [\"club\", \"pk\"]}", + "type": "view", + "mask": 1, + "field": "", + "permanent": true, + "description": "Voir mon WEI" + } + }, + { + "model": "permission.permission", + "pk": 78, + "fields": { + "model": [ + "wei", + "weiclub" + ], + "query": "{\"membership_start__lte\": [\"today\"], \"year\": [\"today\", \"year\"]}", + "type": "view", + "mask": 1, + "field": "", + "permanent": true, + "description": "Voir le dernier WEI" + } + }, + { + "model": "permission.permission", + "pk": 79, + "fields": { + "model": [ + "wei", + "weirole" + ], + "query": "{}", + "type": "view", + "mask": 1, + "field": "", + "permanent": false, + "description": "Voir les rôles pour le WEI" + } + }, + { + "model": "permission.permission", + "pk": 83, + "fields": { + "model": [ + "wei", + "weiregistration" + ], + "query": "{\"user\": [\"user\"], \"wei__year\": [\"today\", \"year\"], \"wei__membership_start__lte\": [\"today\"], \"wei__membership_end__gte\": [\"today\"], \"membership\": null}", + "type": "add", + "mask": 1, + "field": "", + "permanent": true, + "description": "M'inscrire au dernier WEI" + } + }, + { + "model": "permission.permission", + "pk": 84, + "fields": { + "model": [ + "wei", + "weiregistration" + ], + "query": "{\"wei\": [\"club\"], \"first_year\": true, \"wei__membership_start__lte\": [\"today\"], \"wei__membership_end__gte\": [\"today\"], \"membership\": null}", + "type": "add", + "mask": 2, + "field": "", + "permanent": false, + "description": "Inscrire un⋅e 1A au WEI" + } + }, + { + "model": "permission.permission", + "pk": 85, + "fields": { + "model": [ + "wei", + "weiregistration" + ], + "query": "{\"wei\": [\"club\"], \"wei__membership_end__gte\": [\"today\"], \"membership\": null}", + "type": "add", + "mask": 2, + "field": "", + "permanent": false, + "description": "Inscrire n'importe qui au WEI" + } + }, + { + "model": "permission.permission", + "pk": 86, + "fields": { + "model": [ + "wei", + "weiregistration" + ], + "query": "{\"wei\": [\"club\"]}", + "type": "delete", + "mask": 3, + "field": "", + "permanent": false, + "description": "Supprimer une inscription WEI" + } + }, + { + "model": "permission.permission", + "pk": 87, + "fields": { + "model": [ + "wei", + "weiregistration" + ], + "query": "[\"AND\", {\"user\": [\"user\"]}, [\"OR\", {\"wei\": [\"club\"]}, {\"wei__year\": [\"today\", \"year\"], \"membership\": null}]]", + "type": "view", + "mask": 1, + "field": "", + "permanent": true, + "description": "Voir ma propre inscription WEI" + } + }, + { + "model": "permission.permission", + "pk": 88, + "fields": { + "model": [ + "wei", + "weiregistration" + ], + "query": "{\"wei\": [\"club\"]}", + "type": "view", + "mask": 2, + "field": "", + "permanent": false, + "description": "Voir toutes les inscriptions WEI" + } + }, + { + "model": "permission.permission", + "pk": 89, + "fields": { + "model": [ + "wei", + "weiregistration" + ], + "query": "{\"wei\": [\"club\"], \"wei__membership_end__gte\": [\"today\"]}", + "type": "change", + "mask": 3, + "field": "soge_credit", + "permanent": false, + "description": "Indiquer si une inscription WEI est payée par la Société générale" + } + }, + { + "model": "permission.permission", + "pk": 90, + "fields": { + "model": [ + "wei", + "weiregistration" + ], + "query": "[\"AND\", {\"user\": [\"user\"], \"wei__membership_start__lte\": [\"today\"], \"wei__membership_end__gte\": [\"today\"]}, [\"OR\", {\"wei\": [\"club\"]}, {\"wei__year\": [\"today\", \"year\"], \"membership\": null}]]", + "type": "change", + "mask": 1, + "field": "soge_credit", + "permanent": true, + "description": "Indiquer si mon inscription WEI est payée par la Société générale tant qu'elle n'est pas validée" + } + }, + { + "model": "permission.permission", + "pk": 91, + "fields": { + "model": [ + "wei", + "weiregistration" + ], + "query": "{\"wei\": [\"club\"], \"wei__membership_end__gte\": [\"today\"]}", + "type": "change", + "mask": 2, + "field": "caution_check", + "permanent": false, + "description": "Dire si un chèque de caution est donné pour une inscription WEI" + } + }, + { + "model": "permission.permission", + "pk": 92, + "fields": { + "model": [ + "wei", + "weiregistration" + ], + "query": "{\"wei\": [\"club\"], \"wei__membership_end__gte\": [\"today\"]}", + "type": "change", + "mask": 3, + "field": "birth_date", + "permanent": false, + "description": "Modifier la date de naissance d'une inscription WEI" + } + }, + { + "model": "permission.permission", + "pk": 93, + "fields": { + "model": [ + "wei", + "weiregistration" + ], + "query": "[\"AND\", {\"user\": [\"user\"], \"wei__membership_start__lte\": [\"today\"], \"wei__membership_end__gte\": [\"today\"]}, [\"OR\", {\"wei\": [\"club\"]}, {\"wei__year\": [\"today\", \"year\"], \"membership\": null}]]", + "type": "change", + "mask": 1, + "field": "birth_date", + "permanent": true, + "description": "Modifier la date de naissance de ma propre inscription WEI" + } + }, + { + "model": "permission.permission", + "pk": 94, + "fields": { + "model": [ + "wei", + "weiregistration" + ], + "query": "{\"wei\": [\"club\"], \"wei__membership_end__gte\": [\"today\"]}", + "type": "change", + "mask": 3, + "field": "gender", + "permanent": false, + "description": "Modifier le genre de toute inscription WEI" + } + }, + { + "model": "permission.permission", + "pk": 95, + "fields": { + "model": [ + "wei", + "weiregistration" + ], + "query": "[\"AND\", {\"user\": [\"user\"], \"wei__membership_start__lte\": [\"today\"], \"wei__membership_end__gte\": [\"today\"]}, [\"OR\", {\"wei\": [\"club\"]}, {\"wei__year\": [\"today\", \"year\"], \"membership\": null}]]", + "type": "change", + "mask": 1, + "field": "gender", + "permanent": true, + "description": "Modifier le genre de ma propre inscription WEI" + } + }, + { + "model": "permission.permission", + "pk": 96, + "fields": { + "model": [ + "wei", + "weiregistration" + ], + "query": "{\"wei\": [\"club\"], \"wei__membership_end__gte\": [\"today\"]}", + "type": "change", + "mask": 3, + "field": "health_issues", + "permanent": false, + "description": "Modifier les problèmes de santé de toutes les inscriptions WEI" + } + }, + { + "model": "permission.permission", + "pk": 97, + "fields": { + "model": [ + "wei", + "weiregistration" + ], + "query": "[\"AND\", {\"user\": [\"user\"], \"wei__membership_start__lte\": [\"today\"], \"wei__membership_end__gte\": [\"today\"]}, [\"OR\", {\"wei\": [\"club\"]}, {\"wei__year\": [\"today\", \"year\"], \"membership\": null}]]", + "type": "change", + "mask": 1, + "field": "health_issues", + "permanent": true, + "description": "Modifier mes problèmes de santé de mon inscription WEI" + } + }, + { + "model": "permission.permission", + "pk": 98, + "fields": { + "model": [ + "wei", + "weiregistration" + ], + "query": "{\"wei\": [\"club\"], \"wei__membership_end__gte\": [\"today\"]}", + "type": "change", + "mask": 3, + "field": "emergency_contact_name", + "permanent": false, + "description": "Modifier le nom du contact en cas d'urgence de toute inscription WEI" + } + }, + { + "model": "permission.permission", + "pk": 99, + "fields": { + "model": [ + "wei", + "weiregistration" + ], + "query": "[\"AND\", {\"user\": [\"user\"], \"wei__membership_start__lte\": [\"today\"], \"wei__membership_end__gte\": [\"today\"]}, [\"OR\", {\"wei\": [\"club\"]}, {\"wei__year\": [\"today\", \"year\"], \"membership\": null}]]", + "type": "change", + "mask": 1, + "field": "emergency_contact_name", + "permanent": true, + "description": "Modifier le nom du contact en cas d'urgence de mon inscription WEI" + } + }, + { + "model": "permission.permission", + "pk": 100, + "fields": { + "model": [ + "wei", + "weiregistration" + ], + "query": "{\"wei\": [\"club\"], \"wei__membership_end__gte\": [\"today\"]}", + "type": "change", + "mask": 3, + "field": "emergency_contact_phone", + "permanent": false, + "description": "Modifier le téléphone du contact en cas d'urgence de toute inscription WEI" + } + }, + { + "model": "permission.permission", + "pk": 101, + "fields": { + "model": [ + "wei", + "weiregistration" + ], + "query": "[\"AND\", {\"user\": [\"user\"], \"wei__membership_start__lte\": [\"today\"], \"wei__membership_end__gte\": [\"today\"]}, [\"OR\", {\"wei\": [\"club\"]}, {\"wei__year\": [\"today\", \"year\"], \"membership\": null}]]", + "type": "change", + "mask": 1, + "field": "emergency_contact_phone", + "permanent": true, + "description": "Modifier le téléphone du contact en cas d'urgence de mon inscription WEI" + } + }, + { + "model": "permission.permission", + "pk": 102, + "fields": { + "model": [ + "wei", + "weiregistration" + ], + "query": "{\"wei\": [\"club\"], \"wei__membership_end__gte\": [\"today\"]}", + "type": "change", + "mask": 3, + "field": "information_json", + "permanent": false, + "description": "Modifier les informations (sondage 1A, ...) d'une inscription WEI" + } + }, + { + "model": "permission.permission", + "pk": 103, + "fields": { + "model": [ + "wei", + "bus" + ], + "query": "{\"wei\": [\"club\"]}", + "type": "add", + "mask": 3, + "field": "", + "permanent": false, + "description": "Ajouter un bus au WEI" + } + }, + { + "model": "permission.permission", + "pk": 104, + "fields": { + "model": [ + "wei", + "bus" + ], + "query": "{\"wei\": [\"club\"], \"wei__membership_end__gte\": [\"today\"]}", + "type": "change", + "mask": 3, + "field": "name", + "permanent": false, + "description": "Modifier le nom d'un bus d'un WEI" + } + }, + { + "model": "permission.permission", + "pk": 105, + "fields": { + "model": [ + "wei", + "bus" + ], + "query": "{\"wei\": [\"club\"], \"wei__membership_end__gte\": [\"today\"]}", + "type": "change", + "mask": 3, + "field": "description", + "permanent": false, + "description": "Modifier la description d'un bus d'un WEI" + } + }, + { + "model": "permission.permission", + "pk": 106, + "fields": { + "model": [ + "wei", + "busteam" + ], + "query": "{\"bus__wei\": [\"club\"], \"bus__wei__membership_end__gte\": [\"today\"]}", + "type": "add", + "mask": 3, + "field": "", + "permanent": false, + "description": "Créer une équipe WEI" + } + }, + { + "model": "permission.permission", + "pk": 107, + "fields": { + "model": [ + "wei", + "busteam" + ], + "query": "{\"bus__wei\": [\"club\"], \"bus__wei__membership_end__gte\": [\"today\"]}", + "type": "change", + "mask": 3, + "field": "", + "permanent": false, + "description": "Modifier une équipe WEI" + } + }, + { + "model": "permission.permission", + "pk": 108, + "fields": { + "model": [ + "wei", + "bus" + ], + "query": "[\"AND\", {\"wei\": [\"club\"]}, [\"OR\", [\"NOT\", [\"membership\", \"weimembership\", \"registration\", \"first_year\"]], {\"wei__date_end__lte\": [\"today\"]}]]", + "type": "view", + "mask": 1, + "field": "", + "permanent": true, + "description": "Voir tous les bus WEI si on est en 2A+ ou que le WEI est terminé" + } + }, + { + "model": "permission.permission", + "pk": 109, + "fields": { + "model": [ + "wei", + "busteam" + ], + "query": "[\"AND\", {\"bus__wei\": [\"club\"]}, [\"OR\", [\"NOT\", [\"membership\", \"weimembership\", \"registration\", \"first_year\"]], {\"bus__wei__date_end__lte\": [\"today\"]}]]", + "type": "view", + "mask": 1, + "field": "", + "permanent": true, + "description": "Voir toutes les équipes WEI si on est en 2A+ ou que le WEI est terminé" + } + }, + { + "model": "permission.permission", + "pk": 110, + "fields": { + "model": [ + "wei", + "weimembership" + ], + "query": "[\"AND\", {\"club\": [\"club\"], \"club__weiclub__membership_end__gte\": [\"today\"]}, [\"OR\", {\"registration__soge_credit\": true}, {\"user__note__balance__gte\": {\"F\": [\"F\", \"fee\"]}}]]", + "type": "add", + "mask": 2, + "field": "", + "permanent": false, + "description": "Créer une adhésion WEI pour le dernier WEI" + } + }, + { + "model": "permission.permission", + "pk": 111, + "fields": { + "model": [ + "wei", + "weimembership" + ], + "query": "{\"club\": [\"club\"], \"club__weiclub__membership_end__gte\": [\"today\"]}", + "type": "change", + "mask": 2, + "field": "bus", + "permanent": false, + "description": "Modifier le bus d'une adhésion WEI" + } + }, + { + "model": "permission.permission", + "pk": 112, + "fields": { + "model": [ + "wei", + "weimembership" + ], + "query": "{\"club\": [\"club\"], \"club__weiclub__membership_end__gte\": [\"today\"]}", + "type": "change", + "mask": 2, + "field": "team", + "permanent": false, + "description": "Modifier l'équipe d'une adhésion WEI" + } + }, + { + "model": "permission.permission", + "pk": 113, + "fields": { + "model": [ + "wei", + "weimembership" + ], + "query": "{\"club\": [\"club\"]}", + "type": "view", + "mask": 2, + "field": "", + "permanent": false, + "description": "Voir toutes les adhésions au WEI" + } + }, + { + "model": "permission.permission", + "pk": 114, + "fields": { + "model": [ + "wei", + "weimembership" + ], + "query": "[\"AND\", {\"user\": [\"user\"], \"club\": [\"club\"]}, [\"OR\", {\"registration__first_year\": false}, {\"club__weiclub__date_end__lte\": [\"today\"]}]]", + "type": "view", + "mask": 1, + "field": "", + "permanent": true, + "description": "Voir mes adhésions WEI passées" + } + }, + { + "model": "permission.permission", + "pk": 115, + "fields": { + "model": [ + "wei", + "weimembership" + ], + "query": "{\"club\": [\"club\"], \"bus\": [\"membership\", \"weimembership\", \"bus\"]}", + "type": "view", + "mask": 2, + "field": "", + "permanent": false, + "description": "Voir les membres du bus" + } + }, + { + "model": "permission.permission", + "pk": 116, + "fields": { + "model": [ + "wei", + "weimembership" + ], + "query": "{\"club\": [\"club\"], \"team\": [\"membership\", \"weimembership\", \"team\"]}", + "type": "view", + "mask": 2, + "field": "", + "permanent": false, + "description": "Voir les membres de l'équipe" + } + }, + { + "model": "permission.permission", + "pk": 117, + "fields": { + "model": [ + "wei", + "bus" + ], + "query": "{\"pk\": [\"membership\", \"weimembership\", \"bus\", \"pk\"], \"wei__date_end__gte\": [\"today\"]}", + "type": "change", + "mask": 3, + "field": "name", + "permanent": false, + "description": "Modifier le nom du bus" + } + }, + { + "model": "permission.permission", + "pk": 118, + "fields": { + "model": [ + "wei", + "bus" + ], + "query": "{\"pk\": [\"membership\", \"weimembership\", \"bus\", \"pk\"], \"wei__date_end__gte\": [\"today\"]}", + "type": "change", + "mask": 3, + "field": "description", + "permanent": false, + "description": "Modifier la description du bus" + } + }, + { + "model": "permission.permission", + "pk": 119, + "fields": { + "model": [ + "wei", + "busteam" + ], + "query": "{\"bus\": [\"membership\", \"weimembership\", \"bus\"], \"bus__wei__date_end__gte\": [\"today\"]}", + "type": "add", + "mask": 3, + "field": "", + "permanent": false, + "description": "Ajouter une équipe à mon bus" + } + }, + { + "model": "permission.permission", + "pk": 120, + "fields": { + "model": [ + "wei", + "busteam" + ], + "query": "{\"bus\": [\"membership\", \"weimembership\", \"bus\"], \"bus__wei__date_end__gte\": [\"today\"]}", + "type": "change", + "mask": 3, + "field": "name", + "permanent": false, + "description": "Modifier le nom d'une équipe de mon bus" + } + }, + { + "model": "permission.permission", + "pk": 121, + "fields": { + "model": [ + "wei", + "busteam" + ], + "query": "{\"bus\": [\"membership\", \"weimembership\", \"bus\"], \"bus__wei__date_end__gte\": [\"today\"]}", + "type": "change", + "mask": 3, + "field": "color", + "permanent": false, + "description": "Modifier la couleur d'une équipe de mon bus" + } + }, + { + "model": "permission.permission", + "pk": 122, + "fields": { + "model": [ + "wei", + "busteam" + ], + "query": "{\"bus\": [\"membership\", \"weimembership\", \"bus\"], \"bus__wei__date_end__gte\": [\"today\"]}", + "type": "change", + "mask": 3, + "field": "description", + "permanent": false, + "description": "Modifier la description d'une équipe de mon bus" + } + }, + { + "model": "permission.permission", + "pk": 123, + "fields": { + "model": [ + "wei", + "busteam" + ], + "query": "{\"pk\": [\"membership\", \"weimembership\", \"team\", \"pk\"], \"bus__wei__date_end__gte\": [\"today\"]}", + "type": "change", + "mask": 3, + "field": "name", + "permanent": false, + "description": "Modifier le nom de mon équipe" + } + }, + { + "model": "permission.permission", + "pk": 124, + "fields": { + "model": [ + "wei", + "busteam" + ], + "query": "{\"pk\": [\"membership\", \"weimembership\", \"team\", \"pk\"], \"bus__wei__date_end__gte\": [\"today\"]}", + "type": "change", + "mask": 3, + "field": "color", + "permanent": false, + "description": "Modifier la couleur de mon équipe" + } + }, + { + "model": "permission.permission", + "pk": 125, + "fields": { + "model": [ + "wei", + "busteam" + ], + "query": "{\"pk\": [\"membership\", \"weimembership\", \"team\", \"pk\"], \"bus__wei__date_end__gte\": [\"today\"]}", + "type": "change", + "mask": 3, + "field": "description", + "permanent": false, + "description": "Modifier la description de mon équipe" + } + }, + { + "model": "permission.permission", + "pk": 126, + "fields": { + "model": [ + "activity", + "activity" + ], + "query": "{\"entries__note__user\": [\"user\"]}", + "type": "view", + "mask": 1, + "field": "", + "permanent": true, + "description": "Voir mes activités passées, même après la fin de l'adhésion BDE" + } + }, + { + "model": "permission.permission", + "pk": 127, + "fields": { + "model": [ + "note", + "transaction" + ], + "query": "[\"AND\", [\"OR\", {\"source\": [\"club\", \"note\"]}, {\"destination\": [\"club\", \"note\"]}], [\"OR\", {\"source__balance__gte\": {\"F\": [\"SUB\", [\"MUL\", [\"F\", \"amount\"], [\"F\", \"quantity\"]], 2000]}, \"valid\": false}, {\"destination__balance__gte\": {\"F\": [\"SUB\", [\"MUL\", [\"F\", \"amount\"], [\"F\", \"quantity\"]], 2000]}, \"valid\": true}]]", + "type": "change", + "mask": 2, + "field": "valid", + "permanent": false, + "description": "Modifier le statut de validation d'une transaction de club si c'est possible" + } + }, + { + "model": "permission.permission", + "pk": 128, + "fields": { + "model": [ + "wei", + "weiregistration" + ], + "query": "{\"wei\": [\"club\"], \"wei__membership_end__gte\": [\"today\"]}", + "type": "change", + "mask": 3, + "field": "clothing_cut", + "permanent": false, + "description": "Modifier la coupe de vêtements d'une inscription WEI" + } + }, + { + "model": "permission.permission", + "pk": 129, + "fields": { + "model": [ + "wei", + "weiregistration" + ], + "query": "[\"AND\", {\"user\": [\"user\"], \"wei__membership_start__lte\": [\"today\"], \"wei__membership_end__gte\": [\"today\"]}, [\"OR\", {\"wei\": [\"club\"]}, {\"wei__year\": [\"today\", \"year\"], \"membership\": null}]]", + "type": "change", + "mask": 1, + "field": "clothing_cut", + "permanent": true, + "description": "Modifier ma coupe de vêtements de mon inscription WEI" + } + }, + { + "model": "permission.permission", + "pk": 130, + "fields": { + "model": [ + "wei", + "weiregistration" + ], + "query": "{\"wei\": [\"club\"], \"wei__membership_end__gte\": [\"today\"]}", + "type": "change", + "mask": 3, + "field": "clothing_size", + "permanent": false, + "description": "Modifier la taille de vêtements d'une inscription WEI" + } + }, + { + "model": "permission.permission", + "pk": 131, + "fields": { + "model": [ + "wei", + "weiregistration" + ], + "query": "[\"AND\", {\"user\": [\"user\"], \"wei__membership_start__lte\": [\"today\"], \"wei__membership_end__gte\": [\"today\"]}, [\"OR\", {\"wei\": [\"club\"]}, {\"wei__year\": [\"today\", \"year\"], \"membership\": null}]]", + "type": "change", + "mask": 1, + "field": "clothing_size", + "permanent": true, + "description": "Modifier la taille de vêtements de mon inscription WEI" + } + }, + { + "model": "permission.permission", + "pk": 132, + "fields": { + "model": [ + "note", + "recurrenttransaction" + ], + "query": "{}", + "type": "add", + "mask": 2, + "field": "", + "permanent": false, + "description": "Créer une transaction depuis un bouton" + } + }, + { + "model": "permission.permission", + "pk": 133, + "fields": { + "model": [ + "note", + "transaction" + ], + "query": "[\"AND\", [\"OR\", {\"source\": [\"club\", \"note\"]}, {\"destination\": [\"club\", \"note\"]}], [\"OR\", {\"source__balance__gte\": {\"F\": [\"SUB\", [\"MUL\", [\"F\", \"amount\"], [\"F\", \"quantity\"]], 2000]}, \"valid\": true}, {\"destination__balance__gte\": {\"F\": [\"SUB\", [\"MUL\", [\"F\", \"amount\"], [\"F\", \"quantity\"]], 2000]}, \"valid\": false}]]", + "type": "change", + "mask": 2, + "field": "invalidity_reason", + "permanent": false, + "description": "Modifier la raison d'invalidité d'une transaction de club" + } + }, + { + "model": "permission.permission", + "pk": 134, + "fields": { + "model": [ + "note", + "transaction" + ], + "query": "{}", + "type": "change", + "mask": 2, + "field": "invalidity_reason", + "permanent": false, + "description": "Modifier la raison d'invalidité d'une transaction" + } + }, + { + "model": "permission.permission", + "pk": 135, + "fields": { + "model": [ + "auth", + "user" + ], + "query": "{}", + "type": "view", + "mask": 3, + "field": "", + "permanent": false, + "description": "Voir n'importe quel⋅le utilisateur⋅rice" + } + }, + { + "model": "permission.permission", + "pk": 136, + "fields": { + "model": [ + "member", + "profile" + ], + "query": "{}", + "type": "view", + "mask": 3, + "field": "", + "permanent": false, + "description": "Voir n'importe quel profil" + } + }, + { + "model": "permission.permission", + "pk": 137, + "fields": { + "model": [ + "member", + "club" + ], + "query": "{}", + "type": "view", + "mask": 3, + "field": "", + "permanent": false, + "description": "Voir n'importe quel club" + } + }, + { + "model": "permission.permission", + "pk": 138, + "fields": { + "model": [ + "member", + "club" + ], + "query": "{}", + "type": "change", + "mask": 3, + "field": "", + "permanent": false, + "description": "Modifier n'importe quel club" + } + }, + { + "model": "permission.permission", + "pk": 139, + "fields": { + "model": [ + "note", + "noteclub" + ], + "query": "{}", + "type": "add", + "mask": 3, + "field": "", + "permanent": false, + "description": "Créer une note de club" + } + }, + { + "model": "permission.permission", + "pk": 140, + "fields": { + "model": [ + "member", + "club" + ], + "query": "{}", + "type": "add", + "mask": 3, + "field": "", + "permanent": false, + "description": "Créer un club" + } + }, + { + "model": "permission.permission", + "pk": 141, + "fields": { + "model": [ + "auth", + "user" + ], + "query": "{\"memberships__club\": [\"club\"], \"memberships__date_start__lte\": [\"today\"], \"memberships__date_end__gte\": [\"today\"]}", + "type": "view", + "mask": 3, + "field": "", + "permanent": false, + "description": "Voir les membres de mon club" + } + }, + { + "model": "permission.permission", + "pk": 142, + "fields": { + "model": [ + "note", + "note" + ], + "query": "{\"noteclub__club\": [\"club\"]}", + "type": "view", + "mask": 2, + "field": "", + "permanent": false, + "description": "Voir la note de mon club" + } + }, + { + "model": "permission.permission", + "pk": 143, + "fields": { + "model": [ + "note", + "noteuser" + ], + "query": "{}", + "type": "add", + "mask": 3, + "field": "", + "permanent": false, + "description": "Créer une note d'utilisateur⋅rice" + } + }, + { + "model": "permission.permission", + "pk": 144, + "fields": { + "model": [ + "wei", + "weiregistration" + ], + "query": "[\"AND\", {\"user\": [\"user\"], \"wei__membership_start__lte\": [\"today\"], \"wei__membership_end__gte\": [\"today\"], \"first_year\": false, \"membership\": null}]", + "type": "change", + "mask": 1, + "field": "information_json", + "permanent": true, + "description": "Modifier mes préférences en terme de bus et d'équipe si mon inscription n'est pas validée et que je suis en 2A+" + } + }, + { + "model": "permission.permission", + "pk": 145, + "fields": { + "model": [ + "note", + "noteclub" + ], + "query": "{}", + "type": "view", + "mask": 2, + "field": "", + "permanent": false, + "description": "Voir toutes les notes de club" + } + }, + { + "model": "permission.permission", + "pk": 146, + "fields": { + "model": [ + "member", + "membership" + ], + "query": "{}", + "type": "view", + "mask": 3, + "field": "", + "permanent": false, + "description": "Voir toustes les adhérent⋅es de tous les clubs" + } + }, + { + "model": "permission.permission", + "pk": 147, + "fields": { + "model": [ + "member", + "membership" + ], + "query": "{}", + "type": "add", + "mask": 3, + "field": "", + "permanent": false, + "description": "Ajouter un⋅e membre à n'importe quel club" + } + }, + { + "model": "permission.permission", + "pk": 148, + "fields": { + "model": [ + "activity", + "activity" + ], + "query": "{\"valid\": false}", + "type": "change", + "mask": 2, + "field": "", + "permanent": false, + "description": "Modifier une activité non validée" + } + }, + { + "model": "permission.permission", + "pk": 149, + "fields": { + "model": [ + "activity", + "activity" + ], + "query": "{\"valid\": false}", + "type": "delete", + "mask": 2, + "field": "", + "permanent": false, + "description": "Supprimer une activité non validée" + } + }, + { + "model": "permission.permission", + "pk": 150, + "fields": { + "model": [ + "note", + "note" + ], + "query": "{}", + "type": "view", + "mask": 2, + "field": "", + "permanent": false, + "description": "Voir toutes les notes" + } + }, + { + "model": "permission.permission", + "pk": 151, + "fields": { + "model": [ + "treasury", + "invoice" + ], + "query": "{}", + "type": "delete", + "mask": 3, + "field": "", + "permanent": false, + "description": "Supprimer une facture" + } + }, + { + "model": "permission.permission", + "pk": 152, + "fields": { + "model": [ + "activity", + "activity" + ], + "query": "[\"AND\", {\"valid\": false}, {\"creater\": [\"user\"]}]", + "type": "change", + "mask": 1, + "field": "name", + "permanent": false, + "description": "Modifier le nom d'une activité non validée dont on est l'auteur⋅rice" + } + }, + { + "model": "permission.permission", + "pk": 153, + "fields": { + "model": [ + "activity", + "activity" + ], + "query": "[\"AND\", {\"valid\": false}, {\"creater\": [\"user\"]}]", + "type": "change", + "mask": 1, + "field": "description", + "permanent": false, + "description": "Modifier la description d'une activité non validée dont on est l'auteur⋅rice" + } + }, + { + "model": "permission.permission", + "pk": 154, + "fields": { + "model": [ + "activity", + "activity" + ], + "query": "[\"AND\", {\"valid\": false}, {\"creater\": [\"user\"]}]", + "type": "change", + "mask": 1, + "field": "location", + "permanent": false, + "description": "Modifier le lieu d'une activité non validée dont on est l'auteur⋅rice" + } + }, + { + "model": "permission.permission", + "pk": 155, + "fields": { + "model": [ + "activity", + "activity" + ], + "query": "[\"AND\", {\"valid\": false}, {\"creater\": [\"user\"]}]", + "type": "change", + "mask": 1, + "field": "activity_type", + "permanent": false, + "description": "Modifier le type d'une activité non validée dont on est l'auteur⋅rice" + } + }, + { + "model": "permission.permission", + "pk": 156, + "fields": { + "model": [ + "activity", + "activity" + ], + "query": "[\"AND\", {\"valid\": false}, {\"creater\": [\"user\"]}]", + "type": "change", + "mask": 1, + "field": "organizer", + "permanent": false, + "description": "Modifier l'organisateur d'une activité non validée dont on est l'auteur⋅rice" + } + }, + { + "model": "permission.permission", + "pk": 157, + "fields": { + "model": [ + "activity", + "activity" + ], + "query": "[\"AND\", {\"valid\": false}, {\"creater\": [\"user\"]}]", + "type": "change", + "mask": 1, + "field": "attendees_club", + "permanent": false, + "description": "Modifier le club attendu d'une activité non validée dont on est l'auteur⋅rice" + } + }, + { + "model": "permission.permission", + "pk": 158, + "fields": { + "model": [ + "activity", + "activity" + ], + "query": "[\"AND\", {\"valid\": false}, {\"creater\": [\"user\"]}]", + "type": "change", + "mask": 1, + "field": "date_start", + "permanent": false, + "description": "Modifier la date de début d'une activité non validée dont on est l'auteur⋅rice" + } + }, + { + "model": "permission.permission", + "pk": 159, + "fields": { + "model": [ + "activity", + "activity" + ], + "query": "[\"AND\", {\"valid\": false}, {\"creater\": [\"user\"]}]", + "type": "change", + "mask": 1, + "field": "date_end", + "permanent": false, + "description": "Modifier la date de fin d'une activité non validée dont on est l'auteur⋅rice" + } + }, + { + "model": "permission.permission", + "pk": 160, + "fields": { + "model": [ + "activity", + "guest" + ], + "query": "{\"inviter\": [\"user\", \"note\"], \"entry\": null}", + "type": "delete", + "mask": 1, + "field": "", + "permanent": false, + "description": "Supprimer ses propres invitations non validées à une activité" + } + }, + { + "model": "permission.permission", + "pk": 161, + "fields": { + "model": [ + "note", + "noteuser" + ], + "query": "[\"AND\", {\"user\": [\"user\"]}, [\"OR\", {\"inactivity_reason\": \"manual\"}, {\"is_active\": true}]]", + "type": "change", + "mask": 1, + "field": "is_active", + "permanent": true, + "description": "(Dé)bloquer sa propre note manuellement" + } + }, + { + "model": "permission.permission", + "pk": 162, + "fields": { + "model": [ + "note", + "noteuser" + ], + "query": "[\"AND\", {\"user\": [\"user\"]}, [\"OR\", {\"inactivity_reason\": \"manual\"}, {\"is_active\": true}]]", + "type": "change", + "mask": 1, + "field": "inactivity_reason", + "permanent": true, + "description": "(Dé)bloquer sa propre note et indiquer que cela a été fait manuellement" + } + }, + { + "model": "permission.permission", + "pk": 163, + "fields": { + "model": [ + "note", + "note" + ], + "query": "{}", + "type": "change", + "mask": 3, + "field": "is_active", + "permanent": false, + "description": "(Dé)bloquer n'importe quelle note, y compris en mode forcé" + } + }, + { + "model": "permission.permission", + "pk": 164, + "fields": { + "model": [ + "note", + "note" + ], + "query": "{}", + "type": "change", + "mask": 3, + "field": "inactivity_reason", + "permanent": false, + "description": "(Dé)bloquer n'importe quelle note et indiquer la raison" + } + }, + { + "model": "permission.permission", + "pk": 165, + "fields": { + "model": [ + "auth", + "user" + ], + "query": "{}", + "type": "change", + "mask": 1, + "field": "password", + "permanent": true, + "description": "Changer son mot de passe" + } + }, + { + "model": "permission.permission", + "pk": 166, + "fields": { + "model": [ + "note", + "transaction" + ], + "query": "[\"OR\", {\"source__balance__gte\": 0}, [\"AND\", [\"NOT\", {\"recurrenttransaction__template__category__name\": \"Alcool\"}], {\"source__balance__gte\": {\"F\": [\"SUB\", [\"MUL\", [\"F\", \"amount\"], [\"F\", \"quantity\"]], 2000]}}], {\"valid\": false}]", + "type": "add", + "mask": 2, + "field": "", + "permanent": false, + "description": "Créer une transaction quelconque tant que la source reste positive s'il s'agit d'alcool, sinon au-dessus de -20€" + } + }, + { + "model": "permission.permission", + "pk": 167, + "fields": { + "model": [ + "note", + "transaction" + ], + "query": "[\"OR\", {\"source__balance__gte\": {\"F\": [\"SUB\", [\"MUL\", [\"F\", \"amount\"], [\"F\", \"quantity\"]], 2000]}, \"valid\": false}, {\"destination__balance__gte\": {\"F\": [\"SUB\", [\"MUL\", [\"F\", \"amount\"], [\"F\", \"quantity\"]], 2000]}, \"valid\": true}]", + "type": "change", + "mask": 2, + "field": "valid", + "permanent": false, + "description": "Modifier le statut de validation d'une transaction si tout le monde reste au dessus de -20 €" + } + }, + { + "model": "permission.permission", + "pk": 168, + "fields": { + "model": [ + "note", + "transaction" + ], + "query": "[\"OR\", {\"source__balance__gte\": {\"F\": [\"SUB\", [\"MUL\", [\"F\", \"amount\"], [\"F\", \"quantity\"]], 2000]}, \"valid\": false}, {\"destination__balance__gte\": {\"F\": [\"SUB\", [\"MUL\", [\"F\", \"amount\"], [\"F\", \"quantity\"]], 2000]}, \"valid\": true}]", + "type": "change", + "mask": 2, + "field": "invalidity_reason", + "permanent": false, + "description": "Modifier la raison d'invalidité d'une transaction si tout le monde reste au dessus de -20 €" + } + }, + { + "model": "permission.permission", + "pk": 169, + "fields": { + "model": [ + "note", + "noteclub" + ], + "query": "{\"club\": [\"club\"]}", + "type": "change", + "mask": 2, + "field": "display_image", + "permanent": false, + "description": "Changer l'image de la note de son club" + } + }, + { + "model": "permission.permission", + "pk": 170, + "fields": { + "model": [ + "note", + "alias" + ], + "query": "{\"note__is_active\": true}", + "type": "add", + "mask": 3, + "field": "", + "permanent": false, + "description": "Ajouter n'importe quel alias à une note non bloquée" + } + }, + { + "model": "permission.permission", + "pk": 171, + "fields": { + "model": [ + "note", + "alias" + ], + "query": "{\"note__is_active\": true}", + "type": "delete", + "mask": 3, + "field": "", + "permanent": false, + "description": "Supprimer n'importe quel alias à une note non bloquée" + } + }, + { + "model": "permission.permission", + "pk": 172, + "fields": { + "model": [ + "treasury", + "remittance" + ], + "query": "{}", + "type": "view", + "mask": 3, + "field": "", + "permanent": false, + "description": "Voir toutes les remises" + } + }, + { + "model": "permission.permission", + "pk": 173, + "fields": { + "model": [ + "treasury", + "remittance" + ], + "query": "{}", + "type": "add", + "mask": 3, + "field": "", + "permanent": false, + "description": "Ajouter une remise" + } + }, + { + "model": "permission.permission", + "pk": 174, + "fields": { + "model": [ + "treasury", + "remittance" + ], + "query": "{}", + "type": "change", + "mask": 3, + "field": "", + "permanent": false, + "description": "Modifier une remise" + } + }, + { + "model": "permission.permission", + "pk": 175, + "fields": { + "model": [ + "treasury", + "remittance" + ], + "query": "{}", + "type": "delete", + "mask": 3, + "field": "", + "permanent": false, + "description": "Supprimer une remise" + } + }, + { + "model": "permission.permission", + "pk": 176, + "fields": { + "model": [ + "auth", + "user" + ], + "query": "{\"profile__registration_valid\": false}", + "type": "change", + "mask": 3, + "field": "", + "permanent": false, + "description": "Modifier n'importe quel⋅le utilisateur⋅rice non encore inscrit⋅e" + } + }, + { + "model": "permission.permission", + "pk": 177, + "fields": { + "model": [ + "member", + "profile" + ], + "query": "{\"registration_valid\": false}", + "type": "change", + "mask": 3, + "field": "", + "permanent": false, + "description": "Modifier n'importe quel profil non encore inscrit" + } + }, + { + "model": "permission.permission", + "pk": 178, + "fields": { + "model": [ + "note", + "alias" + ], + "query": "{}", + "type": "view", + "mask": 3, + "field": "", + "permanent": false, + "description": "Voir tous les alias, y compris ceux des non adhérent⋅es" + } + }, + { + "model": "permission.permission", + "pk": 179, + "fields": { + "model": [ + "note", + "alias" + ], + "query": "{\"note__noteuser__user\": [\"user\"]}", + "type": "view", + "mask": 1, + "field": "", + "permanent": true, + "description": "Voir ses propres alias, pour toujours" + } + }, + { + "model": "permission.permission", + "pk": 180, + "fields": { + "model": [ + "auth", + "user" + ], + "query": "{\"profile__registration_valid\": false}", + "type": "view", + "mask": 2, + "field": "", + "permanent": false, + "description": "Voir n'importe quel⋅le utilisateur⋅rice non encore inscrit⋅e" + } + }, + { + "model": "permission.permission", + "pk": 181, + "fields": { + "model": [ + "member", + "profile" + ], + "query": "{\"registration_valid\": false}", + "type": "view", + "mask": 2, + "field": "", + "permanent": false, + "description": "Voir n'importe quel profil non encore inscrit" + } + }, + { + "model": "permission.permission", + "pk": 182, + "fields": { + "model": [ + "auth", + "user" + ], + "query": "{\"memberships__club__name\": \"BDE\", \"memberships__roles__name\": \"Adhérent⋅e BDE\", \"memberships__date_start__lte\": [\"today\"], \"memberships__date_end__gte\": [\"today\"]}", + "type": "view", + "mask": 2, + "field": "", + "permanent": false, + "description": "Voir n'importe quel⋅le utilisateur⋅rice qui est adhérent⋅e BDE" + } + }, + { + "model": "permission.permission", + "pk": 183, + "fields": { + "model": [ + "note", + "note" + ], + "query": "{}", + "type": "change", + "mask": 3, + "field": "display_image", + "permanent": false, + "description": "Changer l'image de n'importe quelle note" + } + }, + { + "model": "permission.permission", + "pk": 184, + "fields": { + "model": [ + "note", + "noteclub" + ], + "query": "[\"AND\", {\"club\": [\"club\"]}, [\"OR\", {\"inactivity_reason\": \"manual\"}, {\"is_active\": true}]]", + "type": "change", + "mask": 3, + "field": "is_active", + "permanent": false, + "description": "(Dé)bloquer la note de son club manuellement" + } + }, + { + "model": "permission.permission", + "pk": 185, + "fields": { + "model": [ + "note", + "noteclub" + ], + "query": "[\"AND\", {\"club\": [\"club\"]}, [\"OR\", {\"inactivity_reason\": \"manual\"}, {\"is_active\": true}]]", + "type": "change", + "mask": 3, + "field": "inactivity_reason", + "permanent": false, + "description": "(Dé)bloquer la note de son club et indiquer que cela a été fait manuellement" + } + }, + { + "model": "permission.permission", + "pk": 186, + "fields": { + "model": [ + "oauth2_provider", + "application" + ], + "query": "{\"user\": [\"user\"]}", + "type": "view", + "mask": 1, + "field": "", + "permanent": true, + "description": "Voir ses applications OAuth2" + } + }, + { + "model": "permission.permission", + "pk": 187, + "fields": { + "model": [ + "oauth2_provider", + "application" + ], + "query": "{\"user\": [\"user\"]}", + "type": "add", + "mask": 1, + "field": "", + "permanent": true, + "description": "Créer une application OAuth2" + } + }, + { + "model": "permission.permission", + "pk": 188, + "fields": { + "model": [ + "oauth2_provider", + "application" + ], + "query": "{\"user\": [\"user\"]}", + "type": "change", + "mask": 1, + "field": "", + "permanent": true, + "description": "Modifier une application OAuth2" + } + }, + { + "model": "permission.permission", + "pk": 189, + "fields": { + "model": [ + "oauth2_provider", + "application" + ], + "query": "{\"user\": [\"user\"]}", + "type": "delete", + "mask": 1, + "field": "", + "permanent": true, + "description": "Supprimer une application OAuth2" + } + }, + { + "model": "permission.permission", + "pk": 190, + "fields": { + "model": [ + "note", + "trust" + ], + "query": "{\"trusting\": [\"user\", \"note\"]}", + "type": "delete", + "mask": 1, + "field": "", + "permanent": true, + "description": "Supprimer une amitié à sa note" + } + }, + { + "model": "permission.permission", + "pk": 191, + "fields": { + "model": [ + "note", + "trust" + ], + "query": "{\"trusting\": [\"user\", \"note\"]}", + "type": "add", + "mask": 1, + "field": "", + "permanent": false, + "description": "Ajouter une amitié à sa note" + } + }, + { + "model": "permission.permission", + "pk": 192, + "fields": { + "model": [ + "note", + "trust" + ], + "query": "{\"trusting__is_active\": true}", + "type": "add", + "mask": 3, + "field": "", + "permanent": false, + "description": "Ajouter une amitié à une note non bloquée" + } + }, + { + "model": "permission.permission", + "pk": 193, + "fields": { + "model": [ + "note", + "trust" + ], + "query": "{\"trusting__is_active\": true}", + "type": "delete", + "mask": 3, + "field": "", + "permanent": false, + "description": "Supprimer une amitié à une note non bloquée" + } + }, + { + "model": "permission.permission", + "pk": 194, + "fields": { + "model": [ + "note", + "trust" + ], + "query": "{}", + "type": "view", + "mask": 3, + "field": "", + "permanent": false, + "description": "Voir toutes les amitiés, y compris celles des non adhérent⋅es" + } + }, + { + "model": "permission.permission", + "pk": 195, + "fields": { + "model": [ + "note", + "trust" + ], + "query": "{\"trusting__noteuser__user\": [\"user\"]}", + "type": "view", + "mask": 1, + "field": "", + "permanent": true, + "description": "Voir ses propres amitiés, pour toujours" + } + }, + { + "model": "permission.permission", + "pk": 196, + "fields": { + "model": [ + "note", + "transaction" + ], + "query": "[\"AND\", {\"source__trusting__trusted\": [\"user\", \"note\"]}, [\"OR\", {\"source__balance__gte\": {\"F\": [\"MUL\", [\"F\", \"amount\"], [\"F\", \"quantity\"]]}}, {\"valid\": false}]]", + "type": "add", + "mask": 1, + "field": "", + "permanent": false, + "description": "Transférer de l'argent depuis une note amie en restant positif" + } + }, + { + "model": "permission.permission", + "pk": 197, + "fields": { + "model": [ + "note", + "specialtransaction" + ], + "query": "{\"source__notespecial__gte\":0}", + "type": "add", + "mask": 2, + "field": "", + "permanent": false, + "description": "Créer un crédit quelconque" + } + }, + { + "model": "permission.permission", + "pk": 198, + "fields": { + "model": [ + "note", + "trust" + ], + "query": "{\"trusted__noteuser__user\": [\"user\"]}", + "type": "view", + "mask": 1, + "field": "", + "permanent": true, + "description": "Voir ceux nous ayant pour ami, pour toujours" + } + }, + { + "model": "permission.permission", + "pk": 199, + "fields": { + "model": [ + "activity", + "activity" + ], + "query": "{\"opener__in\": [\"user\", \"note\", \"activity_responsible\", [\"all\"]], \"open\": true, \"activity_type__manage_entries\":true}", + "type": "view", + "mask": 2, + "field": "", + "permanent": false, + "description": "Voir les activités ouvertes dont l'utilisateur⋅rice est ouvreur⋅se" + } + }, + { + "model": "permission.permission", + "pk": 200, + "fields": { + "model": [ + "activity", + "activity" + ], + "query": "{\"opener__in\": [\"user\", \"note\", \"activity_responsible\", [\"all\"]], \"open\": true, \"activity_type__manage_entries\":true}", + "type": "change", + "mask": 2, + "field": "open", + "permanent": false, + "description": "Fermer les activités ouvertes dont l'utilisateur⋅rice est ouvreur⋅se" + } + }, + { + "model": "permission.permission", + "pk": 201, + "fields": { + "model": [ + "activity", + "entry" + ], + "query": "{\"activity__opener__in\": [\"user\", \"note\", \"activity_responsible\", [\"all\"]], \"activity__open\": true, \"activity__activity_type__manage_entries\":true}", + "type": "add", + "mask": 2, + "field": "", + "permanent": false, + "description": "Faire les entrées des activités ouvertes dont l'utilisateur⋅rice est ouvreur⋅se" + } + }, + { + "model": "permission.permission", + "pk": 202, + "fields": { + "model": [ + "activity", + "entry" + ], + "query": "{\"activity__opener__in\": [\"user\", \"note\", \"activity_responsible\", [\"all\"]]}", + "type": "view", + "mask": 2, + "field": "", + "permanent": false, + "description": "Voir les entrées des activités dont l'utilisateur⋅rice est ouvreur⋅se" + } + }, + { + "model": "permission.permission", + "pk": 203, + "fields": { + "model": [ + "activity", + "guest" + ], + "query": "{\"activity__opener__in\": [\"user\", \"note\", \"activity_responsible\", [\"all\"]]}", + "type": "view", + "mask": 2, + "field": "", + "permanent": false, + "description": "Voir les invité⋅es des activités dont l'utilisateur⋅rice est ouvreur⋅se" + } + }, + { + "model": "permission.permission", + "pk": 204, + "fields": { + "model": [ + "activity", + "guesttransaction" + ], + "query": "[\"NOT\", {\"pk__isnull\": [\"user\", \"note\", \"activity_responsible\", [\"filter\", {\"activity__open\": true, \"activity__activity_type__manage_entries\":true}], [\"exists\"]]}]", + "type": "add", + "mask": 2, + "field": "", + "permanent": false, + "description": "Créer une transaction d'invitation lorsque l'utilisateur⋅rice est ouvreur⋅se d'une activité ouverte" + } + }, + { - "model": "permission.permission", - "pk": 205, - "fields": { - "model": [ - "note", - "specialtransaction" - ], - "query": "[\"NOT\", {\"pk__isnull\": [\"user\", \"note\", \"activity_responsible\", [\"filter\", {\"activity__open\": true, \"activity__activity_type__manage_entries\":true}], [\"exists\"]]}]", - "type": "add", - "mask": 2, - "field": "", - "permanent": false, - "description": "Créer un crédit ou un retrait quelconque lorsque l'utilisateur⋅rice est ouvreur⋅se d'une activité ouverte" - } - }, - { - "model": "permission.permission", - "pk": 206, - "fields": { - "model": [ - "note", - "notespecial" - ], - "query": "[\"NOT\", {\"pk__isnull\": [\"user\", \"note\", \"activity_responsible\", [\"filter\", {\"activity__open\": true, \"activity__activity_type__manage_entries\":true}], [\"exists\"]]}]", - "type": "view", - "mask": 2, - "field": "", - "permanent": false, - "description": "Afficher l'interface crédit/retrait lorsque l'utilisateur⋅rice est ouvreur⋅se d'une activité ouverte" - } - }, - { - "model": "permission.permission", - "pk": 207, - "fields": { - "model": [ - "activity", - "opener" - ], - "query": "{}", - "type": "view", - "mask": 2, - "field": "", - "permanent": false, - "description": "Voir les ouvreur⋅ses des activités" - } - }, - { - "model": "permission.permission", - "pk": 208, - "fields": { - "model": [ - "activity", - "opener" - ], - "query": "{}", - "type": "add", - "mask": 2, - "field": "", - "permanent": false, - "description": "Ajouter des ouvreur⋅ses aux activités" - } - }, - { - "model": "permission.permission", - "pk": 209, - "fields": { - "model": [ - "activity", - "opener" - ], - "query": "{}", - "type": "delete", - "mask": 2, - "field": "", - "permanent": false, - "description": "Supprimer des ouvreur⋅ses aux activités" - } - }, - { - "model": "permission.permission", - "pk": 210, - "fields": { - "model": [ - "activity", - "activity" - ], - "query": "{}", - "type": "change", - "mask": 2, - "field": "opener", - "permanent": false, - "description": "Voir le tableau des ouvreur⋅ses" - } - }, - { - "model": "permission.permission", - "pk": 211, - "fields": { - "model": [ - "food", - "transformedfood" - ], - "query": "{}", - "type": "view", - "mask": 3, - "field": "", - "permanent": false, - "description": "Voir tout les plats" - } - }, - { - "model": "permission.permission", - "pk": 212, - "fields": { - "model": [ - "food", - "transformedfood" - ], - "query": "{\"owner\": [\"club\"]}", - "type": "view", - "mask": 3, - "field": "", - "permanent": false, - "description": "Voir tout les plats de son club" - } - }, - { - "model": "permission.permission", - "pk": 213, - "fields": { - "model": [ - "food", - "transformedfood" - ], - "query": "{\"is_ready\": true, \"is_active\": true, \"was_eaten\": false}", - "type": "view", - "mask": 1, - "field": "", - "permanent": false, - "description": "Voir les plats préparés actifs servis" - } - }, - { - "model": "permission.permission", - "pk": 214, - "fields": { - "model": [ - "food", - "qrcode" - ], - "query": "{}", - "type": "add", - "mask": 3, - "field": "", - "permanent": false, - "description": "Initialiser un QR code de traçabilité" - } - }, - { - "model": "permission.permission", - "pk": 215, - "fields": { - "model": [ - "food", - "basicfood" - ], - "query": "{\"owner\": [\"club\"]}", - "type": "add", - "mask": 3, - "field": "", - "permanent": false, - "description": "Créer un nouvel ingrédient pour son club" - } - }, - { - "model": "permission.permission", - "pk": 216, - "fields": { - "model": [ - "food", - "basicfood" - ], - "query": "{}", - "type": "add", - "mask": 3, - "field": "", - "permanent": false, - "description": "Créer un nouvel ingrédient" - } - }, - { - "model": "permission.permission", - "pk": 217, - "fields": { - "model": [ - "food", - "basicfood" - ], - "query": "{}", - "type": "view", - "mask": 3, - "field": "", - "permanent": false, - "description": "Voir toute la bouffe" - } - }, - { - "model": "permission.permission", - "pk": 218, - "fields": { - "model": [ - "food", - "basicfood" - ], - "query": "{\"is_active\": true}", - "type": "view", - "mask": 3, - "field": "", - "permanent": false, - "description": "Voir toute la bouffe active" - } - }, - { - "model": "permission.permission", - "pk": 219, - "fields": { - "model": [ - "food", - "basicfood" - ], - "query": "{\"is_active\": true, \"owner\": [\"club\"]}", - "type": "view", - "mask": 3, - "field": "", - "permanent": false, - "description": "Voir la bouffe active de son club" - } - }, - { - "model": "permission.permission", - "pk": 220, - "fields": { - "model": [ - "food", - "basicfood" - ], - "query": "{}", - "type": "change", - "mask": 3, - "field": "", - "permanent": false, - "description": "Modifier de la bouffe" - } - }, - { - "model": "permission.permission", - "pk": 221, - "fields": { - "model": [ - "food", - "basicfood" - ], - "query": "{\"is_active\": true, \"was_eaten\": false}", - "type": "change", - "mask": 3, - "field": "allergens", - "permanent": false, - "description": "Modifier les allergènes de la bouffe existante" - } - }, - { - "model": "permission.permission", - "pk": 222, - "fields": { - "model": [ - "food", - "basicfood" - ], - "query": "{\"is_active\": true, \"was_eaten\": false, \"owner\": [\"club\"]}", - "type": "change", - "mask": 3, - "field": "allergens", - "permanent": false, - "description": "Modifier les allergènes de la bouffe appartenant à son club" - } - }, - { - "model": "permission.permission", - "pk": 223, - "fields": { - "model": [ - "food", - "transformedfood" - ], - "query": "{}", - "type": "add", - "mask": 3, - "field": "", - "permanent": false, - "description": "Créer un plat" - } - }, - { - "model": "permission.permission", - "pk": 224, - "fields": { - "model": [ - "food", - "transformedfood" - ], - "query": "{\"owner\": [\"club\"]}", - "type": "add", - "mask": 3, - "field": "", - "permanent": false, - "description": "Créer un plat pour son club" - } - }, - { - "model": "permission.permission", - "pk": 225, - "fields": { - "model": [ - "food", - "transformedfood" - ], - "query": "{}", - "type": "change", - "mask": 3, - "field": "", - "permanent": false, - "description": "Modifier tout les plats" - } - }, - { - "model": "permission.permission", - "pk": 226, - "fields": { - "model": [ - "food", - "transformedfood" - ], - "query": "{\"is_active\": true}", - "type": "change", - "mask": 3, - "field": "was_eaten", - "permanent": false, - "description": "Indiquer si un plat a été mangé" - } - }, - { - "model": "permission.permission", - "pk": 227, - "fields": { - "model": [ - "food", - "transformedfood" - ], - "query": "{\"is_active\": true, \"owner\": [\"club\"]}", - "type": "change", - "mask": 3, - "field": "is_ready", - "permanent": false, - "description": "Indiquer si un plat de son club est prêt" - } - }, - { - "model": "permission.permission", - "pk": 228, - "fields": { - "model": [ - "food", - "transformedfood" - ], - "query": "{\"is_active\": true}", - "type": "change", - "mask": 3, - "field": "is_active", - "permanent": false, - "description": "Archiver un plat" - } - }, - { - "model": "permission.permission", - "pk": 229, - "fields": { - "model": [ - "food", - "basicfood" - ], - "query": "{\"is_active\": true}", - "type": "change", - "mask": 3, - "field": "is_active", - "permanent": false, - "description": "Archiver de la bouffe" - } - }, - { - "model": "permission.permission", - "pk": 230, - "fields": { - "model": [ - "food", - "transformedfood" - ], - "query": "{\"is_active\": true}", - "type": "view", - "mask": 3, - "field": "", - "permanent": false, - "description": "Voir tout les plats actifs" - } - }, - { - "model": "permission.permission", - "pk": 231, - "fields": { - "model": [ - "food", - "qrcode" - ], - "query": "{}", - "type": "view", - "mask": 3, - "field": "", - "permanent": false, - "description": "Voir tous les QR codes" - } - }, - { - "model": "permission.permission", - "pk": 232, - "fields": { - "model": [ - "food", - "qrcode" - ], - "query": "{\"food_container__is_active\": true}", - "type": "view", - "mask": 3, - "field": "", - "permanent": false, - "description": "Voir tous les QR codes actifs" - } - }, - { - "model": "permission.permission", - "pk": 233, - "fields": { - "model": [ - "food", - "qrcode" - ], - "query": "{\"food_container__owner\": [\"club\"], \"food_container__is_active\": true}", - "type": "view", - "mask": 3, - "field": "", - "permanent": false, - "description": "Voir tous les QR codes actifs de son club" - } - }, - { - "model": "permission.permission", - "pk" : 234, - "fields": { - "model": [ - "food", - "transformedfood" - ], - "query": "{\"owner\": [\"club\"], \"is_active\": true}", - "type": "change", - "mask": 3, - "field": "ingredients", - "permanent": false, - "description": "Changer les ingrédients d'un plat actif de son club" - } - }, - { - "model": "permission.permission", - "pk": 235, - "fields": { - "model": [ - "food", - "food" - ], - "query": "{}", - "type": "view", - "mask": 3, - "field": "", - "permanent": false, - "description": "Voir bouffe" - } - }, - { - "model": "permission.permission", - "pk": 236, - "fields": { - "model": [ - "food", - "food" - ], - "query": "{\"is_active\": true}", - "type": "view", - "mask": 3, - "field": "", - "permanent": false, - "description": "Voir bouffe active" - } - }, - { - "model": "permission.permission", - "pk": 237, - "fields": { - "model": [ - "food", - "food" - ], - "query": "{\"is_active\": true, \"owner\": [\"club\"]}", - "type": "view", - "mask": 3, - "field": "", - "permanent": false, - "description": "Voir bouffe active de son club" - } - }, - { - "model": "permission.permission", - "pk": 238, - "fields": { - "model": [ - "food", - "food" - ], - "query": "{}", - "type": "change", - "mask": 3, - "field": "", - "permanent": false, - "description": "Modifier bouffe" - } - }, - { - "model": "permission.permission", - "pk": 239, - "fields": { - "model": [ - "note", - "alias" - ], - "query": "[\"AND\", [\"OR\", {\"note__noteuser__user__memberships__club\": [\"club\"], \"note__noteuser__user__memberships__date_start__lte\": [\"today\"], \"note__noteuser__user__memberships__date_end__gte\": [\"today\"]}, {\"note__noteclub__isnull\": false}], {\"note__is_active\": true}]", - "type": "view", - "mask": 1, - "field": "", - "permanent": false, - "description": "Voir les alias des notes des clubs et des adhérent⋅es du club" - } - }, - { - "model": "permission.role", - "pk": 1, - "fields": { - "for_club": 1, - "name": "Adh\u00e9rent\u22c5e BDE", - "permissions": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 22, - 34, - 48, - 52, - 126, - 161, - 162, - 165, - 179, - 186, - 187, - 188, - 189, - 190, - 191, - 195, - 196, - 198, - 199, - 200, - 201, - 202, - 203, - 204, - 205, - 206 - ] - } - }, - { - "model": "permission.role", - "pk": 2, - "fields": { - "for_club": 2, - "name": "Adh\u00e9rent\u22c5e Kfet", - "permissions": [ - 22, - 36, - 39, - 40, - 78, - 79, - 83, - 87, - 90, - 93, - 95, - 97, - 99, - 101, - 108, - 109, - 129, - 131, - 144, - 152, - 153, - 154, - 155, - 156, - 157, - 158, - 159, - 160, - 213 - ] - } - }, - { - "model": "permission.role", - "pk": 3, - "fields": { - "for_club": null, - "name": "Membre de club", - "permissions": [ - 1, - 2, - 3, - 4, - 5, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 22 - ] - } - }, - { - "model": "permission.role", - "pk": 4, - "fields": { - "for_club": null, - "name": "Bureau de club", - "permissions": [ - 47, - 49, - 50, - 141, - 169, - 212, - 214, - 215, - 219, - 222, - 224, - 227, - 233, - 234, - 237 - ] - } - }, - { - "model": "permission.role", - "pk": 5, - "fields": { - "for_club": null, - "name": "Pr\u00e9sident\u22c5e de club", - "permissions": [ - 62, - 142, - 135 - ] - } - }, - { - "model": "permission.role", - "pk": 6, - "fields": { - "for_club": null, - "name": "Tr\u00e9sorièr\u22c5e de club", - "permissions": [ - 19, - 20, - 21, - 27, - 59, - 60, - 61, - 62, - 127, - 133, - 142, - 182, - 184, - 185, - 239 - ] - } - }, - { - "model": "permission.role", - "pk": 7, - "fields": { - "for_club": 1, - "name": "Pr\u00e9sident\u22c5e BDE", - "permissions": [ - 24, - 25, - 26, - 27, - 30, - 41, - 42, - 63, - 66, - 135, - 136, - 137, - 150, - 163, - 164, - 166, - 167, - 168, - 172 - ] - } - }, - { - "model": "permission.role", - "pk": 8, - "fields": { - "for_club": 1, - "name": "Tr\u00e9sorièr\u22c5e BDE", - "permissions": [ - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 37, - 38, - 41, - 42, - 43, - 51, - 53, - 54, - 55, - 56, - 57, - 58, - 63, - 64, - 65, - 66, - 67, - 68, - 69, - 70, - 71, - 72, - 73, - 132, - 134, - 135, - 136, - 137, - 138, - 139, - 140, - 143, - 146, - 147, - 148, - 149, - 150, - 151, - 163, - 164, - 172, - 173, - 174, - 175, - 176, - 177, - 178, - 183 - ] - } - }, - { - "model": "permission.role", - "pk": 9, - "fields": { - "for_club": 1, - "name": "Respo info", - "permissions": [] - } - }, - { - "model": "permission.role", - "pk": 10, - "fields": { - "for_club": 2, - "name": "GC Kfet", - "permissions": [ - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 37, - 38, - 41, - 43, - 148, - 149, - 166, - 167, - 168, - 182, - 212, - 214, - 215, - 218, - 221, - 224, - 226, - 227, - 228, - 229, - 230, - 232, - 234, - 236 - ] - } - }, - { - "model": "permission.role", - "pk": 11, - "fields": { - "for_club": 2, - "name": "Res[pot]", - "permissions": [ - 19, - 25, - 26, - 37, - 38, - 41, - 42, - 43, - 44, - 45, - 46, - 148, - 149, - 182, - 207, - 208, - 209, - 210 - ] - } - }, - { - "model": "permission.role", - "pk": 12, - "fields": { - "for_club": null, - "name": "GC WEI", - "permissions": [ - 22, - 70, - 72, - 76, - 85, - 86, - 88, - 89, - 91, - 92, - 94, - 96, - 98, - 100, - 102, - 103, - 104, - 105, - 106, - 107, - 110, - 111, - 112, - 113, - 128, - 130 - ] - } - }, - { - "model": "permission.role", - "pk": 13, - "fields": { - "for_club": null, - "name": "Chef\u22c5fe de bus", - "permissions": [ - 22, - 84, - 115, - 117, - 118, - 119, - 120, - 121, - 122 - ] - } - }, - { - "model": "permission.role", - "pk": 14, - "fields": { - "for_club": null, - "name": "Chef\u22c5fe d'\u00e9quipe", - "permissions": [ - 22, - 84, - 116, - 123, - 124, - 125 - ] - } - }, - { - "model": "permission.role", - "pk": 15, - "fields": { - "for_club": null, - "name": "\u00c9lectron libre", - "permissions": [ - 22, - 84 - ] - } - }, - { - "model": "permission.role", - "pk": 16, - "fields": { - "for_club": null, - "name": "\u00c9lectron libre (avec perm)", - "permissions": [ - 22, - 84 - ] - } - }, - { - "model": "permission.role", - "pk": 17, - "fields": { - "for_club": null, - "name": "1A", - "permissions": [] - } - }, - { - "model": "permission.role", - "pk": 18, - "fields": { - "for_club": null, - "name": "Adhérent\u22c5e WEI", - "permissions": [ - 77, - 114 - ] - } - }, - { - "model": "permission.role", - "pk": 19, - "fields": { - "for_club": 1, - "name": "Secrétaire BDE", - "permissions": [ - 37, - 41, - 53, - 54, - 55, - 56, - 57, - 58, - 135, - 136, - 137, - 138, - 139, - 140, - 143, - 145, - 146, - 147, - 148, - 149, - 150, - 176, - 177, - 180, - 181, - 183 - ] - } - }, - { - "model": "permission.role", - "pk": 20, - "fields": { - "for_club": 1, - "name": "PC Kfet", - "permissions": [ - 6, - 24, - 25, - 27, - 30, - 34, - 49, - 50, - 135, - 137, - 147, - 150, - 166, - 167, - 168, - 176, - 177, - 197, - 211 - ] - } - }, - { - "model": "permission.role", - "pk": 21, - "fields": { - "for_club": 1, - "name": "GC anti-VSS", - "permissions": [ - 150, - 163, - 164, - 182 - ] - } - }, - { - "model": "permission.role", - "pk": 22, - "fields": { - "for_club": 2, - "name": "Respo Bouffe", - "permissions": [ - 137, - 211, - 214, - 216, - 217, - 220, - 223, - 225, - 231, - 235, - 238 - ] - } - }, - { - "model": "wei.weirole", - "pk": 12, - "fields": {} - }, - { - "model": "wei.weirole", - "pk": 13, - "fields": {} - }, - { - "model": "wei.weirole", - "pk": 14, - "fields": {} - }, - { - "model": "wei.weirole", - "pk": 15, - "fields": {} - }, - { - "model": "wei.weirole", - "pk": 16, - "fields": {} - }, - { - "model": "wei.weirole", - "pk": 17, - "fields": {} - }, - { - "model": "wei.weirole", - "pk": 18, - "fields": {} - } + "model": "permission.permission", + "pk": 205, + "fields": { + "model": [ + "note", + "specialtransaction" + ], + "query": "[\"NOT\", {\"pk__isnull\": [\"user\", \"note\", \"activity_responsible\", [\"filter\", {\"activity__open\": true, \"activity__activity_type__manage_entries\":true}], [\"exists\"]]}]", + "type": "add", + "mask": 2, + "field": "", + "permanent": false, + "description": "Créer un crédit ou un retrait quelconque lorsque l'utilisateur⋅rice est ouvreur⋅se d'une activité ouverte" + } + }, + { + "model": "permission.permission", + "pk": 206, + "fields": { + "model": [ + "note", + "notespecial" + ], + "query": "[\"NOT\", {\"pk__isnull\": [\"user\", \"note\", \"activity_responsible\", [\"filter\", {\"activity__open\": true, \"activity__activity_type__manage_entries\":true}], [\"exists\"]]}]", + "type": "view", + "mask": 2, + "field": "", + "permanent": false, + "description": "Afficher l'interface crédit/retrait lorsque l'utilisateur⋅rice est ouvreur⋅se d'une activité ouverte" + } + }, + { + "model": "permission.permission", + "pk": 207, + "fields": { + "model": [ + "activity", + "opener" + ], + "query": "{}", + "type": "view", + "mask": 2, + "field": "", + "permanent": false, + "description": "Voir les ouvreur⋅ses des activités" + } + }, + { + "model": "permission.permission", + "pk": 208, + "fields": { + "model": [ + "activity", + "opener" + ], + "query": "{}", + "type": "add", + "mask": 2, + "field": "", + "permanent": false, + "description": "Ajouter des ouvreur⋅ses aux activités" + } + }, + { + "model": "permission.permission", + "pk": 209, + "fields": { + "model": [ + "activity", + "opener" + ], + "query": "{}", + "type": "delete", + "mask": 2, + "field": "", + "permanent": false, + "description": "Supprimer des ouvreur⋅ses aux activités" + } + }, + { + "model": "permission.permission", + "pk": 210, + "fields": { + "model": [ + "activity", + "activity" + ], + "query": "{}", + "type": "change", + "mask": 2, + "field": "opener", + "permanent": false, + "description": "Voir le tableau des ouvreur⋅ses" + } + }, + { + "model": "permission.permission", + "pk": 211, + "fields": { + "model": [ + "food", + "transformedfood" + ], + "query": "{}", + "type": "view", + "mask": 3, + "field": "", + "permanent": false, + "description": "Voir tout les plats" + } + }, + { + "model": "permission.permission", + "pk": 212, + "fields": { + "model": [ + "food", + "transformedfood" + ], + "query": "{\"owner\": [\"club\"]}", + "type": "view", + "mask": 3, + "field": "", + "permanent": false, + "description": "Voir tout les plats de son club" + } + }, + { + "model": "permission.permission", + "pk": 213, + "fields": { + "model": [ + "food", + "transformedfood" + ], + "query": "{\"is_ready\": true, \"is_active\": true, \"was_eaten\": false}", + "type": "view", + "mask": 1, + "field": "", + "permanent": false, + "description": "Voir les plats préparés actifs servis" + } + }, + { + "model": "permission.permission", + "pk": 214, + "fields": { + "model": [ + "food", + "qrcode" + ], + "query": "{}", + "type": "add", + "mask": 3, + "field": "", + "permanent": false, + "description": "Initialiser un QR code de traçabilité" + } + }, + { + "model": "permission.permission", + "pk": 215, + "fields": { + "model": [ + "food", + "basicfood" + ], + "query": "{\"owner\": [\"club\"]}", + "type": "add", + "mask": 3, + "field": "", + "permanent": false, + "description": "Créer un nouvel ingrédient pour son club" + } + }, + { + "model": "permission.permission", + "pk": 216, + "fields": { + "model": [ + "food", + "basicfood" + ], + "query": "{}", + "type": "add", + "mask": 3, + "field": "", + "permanent": false, + "description": "Créer un nouvel ingrédient" + } + }, + { + "model": "permission.permission", + "pk": 217, + "fields": { + "model": [ + "food", + "basicfood" + ], + "query": "{}", + "type": "view", + "mask": 3, + "field": "", + "permanent": false, + "description": "Voir toute la bouffe" + } + }, + { + "model": "permission.permission", + "pk": 218, + "fields": { + "model": [ + "food", + "basicfood" + ], + "query": "{\"is_active\": true}", + "type": "view", + "mask": 3, + "field": "", + "permanent": false, + "description": "Voir toute la bouffe active" + } + }, + { + "model": "permission.permission", + "pk": 219, + "fields": { + "model": [ + "food", + "basicfood" + ], + "query": "{\"is_active\": true, \"owner\": [\"club\"]}", + "type": "view", + "mask": 3, + "field": "", + "permanent": false, + "description": "Voir la bouffe active de son club" + } + }, + { + "model": "permission.permission", + "pk": 220, + "fields": { + "model": [ + "food", + "basicfood" + ], + "query": "{}", + "type": "change", + "mask": 3, + "field": "", + "permanent": false, + "description": "Modifier de la bouffe" + } + }, + { + "model": "permission.permission", + "pk": 221, + "fields": { + "model": [ + "food", + "basicfood" + ], + "query": "{\"is_active\": true, \"was_eaten\": false}", + "type": "change", + "mask": 3, + "field": "allergens", + "permanent": false, + "description": "Modifier les allergènes de la bouffe existante" + } + }, + { + "model": "permission.permission", + "pk": 222, + "fields": { + "model": [ + "food", + "basicfood" + ], + "query": "{\"is_active\": true, \"was_eaten\": false, \"owner\": [\"club\"]}", + "type": "change", + "mask": 3, + "field": "allergens", + "permanent": false, + "description": "Modifier les allergènes de la bouffe appartenant à son club" + } + }, + { + "model": "permission.permission", + "pk": 223, + "fields": { + "model": [ + "food", + "transformedfood" + ], + "query": "{}", + "type": "add", + "mask": 3, + "field": "", + "permanent": false, + "description": "Créer un plat" + } + }, + { + "model": "permission.permission", + "pk": 224, + "fields": { + "model": [ + "food", + "transformedfood" + ], + "query": "{\"owner\": [\"club\"]}", + "type": "add", + "mask": 3, + "field": "", + "permanent": false, + "description": "Créer un plat pour son club" + } + }, + { + "model": "permission.permission", + "pk": 225, + "fields": { + "model": [ + "food", + "transformedfood" + ], + "query": "{}", + "type": "change", + "mask": 3, + "field": "", + "permanent": false, + "description": "Modifier tout les plats" + } + }, + { + "model": "permission.permission", + "pk": 226, + "fields": { + "model": [ + "food", + "transformedfood" + ], + "query": "{\"is_active\": true}", + "type": "change", + "mask": 3, + "field": "was_eaten", + "permanent": false, + "description": "Indiquer si un plat a été mangé" + } + }, + { + "model": "permission.permission", + "pk": 227, + "fields": { + "model": [ + "food", + "transformedfood" + ], + "query": "{\"is_active\": true, \"owner\": [\"club\"]}", + "type": "change", + "mask": 3, + "field": "is_ready", + "permanent": false, + "description": "Indiquer si un plat de son club est prêt" + } + }, + { + "model": "permission.permission", + "pk": 228, + "fields": { + "model": [ + "food", + "transformedfood" + ], + "query": "{\"is_active\": true}", + "type": "change", + "mask": 3, + "field": "is_active", + "permanent": false, + "description": "Archiver un plat" + } + }, + { + "model": "permission.permission", + "pk": 229, + "fields": { + "model": [ + "food", + "basicfood" + ], + "query": "{\"is_active\": true}", + "type": "change", + "mask": 3, + "field": "is_active", + "permanent": false, + "description": "Archiver de la bouffe" + } + }, + { + "model": "permission.permission", + "pk": 230, + "fields": { + "model": [ + "food", + "transformedfood" + ], + "query": "{\"is_active\": true}", + "type": "view", + "mask": 3, + "field": "", + "permanent": false, + "description": "Voir tout les plats actifs" + } + }, + { + "model": "permission.permission", + "pk": 231, + "fields": { + "model": [ + "food", + "qrcode" + ], + "query": "{}", + "type": "view", + "mask": 3, + "field": "", + "permanent": false, + "description": "Voir tous les QR codes" + } + }, + { + "model": "permission.permission", + "pk": 232, + "fields": { + "model": [ + "food", + "qrcode" + ], + "query": "{\"food_container__is_active\": true}", + "type": "view", + "mask": 3, + "field": "", + "permanent": false, + "description": "Voir tous les QR codes actifs" + } + }, + { + "model": "permission.permission", + "pk": 233, + "fields": { + "model": [ + "food", + "qrcode" + ], + "query": "{\"food_container__owner\": [\"club\"], \"food_container__is_active\": true}", + "type": "view", + "mask": 3, + "field": "", + "permanent": false, + "description": "Voir tous les QR codes actifs de son club" + } + }, + { + "model": "permission.permission", + "pk" : 234, + "fields": { + "model": [ + "food", + "transformedfood" + ], + "query": "{\"owner\": [\"club\"], \"is_active\": true}", + "type": "change", + "mask": 3, + "field": "ingredients", + "permanent": false, + "description": "Changer les ingrédients d'un plat actif de son club" + } + }, + { + "model": "permission.permission", + "pk": 235, + "fields": { + "model": [ + "food", + "food" + ], + "query": "{}", + "type": "view", + "mask": 3, + "field": "", + "permanent": false, + "description": "Voir bouffe" + } + }, + { + "model": "permission.permission", + "pk": 236, + "fields": { + "model": [ + "food", + "food" + ], + "query": "{\"is_active\": true}", + "type": "view", + "mask": 3, + "field": "", + "permanent": false, + "description": "Voir bouffe active" + } + }, + { + "model": "permission.permission", + "pk": 237, + "fields": { + "model": [ + "food", + "food" + ], + "query": "{\"is_active\": true, \"owner\": [\"club\"]}", + "type": "view", + "mask": 3, + "field": "", + "permanent": false, + "description": "Voir bouffe active de son club" + } + }, + { + "model": "permission.permission", + "pk": 238, + "fields": { + "model": [ + "food", + "food" + ], + "query": "{}", + "type": "change", + "mask": 3, + "field": "", + "permanent": false, + "description": "Modifier bouffe" + } + }, + { + "model": "permission.permission", + "pk": 239, + "fields": { + "model": [ + "note", + "alias" + ], + "query": "[\"AND\", {\"note__noteuser__user__memberships__club\": [\"club\"], \"note__noteuser__user__memberships__date_start__lte\": [\"today\"], \"note__noteuser__user__memberships__date_end__gte\": [\"today\"]}, {\"note__is_active\": true}]", + "type": "view", + "mask": 2, + "field": "", + "permanent": false, + "description": "Voir les alias des notes des adhérent⋅es du club" + } + }, + { + "model": "permission.permission", + "pk": 240, + "fields": { + "model": [ + "note", + "alias" + ], + "query": "[\"AND\", {\"note__noteuser__user__memberships__club\": [\"club\", \"parent_club\"], \"note__noteuser__user__memberships__date_start__lte\": [\"today\"], \"note__noteuser__user__memberships__date_end__gte\": [\"today\"]}, {\"note__is_active\": true}]", + "type": "view", + "mask": 2, + "field": "", + "permanent": false, + "description": "Voir les alias des notes des adhérent⋅es du club parent" + } + }, + { + "model": "permission.permission", + "pk": 241, + "fields": { + "model": [ + "auth", + "user" + ], + "query": "[\"AND\", {\"memberships__club\": [\"club\", \"parent_club\"], \"memberships__date_start__lte\": [\"today\"], \"memberships__date_end__gte\": [\"today\"]}, {\"note__is_active\": true}]", + "type": "view", + "mask": 2, + "field": "", + "permanent": false, + "description": "Voir les utilisateurs adhérents au club parent" + } + }, + { + "model": "permission.role", + "pk": 1, + "fields": { + "for_club": 1, + "name": "Adh\u00e9rent\u22c5e BDE", + "permissions": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 22, + 34, + 48, + 52, + 126, + 161, + 162, + 165, + 179, + 186, + 187, + 188, + 189, + 190, + 191, + 195, + 196, + 198, + 199, + 200, + 201, + 202, + 203, + 204, + 205, + 206 + ] + } + }, + { + "model": "permission.role", + "pk": 2, + "fields": { + "for_club": 2, + "name": "Adh\u00e9rent\u22c5e Kfet", + "permissions": [ + 22, + 36, + 39, + 40, + 78, + 79, + 83, + 87, + 90, + 93, + 95, + 97, + 99, + 101, + 108, + 109, + 129, + 131, + 144, + 152, + 153, + 154, + 155, + 156, + 157, + 158, + 159, + 160, + 213 + ] + } + }, + { + "model": "permission.role", + "pk": 3, + "fields": { + "for_club": null, + "name": "Membre de club", + "permissions": [ + 1, + 2, + 3, + 4, + 5, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 22 + ] + } + }, + { + "model": "permission.role", + "pk": 4, + "fields": { + "for_club": null, + "name": "Bureau de club", + "permissions": [ + 47, + 49, + 50, + 141, + 169, + 212, + 214, + 215, + 219, + 222, + 224, + 227, + 233, + 234, + 237 + ] + } + }, + { + "model": "permission.role", + "pk": 5, + "fields": { + "for_club": null, + "name": "Pr\u00e9sident\u22c5e de club", + "permissions": [ + 62, + 142, + 135 + ] + } + }, + { + "model": "permission.role", + "pk": 6, + "fields": { + "for_club": null, + "name": "Tr\u00e9sorièr\u22c5e de club", + "permissions": [ + 19, + 20, + 21, + 27, + 59, + 60, + 61, + 62, + 127, + 133, + 142, + 182, + 184, + 185, + 239, + 240, + 241 + ] + } + }, + { + "model": "permission.role", + "pk": 7, + "fields": { + "for_club": 1, + "name": "Pr\u00e9sident\u22c5e BDE", + "permissions": [ + 24, + 25, + 26, + 27, + 30, + 41, + 42, + 63, + 66, + 135, + 136, + 137, + 150, + 163, + 164, + 166, + 167, + 168, + 172 + ] + } + }, + { + "model": "permission.role", + "pk": 8, + "fields": { + "for_club": 1, + "name": "Tr\u00e9sorièr\u22c5e BDE", + "permissions": [ + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 37, + 38, + 41, + 42, + 43, + 51, + 53, + 54, + 55, + 56, + 57, + 58, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72, + 73, + 132, + 134, + 135, + 136, + 137, + 138, + 139, + 140, + 143, + 146, + 147, + 148, + 149, + 150, + 151, + 163, + 164, + 172, + 173, + 174, + 175, + 176, + 177, + 178, + 183 + ] + } + }, + { + "model": "permission.role", + "pk": 9, + "fields": { + "for_club": 1, + "name": "Respo info", + "permissions": [] + } + }, + { + "model": "permission.role", + "pk": 10, + "fields": { + "for_club": 2, + "name": "GC Kfet", + "permissions": [ + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 37, + 38, + 41, + 43, + 148, + 149, + 166, + 167, + 168, + 182, + 212, + 214, + 215, + 218, + 221, + 224, + 226, + 227, + 228, + 229, + 230, + 232, + 234, + 236 + ] + } + }, + { + "model": "permission.role", + "pk": 11, + "fields": { + "for_club": 2, + "name": "Res[pot]", + "permissions": [ + 19, + 25, + 26, + 37, + 38, + 41, + 42, + 43, + 44, + 45, + 46, + 148, + 149, + 182, + 207, + 208, + 209, + 210 + ] + } + }, + { + "model": "permission.role", + "pk": 12, + "fields": { + "for_club": null, + "name": "GC WEI", + "permissions": [ + 22, + 70, + 72, + 76, + 85, + 86, + 88, + 89, + 91, + 92, + 94, + 96, + 98, + 100, + 102, + 103, + 104, + 105, + 106, + 107, + 110, + 111, + 112, + 113, + 128, + 130 + ] + } + }, + { + "model": "permission.role", + "pk": 13, + "fields": { + "for_club": null, + "name": "Chef\u22c5fe de bus", + "permissions": [ + 22, + 84, + 115, + 117, + 118, + 119, + 120, + 121, + 122 + ] + } + }, + { + "model": "permission.role", + "pk": 14, + "fields": { + "for_club": null, + "name": "Chef\u22c5fe d'\u00e9quipe", + "permissions": [ + 22, + 84, + 116, + 123, + 124, + 125 + ] + } + }, + { + "model": "permission.role", + "pk": 15, + "fields": { + "for_club": null, + "name": "\u00c9lectron libre", + "permissions": [ + 22, + 84 + ] + } + }, + { + "model": "permission.role", + "pk": 16, + "fields": { + "for_club": null, + "name": "\u00c9lectron libre (avec perm)", + "permissions": [ + 22, + 84 + ] + } + }, + { + "model": "permission.role", + "pk": 17, + "fields": { + "for_club": null, + "name": "1A", + "permissions": [] + } + }, + { + "model": "permission.role", + "pk": 18, + "fields": { + "for_club": null, + "name": "Adhérent\u22c5e WEI", + "permissions": [ + 77, + 114 + ] + } + }, + { + "model": "permission.role", + "pk": 19, + "fields": { + "for_club": 1, + "name": "Secrétaire BDE", + "permissions": [ + 37, + 41, + 53, + 54, + 55, + 56, + 57, + 58, + 135, + 136, + 137, + 138, + 139, + 140, + 143, + 145, + 146, + 147, + 148, + 149, + 150, + 176, + 177, + 180, + 181, + 183 + ] + } + }, + { + "model": "permission.role", + "pk": 20, + "fields": { + "for_club": 1, + "name": "PC Kfet", + "permissions": [ + 6, + 24, + 25, + 27, + 30, + 34, + 49, + 50, + 135, + 137, + 147, + 150, + 166, + 167, + 168, + 176, + 177, + 197, + 211 + ] + } + }, + { + "model": "permission.role", + "pk": 21, + "fields": { + "for_club": 1, + "name": "GC anti-VSS", + "permissions": [ + 150, + 163, + 164, + 182 + ] + } + }, + { + "model": "permission.role", + "pk": 22, + "fields": { + "for_club": 2, + "name": "Respo Bouffe", + "permissions": [ + 137, + 211, + 214, + 216, + 217, + 220, + 223, + 225, + 231, + 235, + 238 + ] + } + }, + { + "model": "wei.weirole", + "pk": 12, + "fields": {} + }, + { + "model": "wei.weirole", + "pk": 13, + "fields": {} + }, + { + "model": "wei.weirole", + "pk": 14, + "fields": {} + }, + { + "model": "wei.weirole", + "pk": 15, + "fields": {} + }, + { + "model": "wei.weirole", + "pk": 16, + "fields": {} + }, + { + "model": "wei.weirole", + "pk": 17, + "fields": {} + }, + { + "model": "wei.weirole", + "pk": 18, + "fields": {} + } ] diff --git a/apps/registration/views.py b/apps/registration/views.py index 2a2e0a16..bb23a0b4 100644 --- a/apps/registration/views.py +++ b/apps/registration/views.py @@ -304,7 +304,7 @@ class FutureUserDetailView(ProtectQuerysetMixin, LoginRequiredMixin, FormMixin, # This software belongs to the BDE. form.add_error('join_bde', _("You must join a club.")) return super().form_invalid(form) - + if join_kfet and not join_bde: form.add_error('join_bde', _("You must also join the parent club BDE.")) return super().form_invalid(form) From 94e1fdc93a5db56f91b09a64f3d1de5fad7c0302 Mon Sep 17 00:00:00 2001 From: bleizi Date: Thu, 5 Sep 2024 20:19:46 +0200 Subject: [PATCH 095/102] add ubuntu 24.4 in tox.ini and remove debian bullseye in gitlab-ci --- .gitlab-ci.yml | 17 ----------------- tox.ini | 6 +++--- 2 files changed, 3 insertions(+), 20 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4f041867..2ba35d31 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,21 +7,6 @@ stages: variables: GIT_SUBMODULE_STRATEGY: recursive -# Debian Bullseye -py39-django42: - stage: test - image: debian:bullseye - before_script: - - > - apt-get update && - apt-get install --no-install-recommends -y - python3-django python3-django-crispy-forms - python3-django-extensions python3-django-filters python3-django-polymorphic - python3-djangorestframework python3-django-oauth-toolkit python3-psycopg2 python3-pil - python3-babel python3-lockfile python3-pip python3-phonenumbers python3-memcache - python3-bs4 python3-setuptools tox texlive-xetex - script: tox -e py39-django42 - # Ubuntu 22.04 py310-django42: stage: test @@ -54,8 +39,6 @@ py311-django42: python3-bs4 python3-setuptools tox texlive-xetex script: tox -e py311-django42 - - linters: stage: quality-assurance image: debian:bookworm diff --git a/tox.ini b/tox.ini index 31d827a0..924ea514 100644 --- a/tox.ini +++ b/tox.ini @@ -1,14 +1,14 @@ [tox] envlist = - # Debian Bullseye Python - py39-django42 - # Ubuntu 22.04 Python py310-django42 # Debian Bookworm Python py311-django42 + # Ubuntu 24.04 Python + py312-django42 + linters skipsdist = True From c5697c4cb4e62a4455126de7cd5ff11fc7fe4bf6 Mon Sep 17 00:00:00 2001 From: Nicolas Margulies Date: Thu, 5 Sep 2024 20:54:23 +0200 Subject: [PATCH 096/102] don't hide the transfer tab --- note_kfet/templates/base.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/note_kfet/templates/base.html b/note_kfet/templates/base.html index 9f5ae867..68cbf542 100644 --- a/note_kfet/templates/base.html +++ b/note_kfet/templates/base.html @@ -66,13 +66,13 @@ SPDX-License-Identifier: GPL-3.0-or-later {% trans 'Consumptions' %} {% endif %} - {% if request.user.is_authenticated %} - - {% endif %} - {% if user.is_authenticated and user|is_member:"Kfet" %} + {% trans 'Food' %} + + {% endif %} + {% if user.is_authenticated %}