* when identify a user, fetch groups of him thus when check priv of projects, use groups stored in session.

This commit is contained in:
wangchunsheng
2012-08-28 01:06:23 +00:00
parent fff1597dd5
commit 6c6abc6590
2 changed files with 3 additions and 0 deletions
+1
View File
@@ -360,6 +360,7 @@ class user extends control
{
/* Authorize him and save to session. */
$user->rights = $this->user->authorize($account);
$user->groups = $this->user->getGroups($account);
$this->session->set('user', $user);
$this->app->user = $this->session->user;
$this->loadModel('action')->create('user', $user->id, 'login');
+2
View File
@@ -305,6 +305,7 @@ class userModel extends model
if(!$user) return false;
$user->rights = $this->authorize($account);
$user->groups = $this->user->getGroups($account);
$this->session->set('user', $user);
$this->app->user = $this->session->user;
$this->loadModel('action')->create('user', $user->id, 'login');
@@ -324,6 +325,7 @@ class userModel extends model
if(!$user) return false;
$user->rights = $this->authorize($account);
$user->groups = $this->user->getGroups($account);
$this->session->set('user', $user);
$this->app->user = $this->session->user;
$this->loadModel('action')->create('user', $user->id, 'login');