Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Enrico Rinolfi on Oct 21, 2009 04:37
open dhtmlx forum
Security

Hi,
I've tried to insert security command to block some users to edit or delete rows in grid ( 2.5)

but the command - UPDATE & DELETE function are launched with beforeUpdate and beforeDelete events.

Am i insered the security code in a wrong position or what else?

Thank u
Answer posted on Oct 21, 2009 06:34
If you have block some kind of operations, connector must not execute any data processing related events ( which means beforeUpdate must not fire ) 
Which server side code you are using for access restricting ?
It must look as
         $grid->access->deny("update");
Answer posted by Enrico Rinolfi on Oct 21, 2009 07:11
I've adjusted the code and now works.....is there a way to send a popup alert to notify user that update function is disabled?
Answer posted by Stanislav (support) on Oct 23, 2009 10:14
The server side will return an "error" status, which you can catch as

dp.attachEvent("onAfterUpdate",function(sid,action,tid,btag){
          if (action == "error") alert("some message");
});