Commit 93a2963d authored by Piotr Gawron's avatar Piotr Gawron
Browse files

project privileges are updated on change

parent d423087a
......@@ -365,6 +365,9 @@ EditUserDialog.prototype.initProjectsTab = function () {
self.getUser().setPrivilege({type: privilege, value: value, objectId: objectId});
}
}
if (!self.getIsNewUser()) {
return self.updateUser();
}
});
$("[name='defaultProjectsRow']", self.getElement()).on("click", "[name='project-privilege-checkbox']", function () {
......@@ -378,6 +381,9 @@ EditUserDialog.prototype.initProjectsTab = function () {
self.getUser().setPrivilege({type: privilege, value: value, objectId: objectId});
}
}
if (!self.getIsNewUser()) {
return self.updateUser();
}
});
};
......@@ -409,7 +415,9 @@ EditUserDialog.prototype.initPrivilegesTab = function () {
self.getUser().setPrivilege({type: privilege, value: value});
}
}
return self.updateUser();
if (!self.getIsNewUser()) {
return self.updateUser();
}
});
$(privilegesTable).on("change", "[name='privilege-int']", function () {
var privilegeType = $(this).attr("data");
......@@ -423,7 +431,9 @@ EditUserDialog.prototype.initPrivilegesTab = function () {
}
}
$(this).css("background-color", "");
return self.updateUser();
if (!self.getIsNewUser()) {
return self.updateUser();
}
} else {
$(this).css("background-color", "red");
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment