getUser($request), $block); if (!Authority::canShowUserDataField($user, $resource)) { throw new AuthorizationFailedException(); } // however, as it is intended to list all user data fields of the block, we get it here and return it back. $resources = UserDataField::findBySql('block_id = ?', [$block->id]); return $this->getContentResponse($resources); } }