From 47712e63f1c52bd4c8d3940b9afb2eadb2bbddf4 Mon Sep 17 00:00:00 2001 From: advplyr Date: Mon, 2 Sep 2024 15:55:25 -0500 Subject: [PATCH] Update user default permissions --- server/controllers/UserController.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/controllers/UserController.js b/server/controllers/UserController.js index 6ef698e9..46ba943e 100644 --- a/server/controllers/UserController.js +++ b/server/controllers/UserController.js @@ -270,7 +270,7 @@ class UserController { const permissions = { ...user.permissions } - const defaultPermissions = Database.userModel.getDefaultPermissionsForUserType(updatePayload.type || 'user') + const defaultPermissions = Database.userModel.getDefaultPermissionsForUserType(updatePayload.type || user.type || 'user') for (const key in updatePayload.permissions) { // Check that the key is a valid permission key or is included in the default permissions if (permissions[key] !== undefined || defaultPermissions[key] !== undefined) {