About users and permissions ​

ERPNext controls access with roles. You give each user one or more roles. Each role has permissions on each kind of document. Other controls then narrow or widen that access for specific documents and fields.

How access is decided ​

LayerQuestion it answersWhere you set it
UserWho is logging in, and are they a system user or a website user?Add a user
RoleWhat job does the user do, for example Sales User or Accounts Manager?Roles and role profiles
Role permissionWhat can this role do with this kind of document: read, write, create, submit, cancel, and more?Set role permissions
User permissionWhich documents can this user see, for example only one company or one territory?Restrict a user to specific documents
Permission levelWhich fields of a document can this role see or change?About permission levels
SharingCan one more user open this one document?Share a document

A user can do an action on a document only if one of the user's roles allows it, and no user permission blocks the document. Sharing gives access to one document even when user permissions block it.

Roles come ready to use ​

ERPNext includes the common roles with their permissions already set. For example, a user with the Sales User role can work with Quotations and Sales Orders. Most companies start with these roles and add their own only when needed.

An example: sales by territory ​

A company has sales teams in several regions.

  1. Every salesperson gets the Sales User role. The role can create, read, and submit Quotations and Sales Orders.
  2. Each salesperson gets a user permission for their own Territory. They see only the Customers, Quotations, and Sales Orders of that territory.
  3. The sales manager gets the Sales Manager role and no territory restriction. The manager sees all regions.
  4. The company adds a custom discount approval field to the Sales Order at permission level 1. On the Sales Order, only the Sales Manager role can write at level 1, so only managers can change the field.

Users with full access ​

  • Administrator: the first user of a site. It has every permission. See The Administrator user.
  • System Manager: a role that can manage users, roles, and settings. Give it to as few users as possible.

Test your setup ​

Always test permissions with a user who has the same roles as the real user. Do not test as Administrator, because Administrator can see everything. The Permitted Documents For User report shows which documents a user can open.