【发布时间】:2023-01-27 04:39:12
【问题描述】:
I added a new filed called config (type: json) to the User model. I use built-in swagger of Strapi local document. The problem is that I can update another user config (data) with put method.
- First, I authorized by
POST /auth/localand get my token and my user id (in this cast it's 5) - I add my token to swagger Authorize button.
- Then, I use
PUT /user/{id}in this case id is 5. - Calling api
http://localhost:1337/api/users/4returns 200!
I expect that I get 403 error! Because I should not able to change other user profiles!!! Is it normal? If yes, tell me a solution to fix this.
-
The link to the documentation is a link to localhost. I don't have this documentation on my system.
-
I mean that I use default swagger. @jebaa
标签: javascript node.js backend strapi