Finished authentication

Signed-off-by: Gergely POLONKAI (W00d5t0ck) <polesz@w00d5t0ck.info>
This commit is contained in:
Polonkai Gergely
2012-07-02 22:41:06 +02:00
parent f2370faa68
commit e1fde17057
16 changed files with 214 additions and 20 deletions

View File

@@ -26,4 +26,9 @@ class DefaultController extends Controller
'article' => $article
));
}
public function forumMainAction()
{
return $this->forward('KekRozsakFrontBundle:Default:homepage');
}
}

View File

@@ -3,11 +3,12 @@
namespace KekRozsak\FrontBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Security\Core\Role\RoleInterface;
/**
* KekRozsak\FrontBundle\Entity\Role
*/
class Role
class Role implements RoleInterface
{
/**
* @var integer $id
@@ -136,4 +137,9 @@ class Role
{
return $this->included_roles;
}
}
public function getRole()
{
return $this->name;
}
}

View File

@@ -3,11 +3,12 @@
namespace KekRozsak\FrontBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Security\Core\User\UserInterface;
/**
* KekRozsak\FrontBundle\Entity\User
*/
class User
class User implements UserInterface
{
/**
* @var integer $id
@@ -188,6 +189,15 @@ class User
*/
public function getRoles()
{
return $this->roles;
return $this->roles->toArray();
}
}
public function eraseCredentials()
{
}
public function getSalt()
{
return $this->password;
}
}

View File

@@ -7,3 +7,8 @@ KekRozsakFrontBundle_article:
pattern: /cikk/{articleSlug}
defaults:
_controller: KekRozsakFrontBundle:Default:article
KekRozsakFrontBundle_forum_main:
pattern: /forum
defaults:
_controller: KekRozsakFrontBundle:Default:forumMain