<?php #lnk/xx_prozesse_fortschritte/class.php

class Prozesse_FortschritteLink extends BaseLink
{
  private $prozessListe;
  
  public function __construct($database, $keyvaluestore, $manager, $info, $page) {
    parent::__construct($database, $keyvaluestore, $manager, $info, $page);
    
    $this->prozessListe = $this->man->objects["Prozesse"];
  }
  
  protected function insert($ids) {
    if ($this->man->user->HasRight($this->adminRight)) {
      return $this->prozessListe->CheckStep($ids["Schritt"], true);
    }
    return 403;
  }
  
  protected function remove($ids) {
    if ($this->man->user->HasRight($this->adminRight)) {
      return $this->prozessListe->CheckStep($ids["Schritt"], false);
    }
    return 403;
  }
  
  protected function update($ids) {
    if ($this->man->user->HasRight($this->adminRight)) {
      return $this->prozessListe->DoHelfer($ids["Schritt"], $this->man->input["helferID"]);
    }
    return 403;
  }
}
