Entity Signs for anything other than Document Tree

Hi,

For my MediaProtect package I Used some middleware to add a protected Icon in V15/16. With the new Entity Signs/Flagproviders I wanted to update this to this modern approach.

I’ve implemented a flagProvider that returns the correct flag, the following is on the JSON of the tree

 "flags": [
                {
                    "alias": "MediaProtect.IsProtected"
                }
            ],

Then I added the following Manifest code and would have expected that I see a protected icon in the media tree.

 {
    type: "entitySign",
    kind: "icon",
    alias: "MediaProtect.EntitySign.Media.IsProtected",
    name: "Is Protected Media Item Entity Sign",
    forEntityTypes: [UMB_MEDIA_ENTITY_TYPE], // Where it can appear
    forEntityFlags: ['MediaProtect.IsProtected'], // <---Binding part-When it should appear
    weight: 1000,
    meta: {
        iconName: "icon-lock", // Built-in or custom icon name
        label: "Protected", // Visible/accessible label
        iconColorAlias: "red",
    }

When I change UMB_MEDIA_ENTITY_TYPE to UMB_DOCUMENT_ENTITY_TYPE I do see a protected Icon on the documents. Anyone else tried to add this functionality to something other than content and had success?

Thanks,

Richard

Looking at the source It is clear that the whole feature isn’t implemented. Raised a bug Entity Signs (based on Flagproviders ) Is missing for media items · Issue #21786 · umbraco/Umbraco-CMS · GitHub

1 Like