【发布时间】:2016-01-13 10:21:31
【问题描述】:
如何根据组id根据登录用户显示模板以及如何根据用户组限制对控制器的访问。
我的控制器:
public function index()
{
if (!$this->ion_auth->in_group('admin'))
{
$this->template->administrator('dashboard/dashboard');
}
elseif (!$this->ion_auth->in_group('2'))
{
$this->template->admin('dashboard/dashboard');
}
elseif (!$this->ion_auth->in_group('3'))
{
$this->template->user('dashboard/dashboard');
}
elseif (!$this->ion_auth->in_group('members'))
{
$this->template->client('dashboard/dashboard');
}
else
{
redirect('account/sign_in', 'refresh');
}
}
【问题讨论】:
标签: authentication acl ion-auth