Remove default swimlane

This commit is contained in:
Frederic Guillot
2017-02-18 09:42:01 -05:00
parent 0430a09c06
commit de128dbad8
77 changed files with 885 additions and 1159 deletions

View File

@@ -3,6 +3,7 @@
namespace Kanboard\Api\Procedure;
use Kanboard\Api\Authorization\ProjectAuthorization;
use Kanboard\Model\SwimlaneModel;
/**
* Swimlane API controller
@@ -15,7 +16,7 @@ class SwimlaneProcedure extends BaseProcedure
public function getActiveSwimlanes($project_id)
{
ProjectAuthorization::getInstance($this->container)->check($this->getClassName(), 'getActiveSwimlanes', $project_id);
return $this->swimlaneModel->getSwimlanes($project_id);
return $this->swimlaneModel->getAllByStatus($project_id, SwimlaneModel::ACTIVE);
}
public function getAllSwimlanes($project_id)
@@ -42,16 +43,10 @@ class SwimlaneProcedure extends BaseProcedure
return $this->swimlaneModel->getById($swimlane_id);
}
public function getDefaultSwimlane($project_id)
{
ProjectAuthorization::getInstance($this->container)->check($this->getClassName(), 'getDefaultSwimlane', $project_id);
return $this->swimlaneModel->getDefault($project_id);
}
public function addSwimlane($project_id, $name, $description = '')
{
ProjectAuthorization::getInstance($this->container)->check($this->getClassName(), 'addSwimlane', $project_id);
return $this->swimlaneModel->create(array('project_id' => $project_id, 'name' => $name, 'description' => $description));
return $this->swimlaneModel->create($project_id, $name, $description);
}
public function updateSwimlane($swimlane_id, $name, $description = null)