users: cannot update profile fields of external user

This commit is contained in:
Girish Ramakrishnan
2024-01-20 10:41:24 +01:00
parent bd1ab000f3
commit c99c24b3bd
7 changed files with 174 additions and 93 deletions

View File

@@ -189,7 +189,9 @@ async function initializeExpressSync() {
router.post('/api/v1/users', json, token, authorizeUserManager, routes.users.add);
router.get ('/api/v1/users/:userId', token, authorizeUserManager, routes.users.load, routes.users.get); // this is manage scope because it returns non-restricted fields
router.del ('/api/v1/users/:userId', token, authorizeUserManager, routes.users.load, routes.users.del);
router.post('/api/v1/users/:userId', json, token, authorizeUserManager, routes.users.load, routes.users.update);
router.put ('/api/v1/users/:userId/role', json, token, authorizeUserManager, routes.users.load, routes.users.setRole);
router.put ('/api/v1/users/:userId/active', json, token, authorizeUserManager, routes.users.load, routes.users.setActive);
router.post('/api/v1/users/:userId/profile', json, token, authorizeUserManager, routes.users.load, routes.users.updateProfile);
router.post('/api/v1/users/:userId/password', json, token, authorizeUserManager, routes.users.load, routes.users.setPassword);
router.post('/api/v1/users/:userId/ghost', json, token, authorizeAdmin, routes.users.load, routes.users.setGhost);
router.put ('/api/v1/users/:userId/groups', json, token, authorizeUserManager, routes.users.load, routes.users.setGroups);