EPiServer 7.5 - Report Centre Permission

Vote:
 

Hi

We developed custom report using episerver gui plugin , everything works as expected, but we also want to hide "Report" tab from the CMS menu from the admin.

I removed the user from WebAdmin and Administrator permission group, so user was not able to see the admin tab after he logged in, but the "report" tab is showing under the CMS tab, I couldn't find any settings to hide this. 

The only solution I found so far is to explicitly adding in the web.config to prevent user access to this page, but it looks urgly as user who doesn't have clicked on this link, it will show a popup windows with login. 

Can you guys suggest a best way to handle this?

#122869
Jun 17, 2015 4:53
Vote:
 

In latest EPiServer version code that regulates its availability is following:

menuItem.IsAvailable = (request => PrincipalInfo.HasEditAccess);

I guess it's the same for older versions as well.

"HasEditAccess" basically checks whether current user can go to "/episerver/cms/edit" (episerver may be replaced by your UI path). In geneal that would mean that all Editors will have access to "ReportCenter".

#122871
Jun 17, 2015 7:40
Vote:
 

Hi Valdis

Thank you  for your fast reply. 

Where did you find that code? 

menuItem.IsAvailable = (request => PrincipalInfo.HasEditAccess);

I have open the EPiServer.Cms.Shell.UI package, but have no clue which file need to be modified . Can you provide some details how to change it to WebAdmin/Administrator?

Thanks

#122926
Jun 18, 2015 0:58
Vote:
 

It's inside class named "EPiServer.Cms.Shell.UI.CmsMenuProvider". I guess you can't really change it without modifying source code. I can image some sort of interception of the menu provider and replace it with your own, but that's extreme case.

#122927
Jun 18, 2015 7:06
* 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.