Try our conversational search powered by Generative AI!

Hiding tabs on pagetype depending on user group

Vote:
 

Is it possible to hide/display the tabs that are displayed when editing a page on different groups.

 I know that I can hide/display the tabs depending on "accessright" but I would like to do it by groups if it's possible.

/Per

#25246
Oct 16, 2008 11:05
Vote:
 

You could try this in Global.asax.cs:

public void Application_Start(object sender, EventArgs e) {
   EditPanel.LoadedPage += new LoadedPageEventHandler(EditPanel_LoadedPage);
}

private void EditPanel_LoadedPage(EditPanel sender, LoadedPageEventArgs e) {
   if (e.Page.PageTypeName != "MyPageTypeName") // Modify this
      return;

   int tabIdToHide = 10; // Modify this

   foreach (PropertyData prop in e.Page.Property) {
      if (prop.OwnerTab == tabIdToHide && !EPiServer.Security.PrincipalInfo.CurrentPrincipal.IsInRole("MyRole"))
         prop.OwnerTab = -1;
   }
}

#25286
Edited, Oct 17, 2008 10:34
Vote:
 
I guess that code is for CMS 5? Coould it be done in a similiar way in 4.62B
#25334
Oct 21, 2008 13:55
* 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.