ddd-rights-specialist

Implement entity-level access control in mgamadeus/ddd DB repositories.

3|Updated Feb 12, 2024
One-click install
npx skills add https://github.com/mgamadeus/ddd --skill ddd-rights-specialist
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ddd-rights-specialist
Source: https://github.com/mgamadeus/ddd/tree/main/.claude/skills/ddd-rights-specialist
Command: npx skills add https://github.com/mgamadeus/ddd --skill ddd-rights-specialist

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Implement entity-level access control in the mgamadeus/ddd framework to enforce read/update/delete restrictions, property hiding, and role-based governance across DB repositories.

Core Features & Use Cases

  • Support for applyReadRightsQuery, applyUpdateRightsQuery, applyDeleteRightsQuery, and mapToEntity to filter data during load and secure updates, with role-driven controls.
  • Pattern coverage across direct column filters, left-join based rights, subqueries, and multi-hop join chains to model tenant/world/account scoping.
  • Includes RolesRequiredForUpdate on entities and rights snapshots for privileged system operations.

Quick Start

Override the rights methods in your DB repositories and validate end-to-end rights behavior with a test account.

Frequently Asked Questions about ddd-rights-specialist

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement entity-level access control in a PHP DDD repository?

Entity-level access control in a PHP DDD repository is implemented by overriding applyReadRightsQuery, applyUpdateRightsQuery, and applyDeleteRightsQuery methods to filter database operations based on role requirements and property hiding.

What is the best way to secure data updates using role-based access in domain-driven design?

The best way to secure data updates using role-based access in DDD is to define RolesRequiredForUpdate on entities and apply update rights query filters, ensuring only authorized roles can modify restricted records.

Can I bypass access control filters for privileged system operations in DDD repositories?

Yes, you can bypass access control filters for privileged system operations in DDD repositories by utilizing rights snapshots, allowing system processes to execute unrestricted read, update, and delete actions.

How do left-join based filters and subqueries handle tenant scoping in access control?

Left-join based filters and subqueries handle tenant scoping in access control by modeling multi-hop join chains across direct columns, enabling complex tenant, world, and account-level data isolation during repository queries.

Does this DDD rights framework support property hiding after data is loaded?

Yes, this DDD rights framework supports post-load property hiding through the mapToEntity method, allowing you to mask sensitive entity attributes after data is retrieved from the database.