Added login and posting functionality

Signed-off-by: Gergely Polonkai (W00d5t0ck) <polesz@w00d5t0ck.info>
This commit is contained in:
Gergely Polonkai (W00d5t0ck)
2012-09-04 17:21:04 +02:00
parent 5bcd9f079b
commit 04d408aee0
12 changed files with 277 additions and 18 deletions

View File

@@ -23,6 +23,7 @@ class AppKernel extends Kernel
new Io\TcpdfBundle\IoTcpdfBundle(),
new Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle(),
new Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle(),
new Ivory\CKEditorBundle\IvoryCKEditorBundle(),
new GergelyPolonkai\FrontBundle\GergelyPolonkaiFrontBundle(),
new GergelyPolonkai\GeshiBundle\GergelyPolonkaiGeshiBundle(),
);

View File

@@ -0,0 +1,28 @@
<?php
namespace Application\Migrations;
use Doctrine\DBAL\Migrations\AbstractMigration,
Doctrine\DBAL\Schema\Schema;
/**
* Auto-generated Migration: Please modify to your need!
*/
class Version20120904170638 extends AbstractMigration
{
public function up(Schema $schema)
{
// this up() migration is autogenerated, please modify it to your needs
$this->abortIf($this->connection->getDatabasePlatform()->getName() != "mysql");
$this->addSql("ALTER TABLE users ADD password VARCHAR(50) NOT NULL");
}
public function down(Schema $schema)
{
// this down() migration is autogenerated, please modify it to your needs
$this->abortIf($this->connection->getDatabasePlatform()->getName() != "mysql");
$this->addSql("ALTER TABLE users DROP password");
}
}

View File

@@ -4,18 +4,18 @@ jms_security_extra:
security:
encoders:
Symfony\Component\Security\Core\User\User: plaintext
GergelyPolonkai\FrontBundle\Entity\User:
id: gergely_polonkai_front.service.crypt_encoder
role_hierarchy:
ROLE_ADMIN: ROLE_USER
ROLE_SUPER_ADMIN: [ROLE_USER, ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH]
providers:
in_memory:
memory:
users:
user: { password: userpass, roles: [ 'ROLE_USER' ] }
admin: { password: adminpass, roles: [ 'ROLE_ADMIN' ] }
gergely_polonkai_front.entity.user:
entity:
class: GergelyPolonkai\FrontBundle\Entity\User
property: username
firewalls:
dev:
@@ -23,17 +23,17 @@ security:
security: false
login:
pattern: ^/demo/secured/login$
pattern: ^/admin/login.html$
security: false
secured_area:
pattern: ^/demo/secured/
pattern: ^/admin
form_login:
check_path: /demo/secured/login_check
login_path: /demo/secured/login
check_path: /admin/login-check.do
login_path: /admin/login.html
logout:
path: /demo/secured/logout
target: /demo/
path: /admin/logout
target: /
#anonymous: ~
#http_basic:
# realm: "Secured Demo Area"