diff options
Diffstat (limited to 'app/Controller')
-rw-r--r-- | app/Controller/Project.php | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/app/Controller/Project.php b/app/Controller/Project.php index a4ebdbc0..2b0258d5 100644 --- a/app/Controller/Project.php +++ b/app/Controller/Project.php @@ -184,6 +184,30 @@ class Project extends Base } /** + * Allow everybody + * + * @access public + */ + public function allowEverybody() + { + $project = $this->getProjectManagement(); + $values = $this->request->getValues() + array('is_everybody_allowed' => 0); + list($valid,) = $this->projectPermission->validateProjectModification($values); + + if ($valid) { + + if ($this->project->update($values)) { + $this->session->flash(t('Project updated successfully.')); + } + else { + $this->session->flashError(t('Unable to update this project.')); + } + } + + $this->response->redirect('?controller=project&action=users&project_id='.$project['id']); + } + + /** * Allow a specific user (admin only) * * @access public @@ -191,7 +215,7 @@ class Project extends Base public function allow() { $values = $this->request->getValues(); - list($valid,) = $this->projectPermission->validateModification($values); + list($valid,) = $this->projectPermission->validateUserModification($values); if ($valid) { |