Overwrite a workspace action permissions only
# package-development
w
Is it possible to overwrite a Workspace Action such as Save & Publish conditions only?
I know I can overwrite the workspace action & replace with a different element, but seems overkill when I want to use just a condition to show/hide the default Save & Publish button based on my custom condition. So can it be done or do I really have to implement the element all over again in order for it to work ?!
Was hoping to just update/overwrite the existing parts of the manifest by doing something like this
Copy code
ts
const workspaceActionManifests: Array<ManifestWorkspaceActions> = [
    {
        type: 'workspaceAction',
        overwrites: 'Umb.WorkspaceAction.Document.SaveAndPublish', // Alias of thing you want to overwrite
        alias: 'mything.saveandpublish',
        name: '[My Thing] Save and Publish Workspace Action',
        weight: 70,
        meta: {
            look: 'primary',
            color: 'positive',
            label: 'Awesome Save & Publish' // Update the text of the button
        },
        conditions: [
            {
                alias: 'Umb.Condition.WorkspaceAlias',
                match: 'Umb.Workspace.Document',
            },
            {
                alias: 'ShowOrHideConditionAlias'
            }
        ]
    },  
];
3 Views