Skip to content

Commit

Permalink
configprovider
Browse files Browse the repository at this point in the history
  • Loading branch information
mparaiso committed Mar 21, 2013
1 parent 27f6f43 commit 889155e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/ConfigProvider.php
Expand Up @@ -39,6 +39,7 @@ class ConfigProvider implements ServiceProviderInterface
function register(Application $app)
{
$app["debug"]=getenv("SNIPPETMANAGER_ENV")=="development"?true:false;
$app['secure_protocol'] = $app["debug"]==true?"http":"https";
//FR: choisit entre http et https selon le debug mode
//EN: switch between http (dev) and https (production)
define("TEMP_DIR", __DIR__ . "/../temp/");
Expand Down Expand Up @@ -106,7 +107,7 @@ function register(Application $app)
),
);}),
"security.access_rules"=>array(
array("^/account/login","IS_AUTHENTICATED_ANONYMOUSLY"),
array("^/account/login","IS_AUTHENTICATED_ANONYMOUSLY",$app['secure_protocol']),
array("^/account/register","IS_AUTHENTICATED_ANONYMOUSLY"),
array("^/account","ROLE_USER"),
array("^/admin","ROLE_ADMIN"),
Expand Down

0 comments on commit 889155e

Please sign in to comment.