Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
function saveChanges() {
if (!this.hasChanges()) {
return;
}
var user = this.getCurrentUser();
if (!user.isAuthenticated() || !user.hasWriteAccess())
this.showMessage(“Not authorised for saving changes”);
return;
}
// Main code here..
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment