When creating a new project, have the possibility to select another project to duplicate

This commit is contained in:
Frederic Guillot
2016-01-31 17:46:19 -05:00
parent 1500ff92b2
commit fc21d3873e
30 changed files with 694 additions and 342 deletions

View File

@@ -89,11 +89,11 @@ class ProjectEdit extends Base
{
if ($redirect === 'edit') {
if (isset($values['is_private'])) {
if (! $this->helper->user->hasProjectAccess('project', 'create', $project['id'])) {
if (! $this->helper->user->hasProjectAccess('ProjectCreation', 'create', $project['id'])) {
unset($values['is_private']);
}
} elseif ($project['is_private'] == 1 && ! isset($values['is_private'])) {
if ($this->helper->user->hasProjectAccess('project', 'create', $project['id'])) {
if ($this->helper->user->hasProjectAccess('ProjectCreation', 'create', $project['id'])) {
$values += array('is_private' => 0);
}
}