ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
ilObjFolderAccess Class Reference

Class ilObjFileAccess. More...

+ Inheritance diagram for ilObjFolderAccess:
+ Collaboration diagram for ilObjFolderAccess:

Public Member Functions

 _construct ()
 
 _getCommands ()
 get commands More...
 
- Public Member Functions inherited from ilObjectAccess
 _checkAccess ($a_cmd, $a_permission, $a_ref_id, $a_obj_id, $a_user_id="")
 Checks wether a user may invoke a command or not (this method is called by ilAccessHandler::checkAccess) More...
 
 _checkCondition ($a_obj_id, $a_operator, $a_value, $a_usr_id)
 check condition More...
 
 _getCommands ()
 get commands More...
 
 _checkGoto ($a_target)
 check whether goto script will succeed More...
 
 _preloadData ($a_obj_ids, $a_ref_ids)
 Preload data. More...
 

Private Member Functions

 hasDownloadAction ($ref_id)
 

Static Private Member Functions

static getFolderSettings ()
 

Static Private Attributes

static $folderSettings
 

Additional Inherited Members

- Static Public Member Functions inherited from ilObjectAccess
static _isOffline ($a_obj_id)
 Type-specific implementation of general status, has to be overwritten. More...
 

Detailed Description

Class ilObjFileAccess.

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
$Id$

Definition at line 15 of file class.ilObjFolderAccess.php.

Member Function Documentation

◆ _construct()

ilObjFolderAccess::_construct ( )

Definition at line 19 of file class.ilObjFolderAccess.php.

19 {
20 parent::__construct();
21 }

◆ _getCommands()

ilObjFolderAccess::_getCommands ( )

get commands

this method returns an array of all possible commands/permission combinations

example:
$commands = array ( array("permission" => "read", "cmd" => "view", "lang_var" => "show"), array("permission" => "write", "cmd" => "edit", "lang_var" => "edit"), );

Reimplemented from ilObjectAccess.

Definition at line 44 of file class.ilObjFolderAccess.php.

45 {
46 $commands = array();
47 $commands[] = array("permission" => "read", "cmd" => "view", "lang_var" => "show", "default" => true);
48
49 include_once './Services/WebServices/FileManager/classes/class.ilFMSettings.php';
50 if(ilFMSettings::getInstance()->isEnabled())
51 {
52 $commands[] = array(
53 'permission' => 'read',
54 'cmd' => 'fileManagerLaunch',
55 'lang_var' => 'fm_start',
56 'enable_anonymous' => false
57 );
58 }
59
60 // why here, why read permission? it just needs info_screen_enabled = true in ilObjCategoryListGUI (alex, 30.7.2008)
61 // this is not consistent, with all other objects...
62 //$commands[] = array("permission" => "read", "cmd" => "showSummary", "lang_var" => "info_short", "enable_anonymous" => "false");
64 {
65 $commands[] = array("permission" => "read", "cmd" => "downloadFolder", "lang_var" => "download", "enable_anonymous" => "false");
66 }
67 // BEGIN WebDAV: Mount Webfolder.
68 include_once ('Services/WebDAV/classes/class.ilDAVActivationChecker.php');
70 {
71 include_once './Services/WebDAV/classes/class.ilDAVUtils.php';
72 if(ilDAVUtils::getInstance()->isLocalPasswordInstructionRequired())
73 {
74 $commands[] = array('permission' => 'read', 'cmd' => 'showPasswordInstruction', 'lang_var' => 'mount_webfolder', 'enable_anonymous' => 'false');
75 }
76 else
77 {
78 $commands[] = array("permission" => "read", "cmd" => "mount_webfolder", "lang_var" => "mount_webfolder", "enable_anonymous" => "false");
79 }
80 }
81 $commands[] = array("permission" => "write", "cmd" => "enableAdministrationPanel", "lang_var" => "edit_content");
82 $commands[] = array("permission" => "write", "cmd" => "edit", "lang_var" => "settings");
83
84 return $commands;
85 }
$_GET["client_id"]
static getInstance()
Get singleton instance.
static getInstance()
Get singleton instance.

References $_GET, ilDAVActivationChecker\_isActive(), ilDAVUtils\getInstance(), ilFMSettings\getInstance(), and hasDownloadAction().

Referenced by ilObjFolderListGUI\init().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getFolderSettings()

static ilObjFolderAccess::getFolderSettings ( )
staticprivate

Definition at line 23 of file class.ilObjFolderAccess.php.

23 {
25 {
27 }
29 }
ILIAS Setting Class.

References $folderSettings.

Referenced by hasDownloadAction().

+ Here is the caller graph for this function:

◆ hasDownloadAction()

ilObjFolderAccess::hasDownloadAction (   $ref_id)
private

Definition at line 88 of file class.ilObjFolderAccess.php.

89 {
90 global $tree, $ilUser;
92 // default value should reflect previous behaviour (-> 0)
93 if ($settings->get("enable_download_folder", 0) != 1)
94 return false;
95
96 /*
97 * deactivated check for now, because wrong ref_id here!
98
99 $children = $tree->getChildsByTypeFilter($ref_id, array("file","fold"));
100
101 // no children at all, so no download button
102 if (count ($children) == 0)
103 return false;
104 // check if at least one of the children has a read permission
105 foreach ($children as $child)
106 {
107 if ($rbacsystem->checkAccessOfUser($ilUser->getId(), "read", $child["ref_id"]))
108 return true;
109 }
110 return false;
111 */
112 return true;
113 }
global $ilUser
Definition: imgupload.php:15

References $ilUser, and getFolderSettings().

Referenced by _getCommands().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $folderSettings

ilObjFolderAccess::$folderSettings
staticprivate

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

Referenced by getFolderSettings().


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