Commit 6da94fbe authored by Piotr Gawron's avatar Piotr Gawron
Browse files

Merge branch...

Merge branch '313-admin-panel-refresh-problem-and-potential-privilege-clash-when-adding-a-new-user' into 'master'

Resolve "Admin panel: refresh problem and potential privilege clash when adding a new user"

Closes #313

See merge request piotr.gawron/minerva!253
parents a137ab9f f35eb397
Pipeline #4303 passed with stage
in 1 minute and 6 seconds
......@@ -330,6 +330,19 @@ EditUserDialog.prototype.initProjectsTab = function () {
}
});
$("[name='defaultProjectsRow']", self.getElement()).on("click", "[name='project-privilege-checkbox']", function () {
var data = $(this).attr("data").split("-");
var privilegeType = data[0];
var objectId = data[1];
var value = $(this).is(":checked");
for (var i = 0; i < configuration.getPrivilegeTypes().length; i++) {
var privilege = configuration.getPrivilegeTypes()[i];
if (privilege.getName() === privilegeType) {
self.getUser().setPrivilege({type: privilege, value: value, objectId: objectId});
}
}
});
});
};
......
Supports Markdown
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