rfcx / rfcx-api

Core, Media/Assets and MQTT APIs
https://api.rfcx.org/docs/
Apache License 2.0
0 stars 0 forks source link

Super user is unable to add him to the project #548

Closed rassokhin-s closed 6 months ago

rassokhin-s commented 6 months ago

From Slack:

We’ve got one thing we need to fix on legacy. It doesn’t seem possible for a super user to add themselves to a project:

error: POST 500 /legacy-api/project/hello-there/user/add Response Time: 53 Authorization: Bearer eyJhbGciOiJ...XGaMZtQL- Email: support@rfcx.org Body: {"user_email":"support@rfcx.org","role_id":2} 
2024-03-03 11:10:04 
    at async /app/app/model/projects.js:826:29
2024-03-03 11:10:04 
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
2024-03-03 11:10:04 
    at Object.updateUserRoleInCoreAPI (/app/app/model/projects.js:880:19)
2024-03-03 11:10:04 
err Error: {"message":"You are not allowed to change your role","error":{"status":403}}
2024-03-03 11:10:04 
{"message":"You are not allowed to change your role","error":{"status":403}}
2024-03-03 11:10:04 
---TEMP: auth create_user_object 50 string undefined

If we can fix this then the new super user page will work. Zhenya [11:35 AM] this is the core error response updateUserRoleInCoreAPI , so we have to ask Frongs to help us with this update today on eng call