changed role names to XXXX instead of ROLE_XXXX
This commit is contained in:
@@ -31,7 +31,7 @@ interface UserInterface {
|
|||||||
* <code>
|
* <code>
|
||||||
* public function getRoles()
|
* public function getRoles()
|
||||||
* {
|
* {
|
||||||
* return array('ROLE_USER');
|
* return array('USER');
|
||||||
* }
|
* }
|
||||||
* </code>
|
* </code>
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -63,6 +63,6 @@ class Admin extends BaseAdmin implements UserInterface
|
|||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*/
|
*/
|
||||||
public function getRoles() {
|
public function getRoles() {
|
||||||
return array(new Role('ROLE_ADMIN'));
|
return array(new Role('ADMIN'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -164,6 +164,6 @@ class Customer extends BaseCustomer implements UserInterface
|
|||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*/
|
*/
|
||||||
public function getRoles() {
|
public function getRoles() {
|
||||||
return array(new Role('ROLE_CUSTOMER'));
|
return array(new Role('CUSTOMER'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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'}}
|
{$page_title={intl l='Home'}}
|
||||||
{include file='includes/header.inc.html'}
|
{include file='includes/header.inc.html'}
|
||||||
|
|
||||||
|
|||||||
@@ -10,11 +10,11 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div>
|
<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>
|
<p>Your are logged in ! <a href="{viewurl view='index' action='logoutCustomer'}">Logout</a></p>
|
||||||
{/loop}
|
{/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>
|
<p>You are logged as administrator</p>
|
||||||
{/loop}
|
{/loop}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{include file="includes/header.html"}
|
{include file="includes/header.html"}
|
||||||
<div>
|
<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>
|
<p>Customer is authentified :-)</p>
|
||||||
{/loop}
|
{/loop}
|
||||||
|
|||||||
@@ -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'}"}
|
{$page_title="{intl l='My Account'}"}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user