/orocommerce-skills:oro-securityfrom orocommerce-skills
Use when configuring OroCommerce v6.1 ACL, permissions, and access control — setting up entity permissions (acls.yml), ownership types, Acl/AclAncestor PHP attributes on controllers, custom permissions, field-level ACL, access rules for query filtering, or debugging permission issues. Relevant when the user mentions 'ACL', 'permissions', 'access control', 'ownership', 'security', 'acls.yml', 'field ACL', 'access rules', or any OroCommerce authorization task.
Ships in orocommerce-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Place in Resources/config/oro/acls.yml:
acls:
acme_demo_document_view:
type: entity
class: Acme\Bundle\DemoBundle\Entity\Document
permission: VIEW
description: View documents
acme_demo_document_edit:
type: entity
class: Acme\Bundle\DemoBundle\Entity\Document
permission: EDIT
Key structure: type: entity, class (FQCN), permission (VIEW, CREATE, EDIT, DELETE, ASSIGN, EXECUTE).
Declare ACL requirements directly on controller methods:
use Oro\Bundle\SecurityBundle\Attribute\Acl;
class DocumentController
{
#[Acl(
id: 'acme_demo_document_view',
type: 'entity',
class: 'Acme\Bundle\DemoBundle\Entity\Document',
permission: 'VIEW'
)]
public function viewAction(Document $document)
{
// ACL is checked before this method executes
}
}
Attributes are preferred over YAML bindings — they're colocated with the code they protect and type-safe.
Ownership determines who can access an entity. Four scopes: USER, BUSINESS_UNIT, ORGANIZATION, GLOBAL.
CRITICAL: If ownership is USER or BUSINESS_UNIT, the entity MUST have an organization field. Missing it causes permission checks to fail silently.
Define in Resources/config/oro/entity.yml:
entities:
Acme\Bundle\DemoBundle\Entity\Document:
ownership:
owner_type: USER
owner_field_name: owner
organization_field_name: organization
ACL checks do NOT happen automatically on queries. You must explicitly apply filtering:
class DocumentRepository
{
public function findApprovedDocuments(User $user)
{
$qb = $this->createQueryBuilder('d')
->where('d.status = :status')
->setParameter('status', 'approved');
$this->aclHelper->apply($qb);
return $qb->getQuery()->getResult();
}
}
Without $aclHelper->apply($qb), the query returns all entities regardless of permissions.
For custom access rules (AccessRuleInterface), see security-patterns.md.
Query filtering is not automatic: Must call $aclHelper->apply($qb) explicitly. Common mistake: fetching all entities and filtering in PHP rather than at DB level.
AclAncestor skips object-level checks: Use AclAncestor only for class-level permission verification (list pages). For specific objects, use full Acl attributes or isGranted().
Organization field is mandatory for USER/BUSINESS_UNIT ownership: Omitting it causes permission checks to return false unexpectedly.
For AclAncestor details, custom permissions, field-level ACL, common patterns, debugging, and additional pitfalls, see security-patterns.md.
See permission-matrix.md for the full permission/ownership matrix and v6.1 notes.
What SKILL.md sets; muted values are Claude Code's defaults
14 skills in this plugin
/oro-apiUse when exposing OroCommerce v6.1 entities via REST API, configuring api.yml or api_frontend.yml, creating custom API processors, setting up filters/sorters/subresources, or working with JSON:API endpoints. Relevant when the user mentions 'API endpoint', 'expose entity via API', 'api.yml', 'REST API', 'JSON:API', 'storefront API', or 'API processor'./oro-behat-ciUse when running Oro Commerce 6.1 Behat tests in CI/CD — Jenkins (Oro's canonical platform), GitLab CI (community territory per oroinc/platform#954), or any Docker pipeline. Covers compose fanout, headless Chrome, the formatter combo, consumer parallelisation maths, artifacts and init-image state transfer. Also on sight of .gitlab-ci.yml, Jenkinsfile, compose behat stages, compose-common.yaml. Triggers on 'behat ci', 'gitlab ci oro', 'jenkins oro', 'parallel behat', 'chrome headless', 'init-test image', 'behat hang'./oro-behat-debuggingorocommerce@netresearch-claude-code-marketplace is listed by netresearch/claude-code-marketplace — review the source before installing
npx claudepluginhub netresearch/claude-code-marketplace --plugin orocommerce