November Happy Hour will be moved to Thursday December 5th.

Group/Editor permission for languages

Vote:
 

I have an issue with a large globalized website with alot of languages in EPiServer.

At the moment we have used different nodes for each language, with each spoken language for that country. With this, we have assigned access rights to the node-treew using Editors (e.g NL has EditorsNL). Several of the nodes has Spoken languages as well. For example, the Netherlands has nl-BE and nl-DE.

Example structure: /NL/asd/BE/ /NL/asd/DE/

This causes alot of confusions and misses when the translation begins.

I need one tree structure with the languages and set editor access rights depending on what group or editor they are in. Anyone have any tips on what class to use or point me in some direction where to start?

#33136
Oct 02, 2009 16:21
Vote:
 

If I have understod you correctly your propblem is that EPiServer can only set access for a page. And that page can be in many languages. You therefore need to add to episerver a check for edit rights to a spesific languages.

you could do:

make logical groups like  Allow_nl-BE,Allow_nl-DL

assign these groups to the users that should be allowed to edit that language

Add DataFactory.Instance.SavingPage+=DontAllowSaving;

private static void DontAllowSaving(object sender, PageEventArgs e)
{
    if (HttpContext.Current != null && EPiServer.Security.PrincipalInfo.Current != null)
    {
        if (
         !EPiServer.Security.PrincipalInfo.Current.RoleList.Contains("Allow_" + e.Page.LanguageID)
            )
        {
            e.CancelAction = true;
            e.CancelReason = "You don't have rights to save this languages";
        }
    }
}
#33158
Oct 02, 2009 21:46
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* 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.