Skip to content

Permission Rule

Permission Rule

Let's consider DocType Invoice, Customer and Warehouse

Doctype image

Let's consider we would like to achieve following permission control on Invoice

  1. Only read permission for customer 1, warehouse 2
  2. Only create permission for customer 1, warehouse 2
  3. Only write permission for customer 1, warehouse 2

1. For achieving read permission for customer 1, warehouse 2 we need to following steps

Create new permission rule with permission as required with following inputs

  • For Doctype: Choose DocType for which you want to add permission rule. Invoice

  • Name: Name permission rule. rule 1

  • Permission Rule Links: Add link document type and link name field from target DocType that you want to include in permission rule links. customer 1, warehouse 2

  • Granular Permission: Choose granular permission for Permission Rule Links (Defaults to select and read) read

Creating permission rule

Permission rule image

Assigning permission rule to user

  • User: Select user to assign permission rule. anonymous@gmail.com

  • For Doctype: Select Doctype for which permission rule is created. Invoice

  • Permission Rule: Add permission rule. rule 1


Assign permission rule image

User can read for customer 1 and warehouse 2

Read image

If user tries to create, write, and delete, it will throw an error

Delete error message image


2. For achieving create permission for customer 1, warehouse 2 we need to following steps

Create new permission rule with permission as required with following inputs

Creating permission rule

Permission Rule image

Assigning permission rule to user

Assign permission rule image

User can create for customer 1 and warehouse 2

Create image


3. For achieving write permission for customer 1, warehouse 2 we need to following steps

Create new permission rule with permission as required with following inputs

Creating permission rule

Permission Rule image

Assigning permission rule to user

Assign permission rule image

User can update for customer 1 and warehouse 2

Write image