【EC-CUBE3】会員ログインしないとお問い合わせフォームが表示されないようにする方法
<?php | |
/* | |
* This file is part of the SamplePlugin | |
* | |
* Copyright (C) 2017 kurozumi | |
* | |
* For the full copyright and license information, please view the LICENSE | |
* file that was distributed with this source code. | |
*/ | |
namespace Plugin\SamplePlugin\ServiceProvider; | |
use Monolog\Handler\FingersCrossed\ErrorLevelActivationStrategy; | |
use Monolog\Handler\FingersCrossedHandler; | |
use Monolog\Handler\RotatingFileHandler; | |
use Monolog\Logger; | |
use Plugin\SamplePlugin\Form\Type\SamplePluginConfigType; | |
use Silex\Application as BaseApplication; | |
use Silex\ServiceProviderInterface; | |
use Plugin\SamplePlugin\Security\DefaultAuthenticationSuccessHandler; | |
class SamplePluginServiceProvider implements ServiceProviderInterface | |
{ | |
public function register(BaseApplication $app) | |
{ | |
$channel = null; | |
// 強制SSL | |
if ($app['config']['force_ssl'] == \Eccube\Common\Constant::ENABLED) { | |
$channel = "https"; | |
} | |
$access_rules = $app['security.access_rules']; | |
$access_rules[] = array("^/contact", 'ROLE_USER', $channel); | |
$app['security.access_rules'] = $access_rules; | |
} | |
public function boot(BaseApplication $app) | |
{ | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment