public function isPerUserEncryptionEnabled()
    {
        $perUserEncryptionEnabled = false;

        if ($this->settings['per_user_encryption_enabled']) {
            $encryptionMetadata = $this->metadataFactory->getAllMetadata();
            /** @var ClassMetadata $classEncryptionMetadata */
            foreach ($encryptionMetadata as $classEncryptionMetadata) {
                if (self::MODE_PER_USER_SHAREABLE === $classEncryptionMetadata->encryptionMode) {
                    $perUserEncryptionEnabled = true;
                    break;
                }
            }
        }

        return $perUserEncryptionEnabled;
    }