Created
September 1, 2017 13:28
-
-
Save kurozumi/388ea60a8e6259ebb3fd2c10f144c67b to your computer and use it in GitHub Desktop.
【EC-CUBE3】会員ログインしないとお問い合わせフォームが表示されないようにする方法
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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