Fix access check for projects

This commit is contained in:
Eike Foken
2011-09-08 16:00:49 +02:00
parent e106201d9d
commit 2a533dc9f1
2 changed files with 26 additions and 1 deletions

View File

@@ -183,7 +183,8 @@ class Projects extends CI_Controller {
*/
private function _checkAccess($projectId) {
$project = $this->project->getById($projectId);
return $this->access->isAdmin() || $project['public'] == 1;
$share = $this->share->get($projectId, $this->session->userdata('user_id'));
return $this->access->isAdmin() || $project['public'] == 1 || isset($share['project_id']);
}
}