Hello,
I want to check if the session user has a certain role or not.
I’m writing a server script to achieve so.
Following is my code:
user = frappe.session.user
if “Laboratory User” in frappe.get_roles(user):
But I get the error - Server Error
AttributeError: module has no attribute ‘get_roles’
What is the correct way of doing so ?
Thanks.