Skip to content

Instantly share code, notes, and snippets.

@alansemenov
Created April 4, 2016 13:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alansemenov/3f19510135b7da1a9bf9d812f0f052a2 to your computer and use it in GitHub Desktop.
Save alansemenov/3f19510135b7da1a9bf9d812f0f052a2 to your computer and use it in GitHub Desktop.
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