Restrict User based on document field value

Is there anyway where I can restrict users in accessing some documents with a certain value. The Custom Doctype’s name is Pawn Ticket and it has a field that is called branch. Now, if that field, branch, is different to the assigned branch of the user, the user wouldn’t be able to see it in the list view. I want the user to have no control on how he/she sees the list view of that doctype. Does anyone have any idea on how to do it.

Use “User Permissions”

  1. enter user id of that person in field “User”
  2. select branch to be allowed in field “Allow”
  3. Enter branch in field “For Value”
  4. untick “Apply To All Document Types”
  5. enter Pawn Ticket in “Applicable For”

I’m sorry, I’m referring to the user role…I want certain roles to only on see the documents were created in their respective branches.

Unfortunately, it’s not possible to do this filtering per Role.

You’d have to do 1 user at a time, as @mohitchechani described.

1 Like

Oh I see. Thanks!

You can also restrict access to view switcher for certain roles, that would leave user with that assigned role with no control over the views. Check options available at Role by clicking on one of them or creating your own ones.

If I uncheck view switcher, what will happen?

The user with that assigned role won’t be able to switch List View, Kanban, Report, etc. plus you can also restrict access to bulk actions and sidebar not only for lists, but also for forms. I encourage you to create a test user and a custom role, and explore which changes occur depending on the options you check/uncheck. Maybe you can find something that might suit your needs.

1 Like