diff options
Diffstat (limited to 'app/Model/Project.php')
-rw-r--r-- | app/Model/Project.php | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/app/Model/Project.php b/app/Model/Project.php index f802e4ed..dbb9db1b 100644 --- a/app/Model/Project.php +++ b/app/Model/Project.php @@ -98,24 +98,22 @@ class Project extends Base * Get all projects * * @access public - * @param bool $filter_permissions If true, remove projects not allowed for the current user * @return array */ - public function getAll($filter_permissions = false) + public function getAll() { - $projects = $this->db->table(self::TABLE)->asc('name')->findAll(); - - if ($filter_permissions) { - - foreach ($projects as $key => $project) { - - if (! $this->projectPermission->isUserAllowed($project['id'], $this->userSession->getId())) { - unset($projects[$key]); - } - } - } + return $this->db->table(self::TABLE)->asc('name')->findAll(); + } - return $projects; + /** + * Get all project ids + * + * @access public + * @return array + */ + public function getAllIds() + { + return $this->db->table(self::TABLE)->asc('name')->findAllByColumn('id'); } /** |