From d5c4c18ea0bd6c0d1a9d0104c1c17748a35f85a7 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sat, 4 Feb 2017 16:03:29 -0500 Subject: Add email address field for projects --- app/Api/Procedure/ProjectProcedure.php | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'app/Api/Procedure/ProjectProcedure.php') diff --git a/app/Api/Procedure/ProjectProcedure.php b/app/Api/Procedure/ProjectProcedure.php index a580c8d9..e8a34cd3 100644 --- a/app/Api/Procedure/ProjectProcedure.php +++ b/app/Api/Procedure/ProjectProcedure.php @@ -32,6 +32,13 @@ class ProjectProcedure extends BaseProcedure return $this->formatProject($project); } + public function getProjectByEmail($email) + { + $project = $this->formatProject($this->projectModel->getByEmail($email)); + ProjectAuthorization::getInstance($this->container)->check($this->getClassName(), 'getProjectByEmail', $project['id']); + return $this->formatProject($project); + } + public function getAllProjects() { return $this->formatProjects($this->projectModel->getAll()); -- cgit v1.2.3