403Webshell
Server IP : 185.252.147.100  /  Your IP : 216.73.216.43
Web Server : nginx/1.27.3
System : Linux mitrofanov.ru 6.1.0-37-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.140-1 (2025-05-22) x86_64
User : mitr ( 1000)
PHP Version : 8.2.29
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /www/html/kanboard/app/Api/Procedure/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/html/kanboard/app/Api/Procedure/SwimlaneProcedure.php
<?php

namespace Kanboard\Api\Procedure;

use Kanboard\Api\Authorization\ProjectAuthorization;
use Kanboard\Model\SwimlaneModel;

/**
 * Swimlane API controller
 *
 * @package  Kanboard\Api\Procedure
 * @author   Frederic Guillot
 */
class SwimlaneProcedure extends BaseProcedure
{
    public function getActiveSwimlanes($project_id)
    {
        ProjectAuthorization::getInstance($this->container)->check($this->getClassName(), 'getActiveSwimlanes', $project_id);
        return $this->swimlaneModel->getAllByStatus($project_id, SwimlaneModel::ACTIVE);
    }

    public function getAllSwimlanes($project_id)
    {
        ProjectAuthorization::getInstance($this->container)->check($this->getClassName(), 'getAllSwimlanes', $project_id);
        return $this->swimlaneModel->getAll($project_id);
    }

    public function getSwimlaneById($swimlane_id)
    {
        $swimlane = $this->swimlaneModel->getById($swimlane_id);
        ProjectAuthorization::getInstance($this->container)->check($this->getClassName(), 'getSwimlaneById', $swimlane['project_id']);
        return $swimlane;
    }

    public function getSwimlaneByName($project_id, $name)
    {
        ProjectAuthorization::getInstance($this->container)->check($this->getClassName(), 'getSwimlaneByName', $project_id);
        return $this->swimlaneModel->getByName($project_id, $name);
    }

    public function getSwimlane($swimlane_id)
    {
        return $this->swimlaneModel->getById($swimlane_id);
    }

    public function addSwimlane($project_id, $name, $description = '')
    {
        ProjectAuthorization::getInstance($this->container)->check($this->getClassName(), 'addSwimlane', $project_id);
        return $this->swimlaneModel->create($project_id, $name, $description);
    }

    public function updateSwimlane($project_id, $swimlane_id, $name, $description = null)
    {
        ProjectAuthorization::getInstance($this->container)->check($this->getClassName(), 'updateSwimlane', $project_id);

        $values = array(
            'project_id' => $project_id,
            'id'         => $swimlane_id,
            'name'       => $name,
        );

        if (! is_null($description)) {
            $values['description'] = $description;
        }

        list($valid, $errors) = $this->swimlaneValidator->validateModification($values);

        if (! $valid) {
            $this->logger->debug(__METHOD__.': Validation error: '.var_export($errors, true));
            return false;
        }

        return $this->swimlaneModel->update($swimlane_id, $values);
    }

    public function removeSwimlane($project_id, $swimlane_id)
    {
        ProjectAuthorization::getInstance($this->container)->check($this->getClassName(), 'removeSwimlane', $project_id);
        return $this->swimlaneModel->remove($project_id, $swimlane_id);
    }

    public function disableSwimlane($project_id, $swimlane_id)
    {
        ProjectAuthorization::getInstance($this->container)->check($this->getClassName(), 'disableSwimlane', $project_id);
        return $this->swimlaneModel->disable($project_id, $swimlane_id);
    }

    public function enableSwimlane($project_id, $swimlane_id)
    {
        ProjectAuthorization::getInstance($this->container)->check($this->getClassName(), 'enableSwimlane', $project_id);
        return $this->swimlaneModel->enable($project_id, $swimlane_id);
    }

    public function changeSwimlanePosition($project_id, $swimlane_id, $position)
    {
        ProjectAuthorization::getInstance($this->container)->check($this->getClassName(), 'changeSwimlanePosition', $project_id);
        return $this->swimlaneModel->changePosition($project_id, $swimlane_id, $position);
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit