Make sure no empty group is submitted on project permissions page
This commit is contained in:
parent
0b306fa60a
commit
f6e2dea411
|
|
@ -135,10 +135,14 @@ class ProjectPermissionController extends BaseController
|
|||
$values['group_id'] = $this->groupModel->getOrCreateExternalGroupId($values['name'], $values['external_id']);
|
||||
}
|
||||
|
||||
if ($this->projectGroupRoleModel->addGroup($project['id'], $values['group_id'], $values['role'])) {
|
||||
$this->flash->success(t('Project updated successfully.'));
|
||||
if (empty($values['group_id'])) {
|
||||
$this->flash->failure(t('Unable to find this group.'));
|
||||
} else {
|
||||
$this->flash->failure(t('Unable to update this project.'));
|
||||
if ($this->projectGroupRoleModel->addGroup($project['id'], $values['group_id'], $values['role'])) {
|
||||
$this->flash->success(t('Project updated successfully.'));
|
||||
} else {
|
||||
$this->flash->failure(t('Unable to update this project.'));
|
||||
}
|
||||
}
|
||||
|
||||
$this->response->redirect($this->helper->url->to('ProjectPermissionController', 'index', array('project_id' => $project['id'])));
|
||||
|
|
|
|||
|
|
@ -1376,4 +1376,5 @@ return array(
|
|||
// 'This task is now linked to the task %s with the relation "%s"' => '',
|
||||
// 'The link with the relation "%s" to the task %s has been removed' => '',
|
||||
// 'Custom Filter:' => '',
|
||||
// 'Unable to find this group.' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1376,4 +1376,5 @@ return array(
|
|||
// 'This task is now linked to the task %s with the relation "%s"' => '',
|
||||
// 'The link with the relation "%s" to the task %s has been removed' => '',
|
||||
// 'Custom Filter:' => '',
|
||||
// 'Unable to find this group.' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1376,4 +1376,5 @@ return array(
|
|||
// 'This task is now linked to the task %s with the relation "%s"' => '',
|
||||
// 'The link with the relation "%s" to the task %s has been removed' => '',
|
||||
// 'Custom Filter:' => '',
|
||||
// 'Unable to find this group.' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1376,4 +1376,5 @@ return array(
|
|||
// 'This task is now linked to the task %s with the relation "%s"' => '',
|
||||
// 'The link with the relation "%s" to the task %s has been removed' => '',
|
||||
// 'Custom Filter:' => '',
|
||||
// 'Unable to find this group.' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1376,4 +1376,5 @@ return array(
|
|||
'This task is now linked to the task %s with the relation "%s"' => 'Diese Aufgabe ist jetzt verknüpft mit der Aufgabe %s mit der Relation "%s"',
|
||||
'The link with the relation "%s" to the task %s has been removed' => 'Die Verknüpfung mit der Relation "%s" zur Aufgabe %s wurde entfernt',
|
||||
'Custom Filter:' => 'Benutzerdefinierter Filter:',
|
||||
// 'Unable to find this group.' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1376,4 +1376,5 @@ return array(
|
|||
// 'This task is now linked to the task %s with the relation "%s"' => '',
|
||||
// 'The link with the relation "%s" to the task %s has been removed' => '',
|
||||
// 'Custom Filter:' => '',
|
||||
// 'Unable to find this group.' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1376,4 +1376,5 @@ return array(
|
|||
// 'This task is now linked to the task %s with the relation "%s"' => '',
|
||||
// 'The link with the relation "%s" to the task %s has been removed' => '',
|
||||
// 'Custom Filter:' => '',
|
||||
// 'Unable to find this group.' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1376,4 +1376,5 @@ return array(
|
|||
// 'This task is now linked to the task %s with the relation "%s"' => '',
|
||||
// 'The link with the relation "%s" to the task %s has been removed' => '',
|
||||
// 'Custom Filter:' => '',
|
||||
// 'Unable to find this group.' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1376,4 +1376,5 @@ return array(
|
|||
'This task is now linked to the task %s with the relation "%s"' => 'Cette tâche est maintenant liée à la tâche %s avec la relation « %s »',
|
||||
'The link with the relation "%s" to the task %s has been removed' => 'Le lien avec la relation « %s » de la tâche %s a été supprimé',
|
||||
'Custom Filter:' => 'Filtre personalisé :',
|
||||
'Unable to find this group.' => 'Impossible de trouver ce groupe.',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1376,4 +1376,5 @@ return array(
|
|||
// 'This task is now linked to the task %s with the relation "%s"' => '',
|
||||
// 'The link with the relation "%s" to the task %s has been removed' => '',
|
||||
// 'Custom Filter:' => '',
|
||||
// 'Unable to find this group.' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1376,4 +1376,5 @@ return array(
|
|||
// 'This task is now linked to the task %s with the relation "%s"' => '',
|
||||
// 'The link with the relation "%s" to the task %s has been removed' => '',
|
||||
// 'Custom Filter:' => '',
|
||||
// 'Unable to find this group.' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1376,4 +1376,5 @@ return array(
|
|||
// 'This task is now linked to the task %s with the relation "%s"' => '',
|
||||
// 'The link with the relation "%s" to the task %s has been removed' => '',
|
||||
// 'Custom Filter:' => '',
|
||||
// 'Unable to find this group.' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1376,4 +1376,5 @@ return array(
|
|||
// 'This task is now linked to the task %s with the relation "%s"' => '',
|
||||
// 'The link with the relation "%s" to the task %s has been removed' => '',
|
||||
// 'Custom Filter:' => '',
|
||||
// 'Unable to find this group.' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1376,4 +1376,5 @@ return array(
|
|||
// 'This task is now linked to the task %s with the relation "%s"' => '',
|
||||
// 'The link with the relation "%s" to the task %s has been removed' => '',
|
||||
// 'Custom Filter:' => '',
|
||||
// 'Unable to find this group.' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1376,4 +1376,5 @@ return array(
|
|||
// 'This task is now linked to the task %s with the relation "%s"' => '',
|
||||
// 'The link with the relation "%s" to the task %s has been removed' => '',
|
||||
// 'Custom Filter:' => '',
|
||||
// 'Unable to find this group.' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1376,4 +1376,5 @@ return array(
|
|||
// 'This task is now linked to the task %s with the relation "%s"' => '',
|
||||
// 'The link with the relation "%s" to the task %s has been removed' => '',
|
||||
// 'Custom Filter:' => '',
|
||||
// 'Unable to find this group.' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1376,4 +1376,5 @@ return array(
|
|||
// 'This task is now linked to the task %s with the relation "%s"' => '',
|
||||
// 'The link with the relation "%s" to the task %s has been removed' => '',
|
||||
// 'Custom Filter:' => '',
|
||||
// 'Unable to find this group.' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1376,4 +1376,5 @@ return array(
|
|||
// 'This task is now linked to the task %s with the relation "%s"' => '',
|
||||
// 'The link with the relation "%s" to the task %s has been removed' => '',
|
||||
// 'Custom Filter:' => '',
|
||||
// 'Unable to find this group.' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1376,4 +1376,5 @@ return array(
|
|||
// 'This task is now linked to the task %s with the relation "%s"' => '',
|
||||
// 'The link with the relation "%s" to the task %s has been removed' => '',
|
||||
// 'Custom Filter:' => '',
|
||||
// 'Unable to find this group.' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1376,4 +1376,5 @@ return array(
|
|||
// 'This task is now linked to the task %s with the relation "%s"' => '',
|
||||
// 'The link with the relation "%s" to the task %s has been removed' => '',
|
||||
// 'Custom Filter:' => '',
|
||||
// 'Unable to find this group.' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1376,4 +1376,5 @@ return array(
|
|||
// 'This task is now linked to the task %s with the relation "%s"' => '',
|
||||
// 'The link with the relation "%s" to the task %s has been removed' => '',
|
||||
// 'Custom Filter:' => '',
|
||||
// 'Unable to find this group.' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1376,4 +1376,5 @@ return array(
|
|||
// 'This task is now linked to the task %s with the relation "%s"' => '',
|
||||
// 'The link with the relation "%s" to the task %s has been removed' => '',
|
||||
// 'Custom Filter:' => '',
|
||||
// 'Unable to find this group.' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1376,4 +1376,5 @@ return array(
|
|||
// 'This task is now linked to the task %s with the relation "%s"' => '',
|
||||
// 'The link with the relation "%s" to the task %s has been removed' => '',
|
||||
// 'Custom Filter:' => '',
|
||||
// 'Unable to find this group.' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1376,4 +1376,5 @@ return array(
|
|||
// 'This task is now linked to the task %s with the relation "%s"' => '',
|
||||
// 'The link with the relation "%s" to the task %s has been removed' => '',
|
||||
// 'Custom Filter:' => '',
|
||||
// 'Unable to find this group.' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1376,4 +1376,5 @@ return array(
|
|||
// 'This task is now linked to the task %s with the relation "%s"' => '',
|
||||
// 'The link with the relation "%s" to the task %s has been removed' => '',
|
||||
// 'Custom Filter:' => '',
|
||||
// 'Unable to find this group.' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1376,4 +1376,5 @@ return array(
|
|||
// 'This task is now linked to the task %s with the relation "%s"' => '',
|
||||
// 'The link with the relation "%s" to the task %s has been removed' => '',
|
||||
// 'Custom Filter:' => '',
|
||||
// 'Unable to find this group.' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1376,4 +1376,5 @@ return array(
|
|||
// 'This task is now linked to the task %s with the relation "%s"' => '',
|
||||
// 'The link with the relation "%s" to the task %s has been removed' => '',
|
||||
// 'Custom Filter:' => '',
|
||||
// 'Unable to find this group.' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1376,4 +1376,5 @@ return array(
|
|||
// 'This task is now linked to the task %s with the relation "%s"' => '',
|
||||
// 'The link with the relation "%s" to the task %s has been removed' => '',
|
||||
// 'Custom Filter:' => '',
|
||||
// 'Unable to find this group.' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1376,4 +1376,5 @@ return array(
|
|||
// 'This task is now linked to the task %s with the relation "%s"' => '',
|
||||
// 'The link with the relation "%s" to the task %s has been removed' => '',
|
||||
// 'Custom Filter:' => '',
|
||||
// 'Unable to find this group.' => '',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1376,4 +1376,5 @@ return array(
|
|||
// 'This task is now linked to the task %s with the relation "%s"' => '',
|
||||
// 'The link with the relation "%s" to the task %s has been removed' => '',
|
||||
// 'Custom Filter:' => '',
|
||||
// 'Unable to find this group.' => '',
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in New Issue