Commit ac1022e8 authored by King Alex's avatar King Alex

maj

parent a424727d
......@@ -25,41 +25,7 @@ class HomeController extends BaseController {
}
}
public function refresh()
{
/*
$owner = new Role;
$owner->name = 'Owner';
$admin = new Role;
$admin->name = 'Admin';
$admin = new Role;
$admin->name = 'User';
$managePosts = new Permission;
$managePosts->name = 'manage_posts';
$managePosts->display_name = 'Manage Posts';
$manageUsers = new Permission;
$manageUsers->name = 'manage_users';
$manageUsers->display_name = 'Manage Users';
$owner->perms()->sync(array($managePosts->id,$manageUsers->id));
$admin->perms()->sync(array($managePosts->id));
*/
$user = Confide::user();
var_dump($user);
var_dump($user->hasRole("Owner") ); // false
var_dump($user->hasRole("Admin") ); // true
var_dump($user->can("manage_posts") ); // true
var_dump($user->can("manage_users") ); // false
die();
public function refresh(){
return Redirect::action('UsersController@login');
}
public function test()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment