frappe-errors-permissions

Diagnose Frappe/ERPNext permission errors across hooks, DocPerm, and User Permission rules.

163|53|Updated Jan 14, 2026
One-click install
npx skills add https://github.com/Impertio-Studio/Frappe_Claude_Skill_Package --skill frappe-errors-permissions-impertio-studio
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: frappe-errors-permissions
Source: https://github.com/Impertio-Studio/Frappe_Claude_Skill_Package/tree/main/skills/source/errors/frappe-errors-permissions
Command: npx skills add https://github.com/Impertio-Studio/Frappe_Claude_Skill_Package --skill frappe-errors-permissions-impertio-studio

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you rapidly diagnose and fix Frappe/ERPNext permission failures that cause documents and endpoints to return 403/PermissionError or silently show empty lists.

Core Features & Use Cases

  • PermissionError → cause mapping for common scenarios like has_permission returning False, permission_query_conditions over-restricting list views, perm_level blocking field access, and Guest access denial.
  • Safe hook patterns that prevent production outages, including rules to avoid frappe.throw in has_permission and permission_query_conditions, and to always wrap permission logic in try/except.
  • Production-grade debugging workflows using frappe.permissions.get_doc_permissions plus targeted checks for User Permission, DocPerm, and sharing behavior.

Quick Start

Use the frappe-errors-permissions skill to diagnose why user access fails for a specific DocType by running the permission debug workflow and applying the corresponding fix pattern.

Frequently Asked Questions about frappe-errors-permissions

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

FAQPage Schema
Why does my Frappe custom hook return a PermissionError instead of hiding the document?

Frappe permission errors often occur when has_permission hooks return False or throw exceptions instead of returning None. Safe hook patterns require wrapping permission logic in try/except blocks and returning safe outcomes to prevent production outages.

How do I debug empty list views in ERPNext caused by permission_query_conditions?

Empty list views in ERPNext are frequently caused by permission_query_conditions over-restricting SQL queries. You can debug this by inspecting the generated SQL conditions and ensuring all inputs are securely escaped using frappe.db.escape.

What is the best way to diagnose Frappe User Permission filtering issues?

The best way to diagnose Frappe User Permission filtering issues is using frappe.permissions.get_doc_permissions. This API checks DocPerm rules, perm_level restrictions, and sharing behavior to identify exactly why document access fails.

How do I fix Guest access denial for Frappe API endpoints?

Fix Frappe Guest access denial by verifying DocPerm rules and ensuring your has_permission hook allows Guest API access. You must also check if ignore_permissions timing or System Manager bypass logic is inadvertently blocking the request.

Can perm_level rules make Frappe document fields invisible without throwing an error?

Yes, perm_level rules in Frappe can silently block field access and make document fields invisible without throwing a 403 PermissionError. Debugging this requires checking the DocPerm configuration against the user's assigned roles.

What are the limitations of using ignore_permissions in Frappe workflows?

Using ignore_permissions in Frappe bypasses all DocPerm and has_permission checks, which can expose secure data if used incorrectly. It should be limited to System Manager bypass scenarios and never used to workaround poorly configured permission_query_conditions.