Commit graph

1098 commits

Author SHA1 Message Date
David Larlet
4ba1946868
Fix test about subject
Introduced in 5460876ff4
2023-06-02 11:54:44 -04:00
David Larlet
bf4a84de99
Apply black on test map views file 2023-06-02 11:54:09 -04:00
David Larlet
725feb8d01
Fallback to copy to clipboard without HTTPS 2023-06-02 11:50:03 -04:00
David Larlet
ca97a4d745
Bump constrasts on buttons 2023-06-02 11:41:40 -04:00
Yohan Boniface
309db975af
Merge branch 'master' into master 2023-06-02 17:34:49 +02:00
Yohan Boniface
5460876ff4
Update umap/views.py
Co-authored-by: David Larlet <3556+davidbgk@users.noreply.github.com>
2023-06-02 17:33:09 +02:00
Yohan Boniface
3722eacb08 Remove django-leaflet-storage and leaflet.storage from README
Those have been integrated into uMap itself since 1.0
2023-06-02 16:49:50 +02:00
Yohan Boniface
d180caa0d5 Fix closing alert on callback 2023-06-01 09:32:44 +02:00
Yohan Boniface
cfe6bdf2a8 Fix closing the alert when clicking on an action button 2023-05-31 18:40:52 +02:00
Yohan Boniface
5d6afdfb1b Add a "Copy link" button near to the anonymous edit link 2023-05-31 18:32:51 +02:00
Yohan Boniface
8f77b63b08 Changed working of edit link alert + added a carriage return 2023-05-31 17:33:05 +02:00
Yohan Boniface
7c2ba9d3e8 Add doc for email sending 2023-05-31 17:26:48 +02:00
Yohan Boniface
e0760ca403 Only ask to send edit link if email has been set up 2023-05-31 17:20:22 +02:00
Yohan Boniface
8f52d34bb2 WIP: final bit to make sending edit link working 2023-05-31 17:05:57 +02:00
Yohan Boniface
eb32dcc9b6 Make that Map.get_anonymous_edit_url returns full URL 2023-05-31 16:30:07 +02:00
Yohan Boniface
7f2545f09b Allow to use Infinity for an alert duration 2023-05-31 16:16:31 +02:00
Yohan Boniface
69bf6593ac (WIP) Add a button to send edit link by email in anonymous mode 2023-05-31 14:50:43 +02:00
Yohan Boniface
7713281f8c 1.3.0 2023-05-31 10:36:01 +02:00
Yohan Boniface
b61b5a48a3 Fix wrong assignement to const 2023-05-31 10:22:37 +02:00
Yohan Boniface
2c451a2941 i18n 2023-05-31 09:57:02 +02:00
Yohan Boniface
71293d3d8b changelog 2023-05-31 09:35:00 +02:00
Yohan Boniface
945042a65f i18n 2023-05-31 09:14:32 +02:00
Yohan Boniface
1cd75c5ccb
Merge pull request #1113 from umap-project/420-zoom-set
Better zoom set/modified wording
2023-05-31 09:09:38 +02:00
David Larlet
0b76ebb259
Apply black to models.py 2023-05-30 20:41:32 -04:00
David Larlet
2c2bd10e27
Better zoom set/modified wording
Fix #420, hopefully the fuzzy translations will be updated!
2023-05-30 18:29:57 -04:00
David Larlet
b6628a3015
Merge pull request #1112 from umap-project/1095-read-only-banner
Banner + no create buttons when in read only mode
2023-05-30 18:25:33 -04:00
David Larlet
3f28c04241
Banner + no create buttons when in read only mode
Fix #1095
2023-05-30 16:17:12 -04:00
David Larlet
0cd1cf4ffc
Merge pull request #1094 from umap-project/use-dompurify
Use DOMPurify to escape malicious input from user
2023-05-30 15:49:29 -04:00
David Larlet
51c22e93ce
Merge pull request #1111 from umap-project/lebab-template
Apply Lebab for template conversions
2023-05-30 15:46:34 -04:00
David Larlet
0a75998f11
Apply Lebab for template conversions 2023-05-30 14:53:53 -04:00
David Larlet
4a3c845eca
Handle iframes and target attribute with dompurify 2023-05-30 14:23:06 -04:00
David Larlet
fa3d653944
Update the test template to add the purify depency 2023-05-30 14:23:05 -04:00
David Larlet
3122286c8e
Use DOMPurify in escapeHTML() for a global impact 2023-05-30 14:22:04 -04:00
David Larlet
fd3f854a9c
Use DOMPurify to escape malicious input from user 2023-05-30 14:22:04 -04:00
David Larlet
4f5674073f
Merge pull request #1098 from umap-project/lebab-let-const
Apply Lebab for let/const conversions
2023-05-30 14:19:27 -04:00
David Larlet
8d6185c476
Manual review of Lebab for let/const conversions 2023-05-30 14:16:10 -04:00
David Larlet
56ce9ae22c
Apply Lebab for let/const conversions
As far as I understand, it default to `let` in these cases because the tool cannot figure out if a `const` is possible. It has to be checked manually:

```
./node_modules/lebab/bin/index.js --replace "umap/static/umap/js/*.js" --transform let
umap/static/umap/js/umap.xhr.js:
228:  warning  Unable to transform var  (let)
umap/static/umap/js/umap.ui.js:
83:  warning  Unable to transform var  (let)
umap/static/umap/js/umap.slideshow.js:
15:  warning  Unable to transform var  (let)
83:  warning  Unable to transform var  (let)
umap/static/umap/js/umap.popup.js:
100:  warning  Unable to transform var  (let)
umap/static/umap/js/umap.permissions.js:
14:  warning  Unable to transform var  (let)
umap/static/umap/js/umap.layer.js:
195:  warning  Unable to transform var  (let)
436:  warning  Unable to transform var  (let)
568:  warning  Unable to transform var  (let)
584:  warning  Unable to transform var  (let)
989:  warning  Unable to transform var  (let)
1088:  warning  Unable to transform var  (let)
1098:  warning  Unable to transform var  (let)
umap/static/umap/js/umap.js:
124:  warning  Unable to transform var  (let)
223:  warning  Unable to transform var  (let)
343:  warning  Unable to transform var  (let)
376:  warning  Unable to transform var  (let)
406:  warning  Unable to transform var  (let)
849:  warning  Unable to transform var  (let)
732:  warning  Unable to transform var  (let)
948:  warning  Unable to transform var  (let)
959:  warning  Unable to transform var  (let)
878:  warning  Unable to transform var  (let)
1085:  warning  Unable to transform var  (let)
umap/static/umap/js/umap.icon.js:
145:  warning  Unable to transform var  (let)
184:  warning  Unable to transform var  (let)
umap/static/umap/js/umap.forms.js:
453:  warning  Unable to transform var  (let)
umap/static/umap/js/umap.features.js:
15:  warning  Unable to transform var  (let)
101:  warning  Unable to transform var  (let)
143:  warning  Unable to transform var  (let)
373:  warning  Unable to transform var  (let)
429:  warning  Unable to transform var  (let)
890:  warning  Unable to transform var  (let)
949:  warning  Unable to transform var  (let)
umap/static/umap/js/umap.core.js:
149:  warning  Unable to transform var  (let)
175:  warning  Unable to transform var  (let)
umap/static/umap/js/umap.controls.js:
665:  warning  Unable to transform var  (let)
876:  warning  Unable to transform var  (let)
1249:  warning  Unable to transform var  (let)
```
2023-05-30 14:16:09 -04:00
Yohan Boniface
99b2bfb811 i18n 2023-05-30 17:52:33 +02:00
Yohan Boniface
7c2b7ac309 Simplify exlude of folder when running make messages 2023-05-30 17:52:32 +02:00
David Larlet
c42a08b3bc
Merge pull request #1110 from umap-project/add-editinosm-icon
Add missing edit-in-osm icon
2023-05-30 11:49:04 -04:00
Yohan Boniface
eaef600a97 Add missing edit-in-osm icon
fix #1096
2023-05-30 15:58:29 +02:00
Yohan Boniface
bd769091a7
Merge pull request #1109 from umap-project/direct-link
Also expose direct map URL in the export panel
2023-05-30 14:50:45 +02:00
Yohan Boniface
c52e093db8 Also expose direct map URL in the export panel
cf #699
2023-05-30 11:04:10 +02:00
Yohan Boniface
2f79078141
Merge pull request #1108 from umap-project/fix-js-tests
Fix JS tests
2023-05-30 08:46:38 +02:00
Yohan Boniface
50091ec0fa Redirect to "user_maps" at login end when window.opener is not accessibile
This is the case for Twitter.
We'll try to refactor the process later, but let's make it "acceptable"
for now.

cf #1097
2023-05-30 08:42:23 +02:00
Yohan Boniface
18232bcad0 Rename class to match switching to Twitter OAuth V2 2023-05-30 08:42:23 +02:00
Yohan Boniface
7b65820b73 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-30 08:42:23 +02:00
Yohan Boniface
a462a58ae0 Remove SOCIAL_AUTH_PIPELINE from settings/base.py
We are using the default, so not need to define them on our
side.
2023-05-30 08:42:23 +02:00
Yohan Boniface
9ca5ba974b 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-30 08:42:23 +02:00
David Larlet
23053a26fc Correct tests fixtures for options permissions 2023-05-26 14:12:08 -04:00