Fix bug: editing private project enable user management
This commit is contained in:
@@ -140,7 +140,7 @@ class Project extends Base
|
|||||||
$project = $this->getProject();
|
$project = $this->getProject();
|
||||||
$values = $this->request->getValues();
|
$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);
|
$values += array('is_private' => 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,10 @@
|
|||||||
<?= $this->formText('identifier', $values, $errors, array('maxlength="50"')) ?>
|
<?= $this->formText('identifier', $values, $errors, array('maxlength="50"')) ?>
|
||||||
<p class="form-help"><?= t('The project identifier is an optional alphanumeric code used to identify your project.') ?></p>
|
<p class="form-help"><?= t('The project identifier is an optional alphanumeric code used to identify your project.') ?></p>
|
||||||
|
|
||||||
|
<?php if ($this->userSession->isAdmin()): ?>
|
||||||
|
<?= $this->formCheckbox('is_private', t('Private project'), 1, $project['is_private'] == 1) ?>
|
||||||
|
<?php endif ?>
|
||||||
|
|
||||||
<?= $this->formLabel(t('Description'), 'description') ?>
|
<?= $this->formLabel(t('Description'), 'description') ?>
|
||||||
|
|
||||||
<div class="form-tabs">
|
<div class="form-tabs">
|
||||||
@@ -34,10 +38,6 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="form-help"><a href="http://kanboard.net/documentation/syntax-guide" target="_blank" rel="noreferrer"><?= t('Write your text in Markdown') ?></a></div>
|
<div class="form-help"><a href="http://kanboard.net/documentation/syntax-guide" target="_blank" rel="noreferrer"><?= t('Write your text in Markdown') ?></a></div>
|
||||||
|
|
||||||
<?php if ($project['is_private'] == 1 && $this->userSession->isAdmin()): ?>
|
|
||||||
<?= $this->formCheckbox('is_private', t('Private project'), 1, $project['is_private'] == 1) ?>
|
|
||||||
<?php endif ?>
|
|
||||||
|
|
||||||
<div class="form-actions">
|
<div class="form-actions">
|
||||||
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
|
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user