Commit graph

800 commits

Author SHA1 Message Date
Yohan Boniface
8c4e7842af 1.2.6 2023-05-25 20:08:27 +02:00
Yohan Boniface
13c8e78c55 Rename class to match switching to Twitter OAuth V2 2023-05-25 20:07:59 +02:00
Yohan Boniface
33b40f63b2 HOT fix: add message in login_popup_end.html to work around Twitter issues
In case of logging through Twitter, we don't have access to
window.opener, so we cannot close the window and tell uMap to
finish the login process.
2023-05-25 19:57:52 +02:00
Yohan Boniface
70d99748bc Upgrade social-auth-app-django and loosen social-core version
Currently, we need to run the master of social-core, so to
support new version of Twitter API.

cf #1097
2023-05-25 19:54:35 +02:00
Yohan Boniface
f76c936783 Remove SOCIAL_AUTH_PIPELINE from settings/base.py
We are using the default, so not need to define them on our
side.
2023-05-25 18:38:19 +02:00
Yohan Boniface
4244fba5af Auth: mark id as protected, otherwise social-core try to create
new account at each login:

```
  File "/srv/umap/venv/lib/python3.10/site-packages/social_core/backends/base.py", line 83, in pipeline
    out = self.run_pipeline(pipeline, pipeline_index, *args, **kwargs)
  File "/srv/umap/venv/lib/python3.10/site-packages/social_core/backends/base.py", line 113, in run_pipeline
    result = func(*args, **out) or {}
  File "/srv/umap/venv/lib/python3.10/site-packages/social_core/pipeline/user.py", line 122, in user_details
    strategy.storage.user.changed(user)
  File "/srv/umap/venv/lib/python3.10/site-packages/social_django/storage.py", line 16, in changed
    user.save()
django.db.utils.IntegrityError: duplicate key value violates unique constraint "auth_user_username_key"
DETAIL:  Key (username)=(xxxxx) already exists.
```
2023-05-25 18:34:55 +02:00
Yohan Boniface
bede103109 1.2.5 2023-05-12 17:38:41 +02:00
Yohan Boniface
5c431aa9b9 Do not deal with gzip while serving without x-accel-redirect
Let's keep this path simple, as it should not be used in normal
production context.
2023-05-12 17:36:40 +02:00
Yohan Boniface
a15362e15d Use If-Unmodified-Since istead of If-Match
If-Match relies on ETag, which depends on the Content-Encoding,
which is more fragile given we updated the etag on save, while normal
files are served by nginx. So this may occurs false mismatch.
2023-05-12 17:35:47 +02:00
Yohan Boniface
8294f896c4 Refactor gzip creation 2023-05-12 17:33:06 +02:00
Yohan Boniface
b146f8066e Prevent caching datalayer's data for owners/editors
cf #1038
2023-05-12 17:26:56 +02:00
Yohan Boniface
3f64b0f678 Use Nginx ETag algo
There is a situation where the ETag can be generated by Nginx,
but then used by Django: when the user starts editing a layer,
the js client will send the ETag received from Nginx to uMap
as value to check is there is an editing conflict.
2023-05-12 17:26:23 +02:00
Yohan Boniface
0454fe0c50 Add Vary: Accept-Encoding header 2023-05-12 17:26:10 +02:00
Yohan Boniface
bdafdf23e1 ETag must be between double quotes per spec 2023-05-12 17:25:59 +02:00
Yohan Boniface
cf149bc450 Allow to create search index without changing unaccent mutability
cf #519
2023-05-12 17:05:38 +02:00
Yohan Boniface
1194bd3b77 Initialize STATICFILES_DIRS
fix #1060
2023-05-12 17:00:45 +02:00
Luc Didry
9e42f3c6ff 🐛 — Allow to use SHA1-signed anonymous edit URL
The default django.core.signing Signer uses SHA256 algorithm since Django 3.
Umap used Django 2 in the paste, so people had SHA1 signed anonymous edit URLs,
which became unusable when umap switch to Django 3.
This commit makes them usable again (the new SHA256-signed anonymous edit URLs
still works, obviously).
2023-05-12 17:00:31 +02:00
Yohan Boniface
aed2e14b86 black on decorators.py 2023-05-12 16:59:37 +02:00
Yohan Boniface
f09aea8daf Remove unused code 2023-05-12 16:59:30 +02:00
Yohan Boniface
fa981f8665 1.2.4
Cherry-picked from master packages upgrades and related.
2023-03-02 10:19:47 +01:00
Yohan Boniface
90a0c0b656 bump social-auht-core 2023-03-02 10:17:47 +01:00
Yohan Boniface
9ecb5506b4 Bump requests 2023-03-02 10:17:35 +01:00
Yohan Boniface
7ef6addc5c bump psycopg2 2023-03-02 10:17:27 +01:00
Yohan Boniface
61d2fdaab4 Pump Pillow 2023-03-02 10:17:18 +01:00
Yohan Boniface
2ef9fd4476 Add missing migration 2023-03-02 10:17:01 +01:00
Yohan Boniface
6b4867ab32 black on views.py 2023-03-02 10:16:20 +01:00
Yohan Boniface
5b143087b9 black on urls.py 2023-03-02 10:16:07 +01:00
Yohan Boniface
d1824e04df Prepare for Django 4.x 2023-03-02 10:15:56 +01:00
Aleksejs Popovs
8cad2923b2 Declare incompatibility with Django 4 2023-03-02 10:15:27 +01:00
Yohan Boniface
713f3a3e7b chore: remove requirements files 2023-03-02 10:15:07 +01:00
Yohan Boniface
cfb2cb1675 chore: upgrade pillow, psycopg and requests 2023-03-02 10:14:59 +01:00
Yohan Boniface
4745f0adce fix: fix version import from context processors 2023-03-02 10:14:50 +01:00
Yohan Boniface
6ce203d523 chore: remove mkdocs warning about "pages" replaced by "nav" 2023-03-02 10:14:30 +01:00
Yohan Boniface
6b1e286aee chore: bump dev requirements 2023-03-02 10:14:22 +01:00
Yohan Boniface
fc1cc2af05 chore: use setup.cfg 2023-03-02 10:14:15 +01:00
Yohan Boniface
c01e972506 chore: i18n 2023-03-02 10:13:54 +01:00
Ansgar Hegerfeld
f5336c8441 Fix German typo 2023-03-02 10:13:43 +01:00
Yohan Boniface
ccc73961e6 i18n 2023-03-02 10:13:29 +01:00
Yohan Boniface
5b6bfa0cf0 fix english typo 2023-03-02 10:13:11 +01:00
Yohan Boniface
61a521aa68 Travis stuff 2023-03-02 10:09:54 +01:00
dependabot[bot]
952bcc138d Bump django from 3.2.4 to 3.2.5
Bumps [django](https://github.com/django/django) from 3.2.4 to 3.2.5.
- [Release notes](https://github.com/django/django/releases)
- [Commits](https://github.com/django/django/compare/3.2.4...3.2.5)

---
updated-dependencies:
- dependency-name: django
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-02 10:08:59 +01:00
Yohan Boniface
8522a3c034 Use correct JSONField 2023-03-02 10:08:49 +01:00
Yohan Boniface
b0a4ad394b Make Django with DEFAULT_AUTO_FIELD setting 2023-03-02 10:08:38 +01:00
Yohan Boniface
f76b14fa22 social-auth-app-django==5.0.0 2023-03-02 10:08:13 +01:00
dependabot[bot]
191ef1b9c4 Bump pillow from 8.0.1 to 8.3.2
Bumps [pillow](https://github.com/python-pillow/Pillow) from 8.0.1 to 8.3.2.
- [Release notes](https://github.com/python-pillow/Pillow/releases)
- [Changelog](https://github.com/python-pillow/Pillow/blob/master/CHANGES.rst)
- [Commits](https://github.com/python-pillow/Pillow/compare/8.0.1...8.3.2)

---
updated-dependencies:
- dependency-name: pillow
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-02 10:07:56 +01:00
dependabot[bot]
b92571fa82 Bump django from 3.2.3 to 3.2.4
Bumps [django](https://github.com/django/django) from 3.2.3 to 3.2.4.
- [Release notes](https://github.com/django/django/releases)
- [Commits](https://github.com/django/django/compare/3.2.3...3.2.4)

---
updated-dependencies:
- dependency-name: django
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-02 10:07:46 +01:00
Yohan Boniface
40696e5bb8 First attempt to upgrade to Django 3.X
Bloqued by https://github.com/peopledoc/django-agnocomplete/issues/119
2023-03-02 10:07:10 +01:00
Yohan Boniface
953e8eea52 1.2.3 2020-11-09 09:18:44 +01:00
Yohan Boniface
264b2aaa5f Update Django to 2.2.17 2020-11-09 09:11:37 +01:00
Yohan Boniface
a719bdaa38 chore(travis): remove python 3.5, add 3.7, 3.8 and 3.9 2020-11-09 08:18:58 +01:00