Better permission handling in editor

This commit is contained in:
Nick O'Leary
2018-01-12 21:00:11 +00:00
parent bb168d35a8
commit 1204cf1ba0
10 changed files with 240 additions and 111 deletions

View File

@@ -286,6 +286,10 @@ RED.deploy = (function() {
function save(skipValidation,force) {
if (!$("#btn-deploy").hasClass("disabled")) {
if (!RED.user.hasPermission("flows.write")) {
RED.notify(RED._("user.errors.deploy"),"error");
return;
}
if (!skipValidation) {
var hasUnknown = false;
var hasInvalid = false;