user permission or user privellege

i have cases in my project, i dont know use and fix. so, i want disabled and hide submit button that clear. but problem come to me, when i use link /create it can. how to fix i need your opinion or argument. i have 2 role admin and customer.

in admin can index, create, view, update and delete

and

customer cannot create and delete, but customer can index, view, and update

please help me

Sounds like RBAC. Check the guide on it.

Simple way, you can use AccessControl with roles then set Condition on MatchCallback .

function sendData(){

  jQuery("#submit").attr("disabled","disabled");

  jQuery.ajax({
     // ajax options.. 
  });
} // function block