Update CRUD "users-permissions" extension

How to modify a user’s CRUD logic (PUT: / users / id) with the “users-permissions” extension
Usually for an API I create a controller to manage the logic of my CRUD.

But for this plugin I can’t modify the default logic.
The various resources that I have been able to find on the internet are not all up to date.

Indeed by default a user can modify another user, so I want to control in a controller for example that it is the user id of the context which try to modify his account.

To conclude, how to override the crud to modify a user with the “users-permissions” extension?

Thanks a lot for your help.

You can use policies for this.
With a policy you can check if the user is the one that is making the request
Since it’s not specified what version you are on

V4 Is Owner - Strapi Developer Docs
V3 Is Owner - Strapi Developer Documentation


The connection won’t open @Eventyret