Skip to content

Commit

Permalink
fix suggessions from sensiolabs insight
Browse files Browse the repository at this point in the history
  • Loading branch information
Andras Ratz committed Nov 1, 2014
1 parent 1daa809 commit cd2974d
Show file tree
Hide file tree
Showing 13 changed files with 41 additions and 151 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Expand Up @@ -19,4 +19,4 @@ app/bootstrap.php.cache
app/SymfonyRequirements.php
/bin/
/app/app.sqlite
app/check.php
app/check.php
Expand Up @@ -6,4 +6,4 @@
{{ rdf|raw }}
{% endcreatephp %}

{% endblock %}
{% endblock %}
2 changes: 1 addition & 1 deletion app/Resources/LiipSearchBundle/views/layout.html.twig
@@ -1 +1 @@
{% extends "SandboxMainBundle::skeleton.html.twig" %}
{% extends "SandboxMainBundle::skeleton.html.twig" %}
2 changes: 1 addition & 1 deletion app/Resources/TwigBundle/views/Exception/error.html.twig
Expand Up @@ -16,4 +16,4 @@
<a href="{{ app.request.getSchemeAndHttpHost }}/reload-fixtures.php">reload-fixtures.php</a>
</p>
</body>
</html>
</html>
2 changes: 1 addition & 1 deletion app/autoload.php
Expand Up @@ -21,4 +21,4 @@
AnnotationRegistry::registerLoader(array($loader, 'loadClass'));
AnnotationRegistry::registerFile(__DIR__.'/../vendor/doctrine/phpcr-odm/lib/Doctrine/ODM/PHPCR/Mapping/Annotations/DoctrineAnnotations.php');

return $loader;
return $loader;
3 changes: 2 additions & 1 deletion app/config/config.yml
Expand Up @@ -13,7 +13,8 @@ framework:
validation: { enable_annotations: true }
templating: { engines: ['twig'] } #assets_version: SomeVersionScheme
default_locale: %locale%
session: ~
session:
name: symfony-cmf
trusted_proxies: ~

# Twig Configuration
Expand Down
7 changes: 6 additions & 1 deletion app/config/parameters.yml.dist
Expand Up @@ -2,7 +2,7 @@ parameters:
locale: en
locales: [en, fr, de]

secret: ThisTokenIsNotSoSecretChangeIt
secret: bcd39bfa638e42bfd1628d8d7c269841

# a little hack to avoid errors on missing node/coffeescript.
# remove -disabled if you want coffee.
Expand All @@ -22,3 +22,8 @@ parameters:
mailer_host: localhost
mailer_user: ~
mailer_password: ~

#user
security_user_password: $2y$12$zoziRrBLGcLloghFoj6rje1DVgmngducslRKduhQy9HVGCXKP0WYi
#admin
security_admin_password: $2y$12$j1vardxXG7oBRg/0MXqNP.oXdTlR0foxgeLGqnlypTpmFMiMtdlry
10 changes: 6 additions & 4 deletions app/config/security.yml
@@ -1,6 +1,8 @@
security:
encoders:
Symfony\Component\Security\Core\User\User: plaintext
Symfony\Component\Security\Core\User\User:
algorithm: bcrypt
cost: 12

role_hierarchy:
ROLE_ADMIN: [ROLE_USER, ROLE_SONATA_ADMIN, CAN_VIEW_NON_PUBLISHED]
Expand All @@ -10,8 +12,8 @@ security:
in_memory:
memory:
users:
user: { password: user, roles: [ 'ROLE_USER' ] }
admin: { password: admin, roles: [ 'ROLE_ADMIN' ] }
user: { password: %security_user_password%, roles: [ 'ROLE_USER' ] }
admin: { password: %security_admin_password%, roles: [ 'ROLE_ADMIN' ] }

firewalls:
dev:
Expand All @@ -28,4 +30,4 @@ security:
- { path: ^(/(de|fr|en))?/admin, roles: ROLE_ADMIN }
#- { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/efconnect, role: ROLE_USER }
- { path: ^/elfinder, role: ROLE_USER }
- { path: ^/elfinder, role: ROLE_USER }
1 change: 0 additions & 1 deletion jack
Expand Up @@ -133,7 +133,6 @@ case "$action" in
flush:article)
[ -z $args ] && args=$(date +%Y/%m/%d)
[ $args = "all" ] && args=""
# TODO extract port from $args
curl -X DELETE http://admin:admin@localhost:8080/server/nzz/jcr:root/article/$args
;;

Expand Down
Expand Up @@ -3,15 +3,14 @@

use Symfony\Component\HttpKernel\DependencyInjection\Extension;
use Symfony\Component\DependencyInjection\ContainerBuilder;
//TODO: make config xml instead of yml
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
use Symfony\Component\Config\FileLocator;

class SandboxMainExtension extends Extension
{
public function load(array $configs, ContainerBuilder $container)
{
$loader = new YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
$loader->load('services.yml');
$loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
$loader->load('services.xml');
}
}
19 changes: 19 additions & 0 deletions src/Sandbox/MainBundle/Resources/config/services.xml
@@ -0,0 +1,19 @@
<?xml version="1.0" ?>

<container xmlns="http://symfony.com/schema/dic/services"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">

<services>
<service id="sandbox_main.controller" class="Sandbox\MainBundle\Controller\ContentController" parent="cmf_content.controller">
</service>

<service id="sandbox_main.debugListener" class="Sandbox\MainBundle\EventListener\SandboxExceptionListener">
<call method="setContainer">
<argument type="service" id="service_container" />
</call>
<tag name="kernel.event_subscriber" />
</service>

</services>
</container>
11 changes: 0 additions & 11 deletions src/Sandbox/MainBundle/Resources/config/services.yml

This file was deleted.

124 changes: 0 additions & 124 deletions web/config.php

This file was deleted.

0 comments on commit cd2974d

Please sign in to comment.