ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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 41 of file class.ilFileSystemStorageWebAccessChecker.php.

42  {
43 
44  }

◆ 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 36 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 19 of file class.ilFileSystemStorageWebAccessChecker.php.

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

Field Documentation

◆ $object_id

ilFileSystemStorageWebAccessChecker::$object_id
protected

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

Referenced by getRepositoryObjectId().


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