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

Popular posts from this blog

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -

java - JavaFX 2 slider labelFormatter not being used -