-
Notifications
You must be signed in to change notification settings - Fork 59
Open
Description
The default base ecommerce layout view (_BaseEcommerceLayout.cshtml) uses the following code to determine if the admin bar should be shown:
@if (CurrentRequestData.CurrentUserIsAdmin && SiteSettings<SiteSettings>().EnableInlineEditing)
{
Html.RenderAction("InPageEditor", "InPageAdmin", new { id = Model.Id, area = "Admin" });
}
The problem with this is that it doesn't appear to pickup the ACL rules. To fix this, in my themes I now do the following:
@using MrCMS.ACL.Rules
...
@if (CurrentRequestData.CurrentUser != null && CurrentRequestData.CurrentUser.CanAccess<AdminBarACL>("Show") && SiteSettings<SiteSettings>().EnableInlineEditing)
{
Html.RenderAction("InPageEditor", "InPageAdmin", new { id = Model.Id, area = "Admin" });
}
I copied this code from the core base layout view (_BaseLayout.cshtml).
Chris
Metadata
Metadata
Assignees
Labels
No labels