changed role names to XXXX instead of ROLE_XXXX

This commit is contained in:
franck
2013-07-18 13:01:33 +02:00
parent 2c52df1034
commit 9a1ee565de
7 changed files with 8 additions and 8 deletions

View File

@@ -31,7 +31,7 @@ interface UserInterface {
* <code>
* public function getRoles()
* {
* return array('ROLE_USER');
* return array('USER');
* }
* </code>
*

View File

@@ -63,6 +63,6 @@ class Admin extends BaseAdmin implements UserInterface
* {@inheritDoc}
*/
public function getRoles() {
return array(new Role('ROLE_ADMIN'));
return array(new Role('ADMIN'));
}
}

View File

@@ -164,6 +164,6 @@ class Customer extends BaseCustomer implements UserInterface
* {@inheritDoc}
*/
public function getRoles() {
return array(new Role('ROLE_CUSTOMER'));
return array(new Role('CUSTOMER'));
}
}

View File

@@ -1,4 +1,4 @@
{check_auth context="admin" roles="ROLE_ADMIN" login_tpl="/admin/login"}
{check_auth context="admin" roles="ADMIN" login_tpl="/admin/login"}
{$page_title={intl l='Home'}}
{include file='includes/header.inc.html'}

View File

@@ -10,11 +10,11 @@
</head>
<body>
<div>
{loop type="auth" name="customer_info_block" roles="ROLE_CUSTOMER" context="front"}
{loop type="auth" name="customer_info_block" roles="CUSTOMER" context="front"}
<p>Your are logged in ! <a href="{viewurl view='index' action='logoutCustomer'}">Logout</a></p>
{/loop}
{loop type="auth" name="admin_info_block" roles="ROLE_ADMIN" context="admin"}
{loop type="auth" name="admin_info_block" roles="ADMIN" context="admin"}
<p>You are logged as administrator</p>
{/loop}

View File

@@ -1,7 +1,7 @@
{include file="includes/header.html"}
<div>
{loop type="auth" name="auth_test" context="front" roles="ROLE_CUSTOMER"}
{loop type="auth" name="auth_test" context="front" roles="CUSTOMER"}
<p>Customer is authentified :-)</p>
{/loop}

View File

@@ -1,4 +1,4 @@
{check_auth context="front" roles="ROLE_CUSTOMER" login_tpl="login"}
{check_auth context="front" roles="CUSTOMER" login_tpl="login"}
{$page_title="{intl l='My Account'}"}