Added new API call: "getProjectByIdentifier"

This commit is contained in:
Frederic Guillot
2016-06-26 12:34:20 -04:00
parent b48c0cecbb
commit c110dffefe
3 changed files with 12 additions and 3 deletions

View File

@@ -25,6 +25,13 @@ class ProjectProcedure extends BaseProcedure
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()
{
return $this->formatProjects($this->projectModel->getAll());