ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f87
ilFileSystemStorageWebAccessChecker Class Reference

Class ilFileSystemStorageWebAccessChecker. More...

+ Inheritance diagram for ilFileSystemStorageWebAccessChecker:
+ Collaboration diagram for ilFileSystemStorageWebAccessChecker:

Public Member Functions

 isValidPath (array $a_path)
 Check if current (image) path is valid. More...
 
 getRepositoryObjectId ()
 Get repository object id from path if any. More...
 
 checkAccess (array $a_user_ids)
 Custom access method. More...
 

Protected Attributes

 $object_id
 

Detailed Description

Member Function Documentation

◆ checkAccess()

ilFileSystemStorageWebAccessChecker::checkAccess ( array  $a_user_ids)

Custom access method.

Parameters
array$a_user_ids
Returns
bool

Implements ilComponentWebAccessChecker.

Definition at line 40 of file class.ilFileSystemStorageWebAccessChecker.php.

41  {
42 
43  }

◆ getRepositoryObjectId()

ilFileSystemStorageWebAccessChecker::getRepositoryObjectId ( )

Get repository object id from path if any.

If an object id is returned a simple RBAC-based access check is done

Returns
int

Implements ilComponentWebAccessChecker.

Definition at line 35 of file class.ilFileSystemStorageWebAccessChecker.php.

References $object_id.

◆ isValidPath()

ilFileSystemStorageWebAccessChecker::isValidPath ( array  $a_path)

Check if current (image) path is valid.

Parameters
array$a_path
Returns
bool

Implements ilComponentWebAccessChecker.

Definition at line 18 of file class.ilFileSystemStorageWebAccessChecker.php.

19  {
20  // last element is file
21  array_pop($a_path);
22 
23  // 2nd to last: directory with object id
24  $dir = array_pop($a_path);
25 
26  // extract id from directory title
27  $obj_id = (int)array_pop(explode("_", $dir));
28  if((int)$obj_id)
29  {
30  $this->object_id = $obj_id;
31  return true;
32  }
33  }

Field Documentation

◆ $object_id

ilFileSystemStorageWebAccessChecker::$object_id
protected

The documentation for this class was generated from the following file: