frappe/frappe — pull request #543 by anandpdoshi (2014-05-19 08:02:45+00:00)
Title: Dont apply restrictions

Essentially, added new option **Don't Apply Restrictions** in Permissions

![image](https://cloud.githubusercontent.com/assets/836785/3011345/84269b30-df29-11e3-8f70-082de6a24f26.png)

### Impact
- **Don't Apply Restrictions == checked**
No restrictions are applied for that combination of doctype and role. It works just like v3 permissions without any match condition, effectively making migration from v3 to v4 much less shocking.

Another use case opens up. Suppose there are two permission rules:

- **Accounts User**
Read with Don't Apply Permissions

- **Accounts Manager**
Read, Write, Create without Don't Apply Restrictions

Now, if a user has both Accounts User and Accounts Manager role, he/she will be able to read all Accounts, but only write, create based on restrictions. **This unforeseen feature was available in v3 but was missing in v4.**

- **Only Restricted Documents / Is Creator == checked**
For the doctype and role combination, allow user to access only those documents that are specifically added to its restriction list or the user is the creator. If there is nothing in the restriction list for that doctype, only the documents that the user created will be visible.
If the document has link fields that the user does not have permission on, the document will **STILL BE ACCESSIBLE**, since that document was **explicitly added** to the user's restriction list, and that makes a lot of sense in my opinion.

- **When both of the above are unchecked**
All relevant restrictions, current doctype and all link fields, will be applied, as was intended in the initial design. This is the default behaviour.

---

@rushabh does this look okay?

@nabin, @pdvyas please comment if I am missing out anything

@lxnow does this explanation make sense?