Hello
I have added a code to create user emissions on issues and tasks after saving of user.
and I want to auto-delete the user permissions on tasks and issues when the user has a role “Support Team”
How can I do that?
after_save(frm)
{
if(frappe.user.has_role("Support Team"))
{
console.log("Hello")
}
}
I did this code to check the user has the role “Support Team”, but not working.
It also works for the users with no role as a “Support Team”.
And I want to check
after saving, whether the user has the role “Support Team” or not.
if yes delete the permission
if no role nothing do.
Please help me with this