<?php
/**
 * @copyright (c) Kufer Software GmbH, Loisachstrasse 4, D-84453 Mühldorf
 */

namespace Kufer\KuferTools\Mitarbeiter\KursUebersicht\Detailsreiter\Downloads;

class DownloadsUseCase extends \Kufer\KuferTools\Basis\Kursdetails\DetailsReiter\Downloads\DownloadsUseCase
{
  public static function getToolId()
  {
    return \ToolsAPI::TOOL_KURSPLANUNG_MA; 
  }

  public static function getToolSectionId()
  {
    return 375;
  }

  
  public function hasAccess($pToolSectionId = null)
  {
    if (!parent::hasAccess()) {
      return false;
    }
    
    if (!$this->isRechtAllowed('377.1.6')) {
      return false;
    }

    return true;
  }

  
  protected function isAllowedBearbeiten()
  {
    return $this->isRechtAllowed('375.0.3');
  }

  
  protected function isAllowedDelete($pDokumente)
  {
    return $this->isRechtAllowed('375.0.4') && $this->areButtonsAllowed4DbAccess();
  }
}