Comments (1)
Hi!
I had the same concern and had to override the default MenuItem.cshtml view to modify its behaviour.
@inject Etch.OrchardCore.ContentPermissions.Services.IContentPermissionsService ContentPermissionsService
@{
// We are modifiyng the default behaviour to check for permissions
if (!ContentPermissionsService.CanAccess(Model.ContentItem))
{
return;
}
TagBuilder tag = Tag(Model, "li");
// Morphing the shape to keep Model untouched
Model.Metadata.Alternates.Clear();
Model.Classes.Clear();
Model.Metadata.Type = "MenuItemLink";
tag.InnerHtml.AppendHtml(await DisplayAsync(Model));
if ((bool)Model.HasItems)
{
tag.InnerHtml.AppendHtml("<ul>");
foreach (var item in Model.Items)
{
tag.InnerHtml.AppendHtml(await DisplayAsync(item));
}
tag.InnerHtml.AppendHtml("</ul>");
}
}
@tag
from etch.orchardcore.contentpermissions.
Related Issues (13)
- Sharing at user level HOT 5
- Is it possible to apply this to workflows?
- Optionally allow a page to also block backend access in the admin
- Guarantee Administrators have full access to all content
- Abstract away dependency on roles for controlling access HOT 2
- Which friend can help me? How to use this feature correctly?
- Implement default fail-to-secure HOT 1
- Check out Lombiq NuGet publish workflow HOT 2
- Hiding Widget HOT 6
- Question: Can this module also be used to set content item level permissions by code? HOT 1
- Support 404 behavior
- Support ~/-based redirect HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from etch.orchardcore.contentpermissions.