From 681fb6f459257efcc00c577cf73ab33b0aa1aaa8 Mon Sep 17 00:00:00 2001 From: Piotr Gawron <piotr.gawron@uni.lu> Date: Tue, 3 Sep 2019 18:13:06 +0200 Subject: [PATCH] problem with changing user role --- CHANGELOG | 6 ++++++ frontend-js/package-lock.json | 6 +++--- frontend-js/src/main/js/gui/admin/EditUserDialog.js | 3 +-- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 95f20518ed..0353684bfe 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,9 @@ +minerva (14.0.0~beta.1) unstable; urgency=low + * Bug fix: problem with changing user role (#932) + + -- Piotr Gawron <piotr.gawron@uni.lu> Tue, 3 Aug 2019 21:00:00 +0200 + + minerva (14.0.0~beta.0) unstable; urgency=low * Small improvement: sorting by columns that doesn't make sense in admin panel is disabled (#895) diff --git a/frontend-js/package-lock.json b/frontend-js/package-lock.json index e03b49b374..4da1376269 100644 --- a/frontend-js/package-lock.json +++ b/frontend-js/package-lock.json @@ -3581,9 +3581,9 @@ } }, "molart": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/molart/-/molart-1.3.2.tgz", - "integrity": "sha512-NugAwv9loJFKmoWJWW1XwpR3u4qid9zkirdyXMYVoStxZgP7xfHLq+O+orL5867WaqpBfX5ZszUMOMbfpYn5Sg==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/molart/-/molart-1.4.0.tgz", + "integrity": "sha512-+HPcwFZTxa3BwBcyimgsg5pCSphy6hdidYUeQ8VcMOd8UhfdmdhZAsSQkF/E31jjlwnIuYTDqLAbKE8GsX5clA==", "dev": true }, "mold-source-map": { diff --git a/frontend-js/src/main/js/gui/admin/EditUserDialog.js b/frontend-js/src/main/js/gui/admin/EditUserDialog.js index 7fe99b3fcb..f5b4dbe1fa 100644 --- a/frontend-js/src/main/js/gui/admin/EditUserDialog.js +++ b/frontend-js/src/main/js/gui/admin/EditUserDialog.js @@ -205,8 +205,7 @@ EditUserDialog.prototype.createGeneralTabContent = function () { $(result).on("click", "[name='user-role-" + self.getUser().getLogin() + "']", function () { - var field = this; - var role = $('[name="user-role-' + self.getUser().getLogin() + '"]:checked', field).val(); + var role = $('[name="user-role-' + self.getUser().getLogin() + '"]:checked', result).val(); var promises = []; if (role === "ADMIN") { promises.push(self.grantPrivilege({privilegeType: PrivilegeType.IS_ADMIN})); -- GitLab