Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
thalia
concrexit
Commits
0cf0bb81
Commit
0cf0bb81
authored
Apr 24, 2019
by
Sébastiaan Versteeg
Committed by
Luko van der Maas
Apr 24, 2019
Browse files
Update to Django 2.2
parent
f77c801a
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
0cf0bb81
...
...
@@ -8,8 +8,8 @@ variables:
# Installs:
# - pip: coverage, poetry
# - apt: ghostscript
PY36_IMAGE
:
thalia/python-thalia:3.6
PY37_IMAGE
:
thalia/python-thalia:3.7
PY38_IMAGE
:
thalia/python-thalia:3.8
PIP_CACHE_DIR
:
"
${CI_PROJECT_DIR}/pip-cache"
stages
:
...
...
@@ -18,7 +18,7 @@ stages:
codestyle
:
stage
:
test
image
:
$PY3
6
_IMAGE
image
:
$PY3
7
_IMAGE
before_script
:
-
poetry install --no-interaction
script
:
...
...
@@ -48,11 +48,7 @@ codestyle:
-
poetry run python -Wall -mcoverage run manage.py test
-
coverage report
python36-django21
:
<<
:
*djangotest
image
:
$PY36_IMAGE
python37-django21
:
python37-django22
:
<<
:
*djangotest
image
:
$PY37_IMAGE
after_script
:
...
...
@@ -62,6 +58,11 @@ python37-django21:
paths
:
-
website/covhtml/
python38-django22
:
<<
:
*djangotest
image
:
$PY38_IMAGE
allow_failure
:
true
.sshsetup
:
&sshsetup
before_script
:
-
mkdir -p ~/.ssh
...
...
@@ -76,7 +77,7 @@ coverage deploy:
stage
:
deploy
image
:
debian:stretch
dependencies
:
-
python37-django2
1
-
python37-django2
2
environment
:
name
:
coverage/${CI_COMMIT_REF_NAME}
url
:
https://coverage.technicie.nl/${CI_COMMIT_REF_SLUG}/
...
...
@@ -109,7 +110,7 @@ coverage remove:
docs tests
:
stage
:
test
image
:
$PY3
6
_IMAGE
image
:
$PY3
7
_IMAGE
before_script
:
# install django deps
-
poetry install --no-interaction --extras "docs"
...
...
poetry.lock
View file @
0cf0bb81
This diff is collapsed.
Click to expand it.
pyproject.toml
View file @
0cf0bb81
...
...
@@ -6,46 +6,46 @@ authors = ["Thalia Technicie <www@thalia.nu>"]
license
=
"AGPL-3.0-or-later"
[tool.poetry.dependencies]
python
=
"^3.
6
"
django-localflavor
=
"
^
2.1"
freezegun
=
"
^
0.3.11"
bleach
=
"
^
3.1"
django-tinymce4-lite
=
"
^
1.7"
rcssmin
=
"
^
1.0"
djangorestframework
=
"
^
3.9"
django-ical
=
"
^
1.5"
django-libsass
=
"
^
0.7.0"
django-cors-headers
=
"
^
2.
4
"
python-magic
=
"
^
0.4.15"
redis
=
"
^
3.2"
Django
=
"
^
2.
1
"
Pillow
=
"
^
5.4"
django_compressor
=
"
^
2.2"
psycopg2-binary
=
"
^
2.
7
"
bcrypt
=
"
^
3.1"
argon2_cffi
=
"
^
19.1"
uWSGI
=
"
^
2.0"
django-bootstrap4
=
"
^
0.0.
7
"
firebase-admin
=
"
^
2.15"
sentry-sdk
=
"
^
0.7.3"
django-sendfile2
=
"
^
0.4.2"
python
=
"^3.
7
"
django-localflavor
=
"
~
2.1"
freezegun
=
"
~
0.3.11"
bleach
=
"
~
3.1"
django-tinymce4-lite
=
"
~
1.7"
rcssmin
=
"
~
1.0"
djangorestframework
=
"
~
3.9"
django-ical
=
"
~
1.5"
django-libsass
=
"
~
0.7.0"
django-cors-headers
=
"
~
2.
5
"
python-magic
=
"
~
0.4.15"
redis
=
"
~
3.2"
Django
=
"
~
2.
2
"
Pillow
=
"
~
5.4"
django_compressor
=
"
~
2.2"
psycopg2-binary
=
"
~
2.
8
"
bcrypt
=
"
~
3.1"
argon2_cffi
=
"
~
19.1"
uWSGI
=
"
~
2.0"
django-bootstrap4
=
"
~
0.0.
8
"
firebase-admin
=
"
~
2.15"
sentry-sdk
=
"
~
0.7.3"
django-sendfile2
=
"
~
0.4.2"
# docs requirements
recommonmark
=
{
version
=
"
^
0.5.0"
,
optional
=
true
}
sphinx
=
{
version
=
"
^
1.8"
,
optional
=
true
}
recommonmark
=
{
version
=
"
~
0.5.0"
,
optional
=
true
}
sphinx
=
{
version
=
"
~
1.8"
,
optional
=
true
}
[tool.poetry.extras]
docs
=
[
"recommonmark"
,
"sphinx"
]
[tool.poetry.dev-dependencies]
django-template-check
=
"
^
0.3.1"
factory_boy
=
"
^
2.11"
flake8
=
"
^
3.7"
pydenticon
=
"
^
0.3.1"
pylint
=
"
^
2.
2
"
pylint-django
=
"
^
2.0"
Faker
=
"
^
1.0"
coverage
=
"
^
4.5"
django-template-check
=
"
~
0.3.1"
factory_boy
=
"
~
2.11"
flake8
=
"
~
3.7"
pydenticon
=
"
~
0.3.1"
pylint
=
"
~
2.
3
"
pylint-django
=
"
~
2.0"
Faker
=
"
~
1.0"
coverage
=
"
~
4.5"
[build-system]
requires
=
["poetry>=0.12"]
...
...
website/activemembers/api/views.py
View file @
0cf0bb81
...
...
@@ -21,7 +21,7 @@ class NextCloudUsersView(ListAPIView):
serializer_class
=
NextCloudMemberSerializer
def
get_queryset
(
self
):
perm
=
Permission
.
objects
.
get
(
content_type__app_label
=
'
auth
'
,
perm
=
Permission
.
objects
.
get
(
content_type__app_label
=
'
members
'
,
codename
=
'nextcloud_admin'
)
return
super
().
get_queryset
().
filter
(
Q
(
pk__in
=
MemberGroupMembership
.
active_objects
.
values_list
(
...
...
@@ -45,7 +45,7 @@ class NextCloudGroupsView(ListAPIView):
def
list
(
self
,
request
,
*
args
,
**
kwargs
):
response
=
super
().
list
(
request
,
*
args
,
**
kwargs
)
perm
=
Permission
.
objects
.
get
(
content_type__app_label
=
'
auth
'
,
perm
=
Permission
.
objects
.
get
(
content_type__app_label
=
'
members
'
,
codename
=
'nextcloud_admin'
)
admin_users
=
Member
.
current_members
.
filter
(
Q
(
is_superuser
=
True
)
|
...
...
website/members/api/permissions.py
View file @
0cf0bb81
...
...
@@ -11,5 +11,5 @@ class SentryIdentityPermission(permissions.BasePermission):
def
has_permission
(
self
,
request
,
view
):
if
'secret'
in
request
.
GET
:
return
(
request
.
GET
[
'secret'
]
==
settings
.
MEMBERS_SENTRY_API_SECRET
and
request
.
user
.
has_perm
(
'
auth
.sentry_access'
))
and
request
.
user
.
has_perm
(
'
members
.sentry_access'
))
return
False
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment