Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit 2a6d709

Browse files
#31 - Support non admin roles for search endpoints
1 parent 4ed79d8 commit 2a6d709

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/modules/search/route.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,31 +10,31 @@ module.exports = {
1010
post: {
1111
method: Controller.searchUsers,
1212
auth: 'jwt',
13-
access: consts.AdminUser,
13+
access: [...consts.AdminUser, consts.UserRoles.ubahn],
1414
scopes: ['read:user', 'all:user']
1515
}
1616
},
1717
'/search/skills': {
1818
get: {
1919
method: Controller.searchSkills,
2020
auth: 'jwt',
21-
access: consts.AdminUser,
21+
access: [...consts.AdminUser, consts.UserRoles.ubahn],
2222
scopes: ['create:userAttribute', 'all:userAttribute']
2323
}
2424
},
2525
'/search/userAttributes': {
2626
get: {
2727
method: Controller.searchAttributeValues,
2828
auth: 'jwt',
29-
access: consts.AdminUser,
29+
access: [...consts.AdminUser, consts.UserRoles.ubahn],
3030
scopes: ['create:userAttribute', 'all:userAttribute']
3131
}
3232
},
3333
'/search/userAchievements': {
3434
get: {
3535
method: Controller.searchAchievementValues,
3636
auth: 'jwt',
37-
access: consts.AdminUser,
37+
access: [...consts.AdminUser, consts.UserRoles.ubahn],
3838
scopes: ['create:userAttribute', 'all:userAttribute']
3939
}
4040
}

0 commit comments

Comments
 (0)