Get User Permission


I wonder how i could get user permission in query…
in my case user is assign to a company and i need to overide link query and set it with the permitted company



In the Doctype, for the Company field, if “Ignore User Permission” is checked, then User Permission will not be applied.

Hi Umair,

what i need is where the data stored… since i need to overide the link field query, so i think i need to select it manually


Hello @bobzz_zone if you have set the user permission from “User Permissions Manager” then you can get the permitted values from “tabDefaultValue” table by writting manual query.

Hello @bobzz_zone,

You can also use,

from frappe.defaults import get_user_permissions

it returns all permissions related to user.

Hello @nishith ,

I have tried to use this approach but it returns empty .

I have tried it using admin user

can you please help me out

Thank you