@@ -83,8 +83,8 @@ protected function _loadAclAdapter($adapter) {
8383 *
8484 * Allows single or multi role based authorization
8585 *
86- * @param array $user User data
87- * @param array $params Request params
86+ * @param array<string, mixed> $user User data
87+ * @param array<string, mixed> $params Request params
8888 * @throws \Cake\Core\Exception\CakeException
8989 * @return bool Success
9090 */
@@ -110,7 +110,7 @@ protected function _checkUser(array $user, array $params) {
110110 }
111111 }
112112
113- // Give any logged in user access to ALL actions when `allowLoggedIn` is
113+ // Give any logged- in user access to ALL actions when `allowLoggedIn` is
114114 // enabled except when the `protectedPrefix` is being used.
115115 if ($ this ->getConfig ('allowLoggedIn ' )) {
116116 if (empty ($ params ['prefix ' ])) {
@@ -516,7 +516,7 @@ protected function _getRolesFromDb(string $rolesTableKey): array {
516516 * @throws \Cake\Core\Exception\CakeException
517517 * @return array<string, int|string> List with all role ids belonging to the user
518518 */
519- protected function _getUserRoles ($ user ) {
519+ protected function _getUserRoles (array $ user ) {
520520 // Single-role from session
521521 if (!$ this ->getConfig ('multiRole ' )) {
522522 $ roleColumn = $ this ->getConfig ('roleColumn ' );
@@ -531,7 +531,9 @@ protected function _getUserRoles($user) {
531531 return [];
532532 }
533533
534- return $ this ->_mapped ([$ user [$ this ->getConfig ('roleColumn ' )]]);
534+ $ role = $ user [$ this ->getConfig ('roleColumn ' )];
535+
536+ return $ this ->_mapped ([$ role ]);
535537 }
536538
537539 // Multi-role from session
0 commit comments