Fix admin role not assigned issue during admin user creation
Purpose
The current APIs look for
Internal/devimgt-admin
role to invoke admin APIs. When creating users via endpoint-mgt, the user get assigned only theadmin
role. This results in the admin not being able to invoke admin APIs inside the portal.
Approach
Add an additional check inside
addUser
API whetheradmin
role has been added inside the payload for the user who is being created and attach the role 'Internal/devicemgt-admin'.