roles = frappe.get_roles(frappe.session.user)
print(roles)
if "Rom_DM_Role" in roles:
category_name = 'Dining'
if "Rom_Chef_Role" in roles:
category_name = 'Kitchen'
in Javascript
let role_avail = frappe.user_roles.includes("System Manager")
or
if (frappe.user.has_role("Role Name")) {
console.log("The current user has the specified role.");
} else {
console.log("The current user does not have the specified role.");
}