Closed dobro929 closed 2 years ago
The user you want to give permissions currently needs to tell you his or her id. The user can obtain it with GET: /user
.
Would it make sense to implement an endpoint to get the user id from a user specified by username? This endpoint would be accessible for any registered user.
I think the better solution is to replace user_id
with username
and the server then searches for the user_id itself.
Im not sure if the permission system works that way. How do I as admin get the
user_id
of the user I want to give rights to? Example:POST: /companies/{company_id}/createPermission