javascript - Handling Backbone.model.destroy with server-side authentication -
what common practice when dealing backbone.js
, server-side permission based restful interactions.
for example if user wants remove model view, needs permissions, given how model.destroy()
works (even wait option set true).
in order stop model being removed / delete have make sure {wait: true}
option set , throw non 200 status code server destroy({error: function(){})
callback used.
is there way around missing?
you understand correctly.
when passing {wait:true}
trigger destroy
event in success
callback.
is there way around it...?
if wanted change behavior of destroy
method, sure.
Comments
Post a Comment