Which user's jwt token belongs to, how can only data belonging to that user's be retrieved?

hi @DMehaffy,

I’ve created file config / policies / includeUserRelations.

module.exports = async (ctx, next) => {
    if (ctx.state.user) {
      let { id } = await strapi.query('user', 'users-permissions').findOne({ id: ctx.state.user.id }, ['id']);
      ctx.state.user.id = id;
    }
    return await next();
  };

here I can get the ID you received according to the token.

api / order / config / route

  {
      "method": "GET",
      "path": "/orders",
      "handler": "order.find",
      "config": {
        "policies": ["global::includeUserRelations"]
      }
    },

added.

but still all orders are returning. Unfortunately, there was no filtering by user. Where did I go wrong?