November Happy Hour will be moved to Thursday December 5th.
AI OnAI Off
November Happy Hour will be moved to Thursday December 5th.
You can turn off image editor for all type of images using web.config.
There is no supported way to turn off images only for one specific type. But I prepared a hack that you could use:
Here is the initializer (that should be registered in module.config):
define([
"dojo/_base/declare",
"epi/_Module",
"epi-cms/command/EditImage"
], function (
declare,
module,
EditImage
) {
return declare([module], {
initialize: function () {
this.inherited(arguments);
var original = EditImage.prototype._onModelChange;
EditImage.prototype._onModelChange = function () {
var result = original.apply(this, arguments);
if (!this.get("isAvailable")) {
return result;
}
var target = this._getSingleSelectionData(),
canExecute = target && target.typeIdentifier !== "alloytemplates.models.media.tiffimagefile";
if (!canExecute) {
this.set("isAvailable", false);
this.set("canExecute", false);
}
return result;
}
}
});
});
My Tiff model looks like this:
[ContentType(GUID = "4D3B327B-4A1C-42ED-9A62-E8D4F925B8F7")]
[MediaDescriptor(ExtensionString = "tif,tiff")]
public class TiffImageFile : ImageData
{
public virtual string Copyright { get; set; }
}
I've created a content type that inherits from ImageData but I don't want the editors to be able to modify the image through the editor. Removing the edit permissions to the image doesn't seem to remove the menu option to open the image editor and only shows an "insufficient permissions" dialog when an editor tries to save the image in the editor.
Is it possible to disable/remove the option "open in image editor" from the UI for a specific content type?