CakePHP 4.1 User entity as authorization identity associated fields
问题 I have just created a very minimal project in CakePHP 4.1, mostly mimicking the CMS tutorial, and want to implement a fairly straightforward piece of logic. Using the Authorization module I want to allow a user A to be able to view a user B if 1) they are actually the same user ( A = B ) OR 2) if A is an admin. There are two DB tables - users and user_types . users has a foreign key user_type_id to user_types . This relationship is reflected in code as: ##### in UsersTable.php ##### class