SaaS CMS has officially launched! Learn more now.

Disable page move and delete for editors with access to a single language version


There is a possibility to restrict editors create/edit access to one or more specific languages in Episerver. But move/delete actions can't be restricted, so editors still can move/delete entire page including all descendants if they have create/edit access to any language version of a page.

This is a usual demand from our customers with multi-language websites with a shared page tree, which is a powerful Episerver use case comparing to other CMS like Umbraco. If an editor doesn't have access to other language versions of a page, he shouldn't be able to move/delete the page, because he is not authorized to change content/structure in other languages.

Sep 01, 2016 12:42

Thanks for the feedback. Are you looking to have a separation between people who can change the contents of a page, and people who can modify the structure of a site? In other words, do you also see a need to have people that can modify all language content, but never move pages around?

Sep 07, 2016 19:19

Hi Martin. There is a possibility to do that by disabling "Delete" access to such editors, so they would be able to edit content, but not changing the structure or delete pages. But our usual case is each country has its own editor who manages all content and structure for one language. And the problem that these editors still can occasionally change structure or delete pages in other languages.

Currently I'm using page "Moving" event handler to restrict access, but I think logically this should work out-of-box:

var contentEvents = ServiceLocator.Current.GetInstance<IContentEvents>();
contentEvents.MovingContent += Events_MovingContent;

private void Events_MovingContent(object sender, ContentEventArgs e)
    if (!(e.Content is PageData))

    var languages = ServiceLocator.Current.GetInstance<ILanguageBranchRepository>();
    var versions = ServiceLocator.Current.GetInstance<IContentVersionRepository>();

    var pageVersions = versions.ListPublished(e.Content.ContentLink);
    var pageLanguages = languages.ListEnabled()
        .Where(lb => pageVersions.Any(v => v.LanguageBranch == lb.LanguageID))

    if (pageLanguages.Any(lang => !lang.ACL.QueryDistinctAccess(AccessLevel.Edit)))
        var action = e.TargetLink == ContentReference.WasteBasket ? "remove" : "move";

        e.CancelAction = true;
        e.CancelReason = $"You can't {action} the page, because it contains other language versions you don't have access to.";
Sep 13, 2016 9:47

Thanks for sharing that snippet. So if I understand correctly, you have a single content tree shared by multiple country sites, where every country manages their own variation of the structure. Re-using some of the shared structure, and in places overriding with their own structure?

Sep 13, 2016 11:53

Yep, exactly. We have a master site in English with general structure and country editors translate existing main pages, but countries also have unique pages and sections.

Sep 13, 2016 12:01

That makes sense, and it's a pattern I see used often so would like to support it better. Nothing on the official roadmap yet though.

Sep 13, 2016 13:09
This thread is locked and should be used for reference only.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.