if user can edit metadata of item, should also be able to add annotations for that item. independent of canAddAnnotations rights

This commit is contained in:
j 2021-06-03 16:25:56 +01:00
parent 157cc7478b
commit 166b566fde

View file

@ -4,6 +4,7 @@ pandora.ui.editor = function(data) {
var ui = pandora.user.ui, var ui = pandora.user.ui,
rightsLevel = data.rightslevel, rightsLevel = data.rightslevel,
canEdit = pandora.hasCapability('canEditMetadata') || data.editable,
that = Ox.VideoAnnotationPanel({ that = Ox.VideoAnnotationPanel({
annotationsCalendarSize: ui.annotationsCalendarSize, annotationsCalendarSize: ui.annotationsCalendarSize,
@ -44,7 +45,7 @@ pandora.ui.editor = function(data) {
itemName: pandora.site.itemName, itemName: pandora.site.itemName,
layers: data.annotations.map(function(layer) { layers: data.annotations.map(function(layer) {
return Ox.extend({ return Ox.extend({
editable: layer.canAddAnnotations[pandora.user.level] editable: layer.canAddAnnotations[pandora.user.level] || canEdit
}, layer, { }, layer, {
autocomplete: layer.type == 'entity' autocomplete: layer.type == 'entity'
? function(key, value, callback) { ? function(key, value, callback) {