Individual skill
orchardcore-content-access-control
Skill for role-based content access control in Orchard Core with the CrestApps Content Access Control module. Covers restricting who can view a content item by the roles picked on a RolePickerPart, the Restrict content setting RolePickerPartContentAccessControlSettings, how RoleBasedContentItemAuthorizationHandler evaluates ViewContent, the Administrator bypass, named attachments, migrations, recipes, and the 3.0 change that makes restrictions apply even when View content is already granted. Use this skill when requests mention Orchard Core Content Access Control, restricting content by role, role-based content viewing, members-only content items, or RolePickerPart access settings. Strong matches include CrestApps.OrchardCore.ContentAccessControl, CrestApps.OrchardCore.Roles, RoleBasedContentItemAuthorizationHandler, RolePickerPartContentAccessControlSettings, IsContentRestricted and CommonPermissions.ViewContent.
src/CrestApps.AgentSkills/crestapps-orchardcore/orchardcore-content-access-control/SKILL.md
Source commit d86d04f234b1b2bd8145368a2544490f9d557596
What was checked
- Matches the observed repository HEAD
- Yes
- Scanner rules are current
- Yes
- Repository scan complete
- No
- Skill scan complete
- Yes
- Observed behavior
- Instructions only
- Last checked
- Nov 6, 2026
These are observations at the recorded commit, not a guarantee of safety. Review the source before running it.
Install this skill
Choose an agent in your Stack or copy a command below. Commands fetch the pinned commit and copy only this skill directory. Existing destinations are refused. Copying a command does not install anything.
An install command is unavailable: current rules, complete repository and skill scans, an eligible behavior level and a permitted license are required.
Repository context
- Repository stars (not skill ratings)
- 13
- Repository last updated
- Oct 21, 2026
- License
- MIT
Observed agent integration: No specific integration evidence. Standard SKILL.md installation does not imply verified compatibility.
- agent-skills Repository topic
- ai Repository topic
- ai-agents-framework Repository topic
- dotnet Repository topic
- mcp Repository topic
- mcp-server Repository topic
- orchardcore Repository topic
- writing Derived category
Files and excerpt
File metadata and permitted, redacted excerpts come from the recorded scan. Source links are pinned to that commit.
Browse files
SKILL.mdcore · 9,196 bytes
Read excerpt
# CrestApps Content Access Control
## Restrict content items by role
You are an Orchard Core expert. Content Access Control (`CrestApps.OrchardCore.ContentAccessControl`) restricts who may view individual content items. It adds a **Restrict content?** setting to each `RolePickerPart` attached to a content type; when it is on, the roles picked on an item decide who may view that item.
### Guidelines
- Install `CrestApps.OrchardCore.ContentAccessControl` in the web or startup project and enable the feature. It depends on `CrestApps.OrchardCore.Roles` (Enhanced Roles), which provides `RolePickerPart`; see the `orchardcore-crestapps-roles` skill.
- Attach a `RolePickerPart` to the type first; **Restrict content?** appears in that part's settings.
- Only `CommonPermissions.ViewContent` checked against a `ContentItem` resource is affected. Edit, publish and delete checks are not.
- Use `RolePickerPartSettings.ExcludedRoles` to keep roles such as `Administrator`, `Authenticated` and `Anonymous` out of the picker.
- Code that shows content without calling `IAuthorizationService.AuthorizeAsync(user, CommonPermissions.ViewContent, contentItem)` is not protected; authorize every item you render from custom queries, APIs or lists.
- Enable `CrestApps.OrchardCore.Recipes` for schema support of `RolePickerPartContentAccessControlSettings`.