Don’t forget to share it with your network!
Jaymin Lakhmanbhai Tarpara
Sr Developer, Softices
ERPNext & Frappe Development
19 August, 2026
Jaymin Lakhmanbhai Tarpara
Sr Developer, Softices
When a business introduces an ERP system, two questions quickly become important: what data should the system store, and who should be allowed to access it?
In Frappe and ERPNext, DocTypes answer the first question. The permission system answers the second.
DocType defines the fields, relationships, and behavior of a business record. But defining a record is only half the job. You also need to control who can view, create, edit, submit, cancel, or otherwise interact with it.
Frappe's permission system is designed around Users, Roles, DocTypes, Permission Levels, and User Permissions. These layers can work together to handle everything from simple department-based access to more granular restrictions based on ownership, company, warehouse, territory, or other linked values.
Understanding how these pieces fit together is important whether you're configuring ERPNext, customizing an existing implementation, or building a custom Frappe application.
Frappe does not normally define permissions separately for every individual user. Instead, permissions are assigned to Roles, and users receive one or more roles.
For example, a user could have:
A user can have multiple roles, and their access is determined by the permissions associated with those roles.
This approach makes permission management easier to maintain. Instead of configuring access for every employee individually, an administrator can define what a particular job function is allowed to do and then assign that role to the appropriate users.
When responsibilities change, updating a user's roles can change their access without rebuilding the entire permission structure.
At the center of the Frappe system are three concepts: Role, DocType, and Permission Level.
Together they define exactly what a role can do with a given type of record.
Role |
DocType |
Permission Level |
What It Controls |
|---|---|---|---|
| Sales User | Lead | 0 | Read, Create |
| Sales Manager | Lead | 0 | Read, Write, Create, Delete |
| HR Manager | Employee | 0 | Read, Write, Create |
| Accounts User | Sales Invoice | 0 | Read, Write, Submit |
| Accounts Manager | Sales Invoice | 0 | Read, Write, Submit, Cancel, Amend |
A Role represents a set of responsibilities or access rights. Roles are assigned to users and determine what actions those users can perform on different DocTypes.
A DocType represents a business object or record, such as Employee, Customer, Lead, Sales Invoice, or Stock Entry.
Permissions can be configured for each DocType and role combination.
A Permission Level, or permlevel, allows access to be separated
within the same document. Most fields use level 0 by default, while
sensitive fields can be assigned a higher level and restricted to specific
roles.
Frappe provides permissions for more than simply viewing or editing records.
Common permission types include:
These permissions can be combined differently for each role and DocType.
For example, a Sales User might be allowed to create and read Leads but not delete them, while a Sales Manager could have additional write and delete permissions.
Role permissions generally determine what a user can do with a document.
Permission Levels provide another layer by controlling access to individual fields within that document. This is useful when different roles need different visibility inside the same record.
Consider an Employee record containing:
You may want HR staff to access general employee information while restricting salary-related fields to HR Managers.
Instead of creating separate Employee DocTypes, sensitive fields can be assigned a different permission level and access to that level can be granted only to specific roles.
This is particularly useful when different teams work with the same business record but should not have identical visibility.
Role permissions answer a question such as:
| Can this role access the Sales Invoice DocType?
But businesses often need to ask a more specific question:
| Which Sales Invoices can this particular user access?
That's where User Permissions come in.
User Permissions can restrict records based on values in Link fields. For example, a company might have several warehouses, but a warehouse manager should only work with records associated with their assigned warehouse.
Instead of creating a separate role for every warehouse, you can use:
This creates a distinction between broad role-based access and record-level filtering.
Role Permission |
User Permission |
|
|---|---|---|
| Applies to | DocType and actions | Specific linked values |
| Configured per | Rules | Individual users |
| Example | Can Sales User read Sales Invoice? | Can this user access invoices for a specific Territory? |
| Purpose | Define job-based access | Restrict which records the user can access |
This distinction becomes especially useful in organizations with multiple companies, branches, warehouses, territories, or cost centers.
Frappe also supports more specific permission scenarios.
For example, a role's permission can be configured with an "If the user is owner" restriction. This allows access rules to depend on whether the current user owns the document.
For more dynamic requirements, Frappe provides Permission Query Conditions and related server-side customization options.
For example:
Frappe provides a permission_query_conditions hook for
developers who need to add custom query-level restrictions.
This is an area where developer involvement is usually appropriate. Custom permission logic should be carefully tested because an incorrect condition can either expose data or prevent legitimate users from accessing it.
One of the easiest ways to understand Frappe permissions is to think of them as progressively narrowing access.
For example:
User → Roles → DocType permissions → Permission Levels → User Permissions / ownership restrictions → Custom permission conditions
A user might therefore have permission to read the Sales Invoice DocType because of their role, but User Permissions could restrict them to invoices associated with a particular company or territory.
Frappe's permission-aware query mechanisms can apply role permissions, User Permissions, sharing, ownership restrictions, permission query conditions, and field-level security when permissions are enforced.
This layered approach is what makes the permission system flexible enough for both standard ERP workflows and more complex custom applications.
A few patterns show up repeatedly across ERPNext implementations:
Sales Users can create and read Leads and Opportunities but may not have permission to delete records.
Sales Managers can receive additional write, delete, or reporting permissions.
HR staff can access employee records, while salary-related fields or financial HR documents can be restricted to authorized roles using permission levels.
Accounts Users can create and submit financial transactions, while cancellation or amendment rights can be limited to Accounts Managers.
This creates a separation between entering transactions and making corrections to finalized records.
Warehouse users can have access to inventory-related DocTypes while User Permissions restrict them to their assigned warehouse.
This avoids creating dozens of nearly identical roles simply to represent different locations.
Portal users can be given access to relevant records while additional restrictions determine which records they can view. Frappe also supports roles for Website Users and portal-specific menu access.
Create roles based on what people need to do rather than creating a new role for every individual employee or location.
If two users perform the same job but should see different records, User Permissions are often more appropriate than creating separate roles.
High-level administrative roles should be limited to users who genuinely need them. Broad permissions make mistakes and unintended data access harder to prevent.
If a document contains financial, salary, or other restricted information, consider whether everyone who can access the document should also be able to access every field.
Don't assume that a permission configuration works simply because the Role Permissions Manager looks correct. Test the actual experience with representative user accounts and verify what users can see, create, edit, submit, export, and delete.
New DocTypes, workflows, integrations, and custom scripts can introduce new access requirements. Permission design should therefore be part of the customization process rather than something addressed only after development is complete.
The value of Frappe's permission system extends beyond ERPNext.
Whether you're implementing ERPNext for the first time, migrating from a legacy system, or building a custom application, the same underlying concepts of users, roles, DocTypes, permission levels, User Permissions, and custom permission conditions apply.
That makes the framework suitable for applications such as:
The important part is to design the access model alongside the application itself.
A system may work perfectly from a functional perspective and still create problems if users can access records they shouldn't, edit finalized information, or view sensitive fields. Defining who can access what, at which level, and under which conditions before development begins can prevent significant rework later.
Frappe's permission system provides the flexibility to control access at multiple levels. Roles define what users can do, Permission Levels can restrict individual fields, User Permissions can narrow access to specific records, and custom conditions can handle more dynamic requirements.
The key is choosing the right layer for each requirement and keeping the permission model aligned with the way your organization actually works. A thoughtful approach from the beginning can help prevent data exposure, reduce unnecessary access, and avoid costly permission changes later.
For businesses extending ERPNext or building custom Frappe applications, Softices can help translate these access requirements into a practical permission structure that fits the application's workflows and organizational needs.