Strapi v4: Collection fields are empty after applying custom RBAC condition

System Information
  • Strapi Version: 4.25.14:
  • Operating System: Windows 11:
  • Database: MariaDB:
  • Node Version: 20.16.0:
  • NPM Version: 10.8.1:
  • Yarn Version: 1.22.22:

I created a custom RBAC condition in my order collection such that employees can view and update only those orders which has been assignedTo them. Here is my handler function:

bootstrap({ strapi }) {
    strapi.admin.services.permission.conditionProvider.register({
      displayName: "Is Assigned",
      name: "is-assigned",
      async handler(user) {
        console.log(user?.permission?.properties?.fields)
        const isEmployee =
          user?.roles?.find((item) => item?.name == "Employee");
        if (isEmployee) {
          console.log("Auth user is employee");

          return { assignedTo: {$eq: user?.id} };
        }
        return true; // Full access for other roles
      },
    });
  },
};

The condition got registered successfully. I even assigned the condition to the Employee role. The employees are now seeing only their respective orders. But the order fields are blank. Also, The employee is unable to click and view any specific order. Please find the attached screenshots.