Show only active projects in board selector

This commit is contained in:
Frederic Guillot
2015-12-17 21:38:13 -05:00
parent d0af39170c
commit c83f589b22
15 changed files with 37 additions and 25 deletions

View File

@@ -100,7 +100,7 @@ class ProjectPermission extends Base
*/
public function getActiveProjectIds($user_id)
{
return array_keys($this->projectUserRole->getProjectsByUser($user_id, array(Project::ACTIVE)));
return array_keys($this->projectUserRole->getActiveProjectsByUser($user_id));
}
/**

View File

@@ -20,7 +20,19 @@ class ProjectUserRole extends Base
const TABLE = 'project_has_users';
/**
* Get the list of project visible by the given user
* Get the list of active project for the given user
*
* @access public
* @param integer $user_id
* @return array
*/
public function getActiveProjectsByUser($user_id)
{
return $this->getProjectsByUser($user_id, $status = array(Project::ACTIVE));
}
/**
* Get the list of project visible for the given user
*
* @access public
* @param integer $user_id