aboutsummaryrefslogtreecommitdiffhomepage
path: root/app/Resources/static/themes/_global/index.js
diff options
context:
space:
mode:
authoradev <adev2000@gmail.com>2017-05-14 11:38:02 +0200
committeradev <adev2000@gmail.com>2017-05-14 11:38:02 +0200
commit60c522899bcfd3aef1a486922e0a9aeb549c0fc8 (patch)
tree448868bf0482c7f4549c0195d691afd5e83859f3 /app/Resources/static/themes/_global/index.js
parent06568b15bb9e9116fa4d4a42246e1b0e497bbf25 (diff)
downloadwallabag-60c522899bcfd3aef1a486922e0a9aeb549c0fc8.tar.gz
wallabag-60c522899bcfd3aef1a486922e0a9aeb549c0fc8.tar.zst
wallabag-60c522899bcfd3aef1a486922e0a9aeb549c0fc8.zip
Fix delete annotation when username is defined
When an user set his name in "Config" > "User Information", he can't delete or update an annotation Fix #2382
Diffstat (limited to 'app/Resources/static/themes/_global/index.js')
-rw-r--r--app/Resources/static/themes/_global/index.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/Resources/static/themes/_global/index.js b/app/Resources/static/themes/_global/index.js
index 00410754..3fdcaa3d 100644
--- a/app/Resources/static/themes/_global/index.js
+++ b/app/Resources/static/themes/_global/index.js
@@ -28,6 +28,11 @@ $(document).ready(() => {
28 element: document.querySelector('article'), 28 element: document.querySelector('article'),
29 }); 29 });
30 30
31 const authorization = {
32 permits() { return true; },
33 };
34 app.registry.registerUtility(authorization, 'authorizationPolicy');
35
31 const x = JSON.parse($('#annotationroutes').html()); 36 const x = JSON.parse($('#annotationroutes').html());
32 app.include(annotator.storage.http, x); 37 app.include(annotator.storage.http, x);
33 38