ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
class.ilPortfolioWebAccessChecker.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4include_once "Services/FileSystem/classes/class.ilFileSystemStorageWebAccessChecker.php";
5
15{
16 protected $prtf_id; // [int]
17
18 public function isValidPath(array $a_path)
19 {
20 if(parent::isValidPath($a_path))
21 {
22 // portfolio (not in repository)?
23 if(ilObject::_lookupType($this->object_id) == "prtf")
24 {
25 $this->prtf_id = $this->object_id;
26 $this->object_id = null; // force custom check
27 }
28
29 return true;
30 }
31 }
32
33 public function checkAccess(array $a_users)
34 {
35 include_once "Modules/Portfolio/classes/class.ilPortfolioAccessHandler.php";
36 $access_handler = new ilPortfolioAccessHandler();
37 foreach ($a_users as $user_id)
38 {
39 if ($access_handler->checkAccessOfUser($user_id, "read", "view", $this->prtf_id, "prtf"))
40 {
41 return true;
42 }
43 }
44 return false;
45 }
46}
47
static _lookupType($a_id, $a_reference=false)
lookup object type
Access handler for portfolio.
Class ilPortfolioWebAccessChecker.
isValidPath(array $a_path)
Check if current (image) path is valid.
checkAccess(array $a_users)
Custom access method.