Make sure no empty group is submitted on project permissions page
This commit is contained in:
@@ -135,10 +135,14 @@ class ProjectPermissionController extends BaseController
|
|||||||
$values['group_id'] = $this->groupModel->getOrCreateExternalGroupId($values['name'], $values['external_id']);
|
$values['group_id'] = $this->groupModel->getOrCreateExternalGroupId($values['name'], $values['external_id']);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->projectGroupRoleModel->addGroup($project['id'], $values['group_id'], $values['role'])) {
|
if (empty($values['group_id'])) {
|
||||||
$this->flash->success(t('Project updated successfully.'));
|
$this->flash->failure(t('Unable to find this group.'));
|
||||||
} else {
|
} 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'])));
|
$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"' => '',
|
// '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' => '',
|
// 'The link with the relation "%s" to the task %s has been removed' => '',
|
||||||
// 'Custom Filter:' => '',
|
// '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"' => '',
|
// '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' => '',
|
// 'The link with the relation "%s" to the task %s has been removed' => '',
|
||||||
// 'Custom Filter:' => '',
|
// '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"' => '',
|
// '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' => '',
|
// 'The link with the relation "%s" to the task %s has been removed' => '',
|
||||||
// 'Custom Filter:' => '',
|
// '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"' => '',
|
// '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' => '',
|
// 'The link with the relation "%s" to the task %s has been removed' => '',
|
||||||
// 'Custom Filter:' => '',
|
// '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"',
|
'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',
|
'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:',
|
'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"' => '',
|
// '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' => '',
|
// 'The link with the relation "%s" to the task %s has been removed' => '',
|
||||||
// 'Custom Filter:' => '',
|
// '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"' => '',
|
// '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' => '',
|
// 'The link with the relation "%s" to the task %s has been removed' => '',
|
||||||
// 'Custom Filter:' => '',
|
// '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"' => '',
|
// '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' => '',
|
// 'The link with the relation "%s" to the task %s has been removed' => '',
|
||||||
// 'Custom Filter:' => '',
|
// '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 »',
|
'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é',
|
'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é :',
|
'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"' => '',
|
// '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' => '',
|
// 'The link with the relation "%s" to the task %s has been removed' => '',
|
||||||
// 'Custom Filter:' => '',
|
// '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"' => '',
|
// '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' => '',
|
// 'The link with the relation "%s" to the task %s has been removed' => '',
|
||||||
// 'Custom Filter:' => '',
|
// '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"' => '',
|
// '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' => '',
|
// 'The link with the relation "%s" to the task %s has been removed' => '',
|
||||||
// 'Custom Filter:' => '',
|
// '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"' => '',
|
// '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' => '',
|
// 'The link with the relation "%s" to the task %s has been removed' => '',
|
||||||
// 'Custom Filter:' => '',
|
// '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"' => '',
|
// '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' => '',
|
// 'The link with the relation "%s" to the task %s has been removed' => '',
|
||||||
// 'Custom Filter:' => '',
|
// '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"' => '',
|
// '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' => '',
|
// 'The link with the relation "%s" to the task %s has been removed' => '',
|
||||||
// 'Custom Filter:' => '',
|
// '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"' => '',
|
// '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' => '',
|
// 'The link with the relation "%s" to the task %s has been removed' => '',
|
||||||
// 'Custom Filter:' => '',
|
// '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"' => '',
|
// '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' => '',
|
// 'The link with the relation "%s" to the task %s has been removed' => '',
|
||||||
// 'Custom Filter:' => '',
|
// '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"' => '',
|
// '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' => '',
|
// 'The link with the relation "%s" to the task %s has been removed' => '',
|
||||||
// 'Custom Filter:' => '',
|
// '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"' => '',
|
// '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' => '',
|
// 'The link with the relation "%s" to the task %s has been removed' => '',
|
||||||
// 'Custom Filter:' => '',
|
// '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"' => '',
|
// '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' => '',
|
// 'The link with the relation "%s" to the task %s has been removed' => '',
|
||||||
// 'Custom Filter:' => '',
|
// '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"' => '',
|
// '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' => '',
|
// 'The link with the relation "%s" to the task %s has been removed' => '',
|
||||||
// 'Custom Filter:' => '',
|
// '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"' => '',
|
// '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' => '',
|
// 'The link with the relation "%s" to the task %s has been removed' => '',
|
||||||
// 'Custom Filter:' => '',
|
// '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"' => '',
|
// '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' => '',
|
// 'The link with the relation "%s" to the task %s has been removed' => '',
|
||||||
// 'Custom Filter:' => '',
|
// '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"' => '',
|
// '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' => '',
|
// 'The link with the relation "%s" to the task %s has been removed' => '',
|
||||||
// 'Custom Filter:' => '',
|
// '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"' => '',
|
// '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' => '',
|
// 'The link with the relation "%s" to the task %s has been removed' => '',
|
||||||
// 'Custom Filter:' => '',
|
// '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"' => '',
|
// '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' => '',
|
// 'The link with the relation "%s" to the task %s has been removed' => '',
|
||||||
// 'Custom Filter:' => '',
|
// '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"' => '',
|
// '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' => '',
|
// 'The link with the relation "%s" to the task %s has been removed' => '',
|
||||||
// 'Custom Filter:' => '',
|
// '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"' => '',
|
// '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' => '',
|
// 'The link with the relation "%s" to the task %s has been removed' => '',
|
||||||
// 'Custom Filter:' => '',
|
// '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"' => '',
|
// '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' => '',
|
// 'The link with the relation "%s" to the task %s has been removed' => '',
|
||||||
// 'Custom Filter:' => '',
|
// '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"' => '',
|
// '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' => '',
|
// 'The link with the relation "%s" to the task %s has been removed' => '',
|
||||||
// 'Custom Filter:' => '',
|
// 'Custom Filter:' => '',
|
||||||
|
// 'Unable to find this group.' => '',
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user