0
votes

Currently we have a custom workflow with author and editor roles, the workflow will auto-publish items when they reach the final state. Both roles are able to create and edit alias to the pages by going to Presentation -> Aliases.

The problem is, that none of these users can publish the alias changes, since the alias folder is in /sitecore/system/aliases and only admin users have visibility of this folder

How can i handle the aliases related to a page to auto-publish when the item is approved?

1

1 Answers

1
votes

The easiest solution might be to just specifically add permissions for the roles to /sitecore/system/aliases... ? This process you are doing manually I take it? Are new aliases going through workflow also?

Barring that, you could create a new workflow action that looks for the item's referers and then publishes those found in /sitecore/system/aliases.

Edit:

Sitecore.Links.LinkDatabase ld = Sitecore.Globals.LinkDatabase;
Sitecore.Links.ItemLink[] links = ld.GetReferers(myItem);

foreach(Sitecore.Links.ItemLink link in links)
{
    Item sourceItem = link.GetSourceItem();
    //if this item is an alias, publish it
}