Added new API call: "getProjectByIdentifier"
This commit is contained in:
@@ -4,14 +4,15 @@ Version 1.0.31 (unreleased)
|
|||||||
New features:
|
New features:
|
||||||
|
|
||||||
* Added application and project roles validation for API procedure calls
|
* Added application and project roles validation for API procedure calls
|
||||||
|
* Added new API call: "getProjectByIdentifier"
|
||||||
|
|
||||||
Improvements:
|
Improvements:
|
||||||
|
|
||||||
* Added argument owner_id and identifier to project API calls
|
* Added argument owner_id and identifier to project API calls
|
||||||
* Rewrite integration tests to run with Docker containers
|
* Rewrite integration tests to run with Docker containers
|
||||||
* Use the same task form layout everywhere
|
* Use the same task form layout everywhere
|
||||||
* Remove some tasks dropdown menus that are now available with task edit form
|
* Removed some tasks dropdown menus that are now available with task edit form
|
||||||
* Make embedded documentation available in multiple languages
|
* Make embedded documentation readable in multiple languages (if a translation is available)
|
||||||
|
|
||||||
Bug fixes:
|
Bug fixes:
|
||||||
|
|
||||||
|
|||||||
@@ -25,6 +25,13 @@ class ProjectProcedure extends BaseProcedure
|
|||||||
return $this->formatProject($project);
|
return $this->formatProject($project);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getProjectByIdentifier($identifier)
|
||||||
|
{
|
||||||
|
$project = $this->formatProject($this->projectModel->getByIdentifier($identifier));
|
||||||
|
ProjectAuthorization::getInstance($this->container)->check($this->getClassName(), 'getProjectByIdentifier', $project['id']);
|
||||||
|
return $this->formatProject($project);
|
||||||
|
}
|
||||||
|
|
||||||
public function getAllProjects()
|
public function getAllProjects()
|
||||||
{
|
{
|
||||||
return $this->formatProjects($this->projectModel->getAll());
|
return $this->formatProjects($this->projectModel->getAll());
|
||||||
|
|||||||
@@ -93,7 +93,8 @@ class ProjectProcedureTest extends BaseProcedureTest
|
|||||||
|
|
||||||
$this->assertNotFalse($projectId);
|
$this->assertNotFalse($projectId);
|
||||||
|
|
||||||
$project = $this->app->getProjectById($projectId);
|
$project = $this->app->getProjectByIdentifier('MYPROJECTWITHIDENTIFIER');
|
||||||
|
$this->assertEquals($projectId, $project['id']);
|
||||||
$this->assertEquals('My project with an identifier', $project['name']);
|
$this->assertEquals('My project with an identifier', $project['name']);
|
||||||
$this->assertEquals('MYPROJECTWITHIDENTIFIER', $project['identifier']);
|
$this->assertEquals('MYPROJECTWITHIDENTIFIER', $project['identifier']);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user