ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilObjFolderAccess Class Reference

Class ilObjFileAccess. More...

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

Static Public Member Functions

static _getCommands ()
 get commands More...
 
- Static Public Member Functions inherited from ilObjectAccess
static _getCommands ()
 get commands More...
 
static _checkGoto ($a_target)
 check whether goto script will succeed More...
 
static _isOffline ($a_obj_id)
 Type-specific implementation of general status, has to be overwritten. More...
 
static _preloadData ($a_obj_ids, $a_ref_ids)
 Preload data. More...
 

Static Private Member Functions

static getFolderSettings ()
 
static hasDownloadAction ($ref_id)
 

Static Private Attributes

static $folderSettings
 

Additional Inherited Members

- 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...
 

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

◆ _getCommands()

static ilObjFolderAccess::_getCommands ( )
static

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 40 of file class.ilObjFolderAccess.php.

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

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 19 of file class.ilObjFolderAccess.php.

19 {
21 {
23 }
25 }
ILIAS Setting Class.

References $folderSettings.

Referenced by hasDownloadAction().

+ Here is the caller graph for this function:

◆ hasDownloadAction()

static ilObjFolderAccess::hasDownloadAction (   $ref_id)
staticprivate

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

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

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: