erpnext-permissions

Implement deterministic ERPNext permission patterns for roles, user permissions, and data masking.

163|53|Updated Jan 14, 2026
One-click install
npx skills add https://github.com/OpenAEC-Foundation/ERPNext_Anthropic_Claude_Development_Skill_Package --skill erpnext-permissions
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: erpnext-permissions
Source: https://github.com/OpenAEC-Foundation/ERPNext_Anthropic_Claude_Development_Skill_Package/tree/main/skills/source/core/erpnext-permissions
Command: npx skills add https://github.com/OpenAEC-Foundation/ERPNext_Anthropic_Claude_Development_Skill_Package --skill erpnext-permissions

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

ERPNext permissions are complex and error-prone; this skill provides a comprehensive, deterministic framework to implement and audit access control across DocTypes, roles, user permissions, perm levels, hooks, and data masking.

Core Features & Use Cases

  • Five-layer permission model: Role Permissions, User Permissions, Perm Levels, Permission Hooks, Data Masking.
  • Provides patterns for deny-by-default, owner-based access, and query-based filtering to enforce security across ERPNext apps.
  • Real-world use: secure access to customer data, restrict sensitive fields via perm levels, and implement custom permission hooks for business rules.

Quick Start

Implement a basic permission hook that denies write access to cancelled documents, then expand to a full multi-layer policy across roles, user permissions, and data masking.

Frequently Asked Questions about erpnext-permissions

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

FAQPage Schema
How do I implement secure ERPNext user permissions across multiple layers?

Implement secure ERPNext user permissions by applying a deterministic five-layer model covering Role Permissions, User Permissions, Perm Levels, Permission Hooks, and Data Masking. This framework ensures safe, auditable access controls across DocTypes for production deployments.

What is the best way to restrict access to sensitive fields in Frappe DocTypes?

The best way to restrict access to sensitive fields in Frappe DocTypes is using Perm Levels to enforce field-level security. This approach is part of a deterministic permission pattern that includes deny-by-default rules and query-based filtering to secure customer data.

How do ERPNext permission hooks work for custom business rules?

ERPNext permission hooks work by executing custom logic through has_permission hooks and doc.check_permission before access is granted. They allow you to enforce business rules like denying write access to cancelled documents, creating safe and auditable access controls.

Can I use data masking to enforce security in ERPNext v14 to v16?

Yes, you can use data masking to enforce security in ERPNext v14 through v16. It operates as the fifth layer of a deterministic permission framework, restricting sensitive field visibility alongside Role Permissions, User Permissions, Perm Levels, and Permission Hooks.

Why does my ERPNext get_list filtering bypass role permissions?

ERPNext get_list filtering may bypass role permissions if proper escaping and query conditions are not applied. To build safe, auditable access controls, you must implement deterministic permission query conditions that enforce deny-by-default and owner-based access rules.

When do I need custom permission query conditions in an ERPNext app?

You need custom permission query conditions in an ERPNext app when standard role permissions are insufficient to secure customer data. They provide deterministic query-based filtering and multi-layer permission checks to enforce security across development and production environments.