Skip to content

Commit

Permalink
Merge branch 'dev' into slug
Browse files Browse the repository at this point in the history
  • Loading branch information
philippemilink authored Mar 25, 2022
2 parents 717c6dc + 48ca52f commit 9944445
Show file tree
Hide file tree
Showing 41 changed files with 4,021 additions and 5,444 deletions.
14 changes: 13 additions & 1 deletion doc/source/back-end/contents.rst
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,10 @@ devoir migrer les différents tutoriels. Pour cela, il faudra simplement exécut
Récapitulatif des paramètres du module
======================================

Ces paramètres sont à surcharger dans le dictionnaire ZDS_APP['content']
Paramètres globaux
------------------

Ces paramètres sont à surcharger dans le dictionnaire ``ZDS_APP['content']``:

- ``repo_private_path`` : chemin vers le dossier qui contiend les contenus durant leur rédaction, par défaut le dossier sera contents-private à la racine de l'application
- ``repo_public_path``: chemin vers le dossier qui contient les fichiers permettant l'affichage des contenus publiés ainsi que les fichiers téléchargeables, par défaut contents-public
Expand All @@ -618,6 +621,15 @@ Ces paramètres sont à surcharger dans le dictionnaire ZDS_APP['content']
- ``build_pdf_when_published``: indique que la publication générera un PDF (quelque soit la politique, si ``False``, les PDF ne seront pas générés, sauf à appeler la commande adéquate),
- ``maximum_slug_size``: taille maximale du slug d'un contenu

Paramètres propres aux tribunes libres
--------------------------------------

Ces paramètres sont à surcharger dans le dictionnaire ``ZDS_APP['opinions']``:

- ``allow_pdf``: par défaut à ``True`` elle permet d'activer (et de désactiver si ``False``) la génération des PDF à la publication des billets.
- ``allow_epub``: par défaut à ``True`` elle permet d'activer (et de désactiver si ``False``) la génération des EPUB à la publication des billets.
- ``allow_zip``: par défaut à ``True`` elle permet d'activer (et de désactiver si ``False``) la génération de l'archive du contenu à la publication des billets.

Statistiques
============

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"chartjs-adapter-moment": "1.0.0",
"cssnano": "5.0.15",
"del": "6.0.0",
"easymde": "2.10.2-360.0",
"easymde": "2.16.1",
"gulp": "4.0.2",
"gulp-concat": "2.6.1",
"gulp-dart-sass": "1.0.2",
Expand Down
6 changes: 3 additions & 3 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ black==21.12b0 # needs to be also updated in .github/workflows/ci.yml and .pre-
colorlog==6.6.0
django-debug-toolbar==3.2.4
django-extensions==3.1.5
Faker==10.0.0
pre-commit==2.16.0
Faker==13.3.0
pre-commit==2.17.0
PyYAML==6.0
selenium==3.141.0
Sphinx==4.3.2
Sphinx==4.4.0
sphinx_rtd_theme==1.0.0
2 changes: 1 addition & 1 deletion requirements-prod.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

gunicorn==20.1.0
mysqlclient==2.1.0
sentry-sdk==1.5.1
sentry-sdk==1.5.6
ujson==5.1.0
18 changes: 9 additions & 9 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,26 @@ social-auth-app-django==5.0.0

# Explicit dependencies (references in code)
beautifulsoup4==4.10.0
django-crispy-forms==1.13.0
django-crispy-forms==1.14.0
django-model-utils==4.2.0
django-munin==0.2.1
django-recaptcha==2.0.6
django-recaptcha==3.0.0
Django==3.2.12
easy-thumbnails==2.8.0
easy-thumbnails==2.8.1
factory-boy==3.2.1
geoip2==4.5.0
GitPython==3.1.24
GitPython==3.1.27
homoglyphs==2.0.4
lxml==4.7.1
lxml==4.8.0
Pillow==9.0.1
pymemcache==3.5.0
requests==2.26.0
pymemcache==3.5.1
requests==2.27.1
toml==0.10.2

# Api dependencies
django-cors-headers==3.10.1
django-cors-headers==3.11.0
django-filter==21.1
django-oauth-toolkit==1.5.0
django-oauth-toolkit==1.7.0
djangorestframework-xml==2.0.0
djangorestframework==3.13.1
drf-extensions==0.7.1
Expand Down
60 changes: 43 additions & 17 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,18 @@
resolved "https://registry.yarnpkg.com/@trysound/sax/-/sax-0.2.0.tgz#cccaab758af56761eb7bf37af6f03f326dd798ad"
integrity sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA==

"@types/codemirror@^5.60.4":
version "5.60.5"
resolved "https://registry.yarnpkg.com/@types/codemirror/-/codemirror-5.60.5.tgz#5b989a3b4bbe657458cf372c92b6bfda6061a2b7"
integrity sha512-TiECZmm8St5YxjFUp64LK0c8WU5bxMDt9YaAek1UqUb9swrSCoJhh92fWu1p3mTEqlHjhB5sY7OFBhWroJXZVg==
dependencies:
"@types/tern" "*"

"@types/estree@*":
version "0.0.51"
resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.51.tgz#cfd70924a25a3fd32b218e5e420e6897e1ac4f40"
integrity sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ==

"@types/glob@^7.1.1":
version "7.2.0"
resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.2.0.tgz#bc1b5bf3aa92f25bd5dd39f35c57361bdce5b2eb"
Expand All @@ -62,6 +74,11 @@
"@types/minimatch" "*"
"@types/node" "*"

"@types/marked@^4.0.1":
version "4.0.2"
resolved "https://registry.yarnpkg.com/@types/marked/-/marked-4.0.2.tgz#cb2dbf10da2f41cf20bd91fb5f89b67540c282f7"
integrity sha512-auNrZ/c0w6wsM9DccwVxWHssrMDezHUAXNesdp2RQrCVCyrQbOiSq7yqdJKrUQQpw9VTm7CGYJH2A/YG7jjrjQ==

"@types/minimatch@*":
version "3.0.5"
resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.5.tgz#1001cc5e6a3704b83c236027e77f2f58ea010f40"
Expand All @@ -77,6 +94,13 @@
resolved "https://registry.yarnpkg.com/@types/q/-/q-1.5.5.tgz#75a2a8e7d8ab4b230414505d92335d1dcb53a6df"
integrity sha512-L28j2FcJfSZOnL1WBjDYp2vUHCeIFlyYI/53EwD/rKUBQ7MtUUfbQWiyKJGpcnv4/WgrhWsFKrcPstcAt/J0tQ==

"@types/tern@*":
version "0.23.4"
resolved "https://registry.yarnpkg.com/@types/tern/-/tern-0.23.4.tgz#03926eb13dbeaf3ae0d390caf706b2643a0127fb"
integrity sha512-JAUw1iXGO1qaWwEOzxTKJZ/5JxVeON9kvGZ/osgZaJImBnyjyn0cjovPsf6FNLmyGY8Vw9DoXZCMlfMkMwHRWg==
dependencies:
"@types/estree" "*"

acorn-jsx@^5.2.0:
version "5.3.1"
resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.1.tgz#fc8661e11b7ac1539c47dbfea2e72b3af34d267b"
Expand Down Expand Up @@ -902,10 +926,10 @@ [email protected]:
dependencies:
typo-js "*"

codemirror@^5.53.2:
version "5.61.1"
resolved "https://registry.yarnpkg.com/codemirror/-/codemirror-5.61.1.tgz#ccfc8a43b8fcfb8b12e8e75b5ffde48d541406e0"
integrity sha512-+D1NZjAucuzE93vJGbAaXzvoBHwp9nJZWWWF9utjv25+5AZUiah6CIlfb4ikG4MoDsFsCG8niiJH5++OO2LgIQ==
codemirror@^5.63.1:
version "5.65.1"
resolved "https://registry.yarnpkg.com/codemirror/-/codemirror-5.65.1.tgz#5988a812c974c467f964bcc1a00c944e373de502"
integrity sha512-s6aac+DD+4O2u1aBmdxhB7yz2XU7tG3snOyQ05Kxifahz7hoxnfxIRHxiCSEv3TUC38dIVH8G+lZH9UWSfGQxA==

collection-map@^1.0.0:
version "1.0.0"
Expand Down Expand Up @@ -1570,14 +1594,16 @@ each-props@^1.3.2:
is-plain-object "^2.0.1"
object.defaults "^1.1.0"

easymde@2.10.2-360.0:
version "2.10.2-360.0"
resolved "https://registry.yarnpkg.com/easymde/-/easymde-2.10.2-360.0.tgz#da4e22df3aa1916ae547d84467260fa5d28d1afb"
integrity sha512-Mbh9iYATsDHNBmVZviwmIGjJncF+wc1CPQyaovzXNWRUX/K4ToJV9a3hBZmcKeQVYRWPVp6J3cMhuEDWMyZPeg==
easymde@2.16.1:
version "2.16.1"
resolved "https://registry.yarnpkg.com/easymde/-/easymde-2.16.1.tgz#f4c2380312615cb33826f1a1fecfaa4022ff551a"
integrity sha512-FihYgjRsKfhGNk89SHSqxKLC4aJ1kfybPWW6iAmtb5GnXu+tnFPSzSaGBmk1RRlCuhFSjhF0SnIMGVPjEzkr6g==
dependencies:
codemirror "^5.53.2"
"@types/codemirror" "^5.60.4"
"@types/marked" "^4.0.1"
codemirror "^5.63.1"
codemirror-spell-checker "1.1.2"
marked "^1.0.0"
marked "^4.0.10"

ecc-jsbn@~0.1.1:
version "0.1.2"
Expand Down Expand Up @@ -3871,10 +3897,10 @@ map-visit@^1.0.0:
dependencies:
object-visit "^1.0.0"

marked@^1.0.0:
version "1.2.9"
resolved "https://registry.yarnpkg.com/marked/-/marked-1.2.9.tgz#53786f8b05d4c01a2a5a76b7d1ec9943d29d72dc"
integrity sha512-H8lIX2SvyitGX+TRdtS06m1jHMijKN/XjfH6Ooii9fvxMlh8QdqBfBDkGUpMWH2kQNrtixjzYUa3SH8ROTgRRw==
marked@^4.0.10:
version "4.0.12"
resolved "https://registry.yarnpkg.com/marked/-/marked-4.0.12.tgz#2262a4e6fd1afd2f13557726238b69a48b982f7d"
integrity sha512-hgibXWrEDNBWgGiK18j/4lkS6ihTe9sxtV4Q1OQppb/0zzyPSzoFANBa5MfsG/zgsWklmNnhm0XACZOH/0HBiQ==

matchdep@^2.0.0:
version "2.0.0"
Expand Down Expand Up @@ -6209,9 +6235,9 @@ typedarray@^0.0.6, typedarray@~0.0.5:
integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=

typo-js@*:
version "1.2.0"
resolved "https://registry.yarnpkg.com/typo-js/-/typo-js-1.2.0.tgz#dbe58de3a6dcbbe260b78bf290ee761b008a28e8"
integrity sha512-dELuLBVa2jvWdU/CHTKi2L/POYaRupv942k+vRsFXsM17acXesQGAiGCio82RW7fvcr7bkuD/Zj8XpUh6aPC2A==
version "1.2.1"
resolved "https://registry.yarnpkg.com/typo-js/-/typo-js-1.2.1.tgz#334a0d8c3f6c56f2f1e15fdf6c31677793cbbe9b"
integrity sha512-bTGLjbD3WqZDR3CgEFkyi9Q/SS2oM29ipXrWfDb4M74ea69QwKAECVceYpaBu0GfdnASMg9Qfl67ttB23nePHg==

uglify-js@^3.1.4:
version "3.13.9"
Expand Down
17 changes: 0 additions & 17 deletions zds/member/decorator.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,23 +29,6 @@ def _can_write_and_read_now(request, *args, **kwargs):
return _can_write_and_read_now


class PermissionRequiredMixin:
"""
Represent the basic code that a Generic Class Based View has to use when one or more
permissions are required simultaneously to execute the view
"""

permissions = []

def check_permissions(self):
if False in [self.request.user.has_perm(p) for p in self.permissions]:
raise PermissionDenied

def dispatch(self, *args, **kwargs):
self.check_permissions()
return super().dispatch(*args, **kwargs)


class LoggedWithReadWriteHability(LoginRequiredMixin):
"""
Represent the basic code that a Generic Class View has to use when a logged in user with
Expand Down
Loading

0 comments on commit 9944445

Please sign in to comment.