Override permission using custom script

Dear community,

Is there any way that I can overwrite a Role Permission using custom script?

Case Scenario:

  1. Employee has a submitted leave application.

  2. Employee will use a button to change value of a field. (unable to do this as Employee does not have a Submit permission)

  3. This in turn will trigger an Email Alert

Current script

frappe.ui.form.on('Leave Application', {
    request_cancellation: function(frm) {
        has_permission(True);
        cur_frm.set_value('requested_cancellation', 'Requested Cancellation');
 });

Even I need help with this. Can I override user permission when running custom script.
Say when I call a Action Button it should just run with Admin Access or permission.

Share what you have found or tried to promote a dialog?

Can I override user permission when running a custom script?
Say when I call an Action Button it should just run with Admin Access or permission.