Whitelisted method override remove allow_guest=True

How? I’ve tried the whitelisted override via hooks and monkey patch, no success

  • Which method are you trying to override?
  • Which hook did you try?

frappe.workflow.doctype.workflow_action.workflow_action.apply_action

tried to add it to the override_whitelisted_methods hook

…what I want to achieve is to restrict guest from approving a workflow via email without logging in

I also tried to just redirect to ‘/login’ if frappe.session.user == ‘Guest’, but frappe.Redirect does not seem to work on apis.

Simpler solution: disable workflow action emails. Unless you really need them.

It is really needed as it notifies the user when there is a record that needs action…

I’ve managed to resolved the issue. I replaced the apply_action method via hooks and added a check if the user is a guest, and if so, show a link to the login page with redirect-to param (instead of directly redirecting to /login). if not a guest, show the action message.