Hi, I think you can’t create files like that, you have to write code in strapi-server.ts.
To modify users-permissions routes or controllers you can do this :
In my example, I identify the route by path and add a new custom policies
--> src/extensions/users-permissions/strapi-server.ts
module.exports = (plugin) => {
const routes = plugin.routes["content-api"].routes;
routes.forEach(({ path, config }) => {
if (path === "/auth/local") {
config.policies = ["global::has-subscription"];
}
});
return plugin;
};