diff --git a/app/Controller/Project.php b/app/Controller/Project.php index 3015ecc07..f0847ef20 100644 --- a/app/Controller/Project.php +++ b/app/Controller/Project.php @@ -140,7 +140,7 @@ class Project extends Base $project = $this->getProject(); $values = $this->request->getValues(); - if ($project['is_private'] == 1) { + if ($project['is_private'] == 1 && $this->userSession->isAdmin() && ! isset($values['is_private'])) { $values += array('is_private' => 0); } diff --git a/app/Template/project/edit.php b/app/Template/project/edit.php index ffd9be00a..8b94e3785 100644 --- a/app/Template/project/edit.php +++ b/app/Template/project/edit.php @@ -13,6 +13,10 @@ = $this->formText('identifier', $values, $errors, array('maxlength="50"')) ?>
= t('The project identifier is an optional alphanumeric code used to identify your project.') ?>
+ userSession->isAdmin()): ?> + = $this->formCheckbox('is_private', t('Private project'), 1, $project['is_private'] == 1) ?> + + = $this->formLabel(t('Description'), 'description') ?>