diff --git a/app/assets/javascripts/annotatable.js.coffee b/app/assets/javascripts/annotatable.js.coffee index ddd82e6cf..712500cf3 100644 --- a/app/assets/javascripts/annotatable.js.coffee +++ b/app/assets/javascripts/annotatable.js.coffee @@ -6,11 +6,14 @@ App.Annotatable = ann_id = $this.data("annotatable-id") app = new annotator.App() - .include(annotator.ui.main, { element: this }) - .include(annotator.storage.http, { prefix: "", urls: { search: "/annotations/search" } }) .include -> beforeAnnotationCreated: (ann) -> ann[ann_type + "_id"] = ann_id + ann.permissions = ann.permissions || {} + ann.permissions.admin = [] + .include(annotator.ui.main, { element: this }) + .include(annotator.storage.http, { prefix: "", urls: { search: "/annotations/search" } }) + app.start().then -> app.ident.identity = $('html').data('current-user-id')