Create a gist now

Instantly share code, notes, and snippets.

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