Permission Rule
Permission Rule
Let's consider DocType Invoice
, Customer
and Warehouse
Let's consider we would like to achieve following permission control on Invoice
- Only
read
permission forcustomer 1
,warehouse 2
- Only
create
permission forcustomer 1
,warehouse 2
- Only
write
permission forcustomer 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
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
User can read
for customer 1 and warehouse 2
If user tries to create, write, and delete, it will throw an error
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
Assigning permission rule to user
User can create
for customer 1 and warehouse 2
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
Assigning permission rule to user
User can update
for customer 1 and warehouse 2