ILIAS  Release_4_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilObjFolderAccess Class Reference

Class ilObjFileAccess. More...

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

Public Member Functions

 _construct ()
 _getCommands ()
 get commands
- 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)
 _checkCondition ($a_obj_id, $a_operator, $a_value, $a_usr_id=0)
 check condition
 _checkGoto ($a_target)
 check whether goto script will succeed

Private Member Functions

 hasDownloadAction ($ref_id)

Static Private Member Functions

static getFolderSettings ()

Static Private Attributes

static $folderSettings

Detailed Description

Class ilObjFileAccess.

Author
Stefan Meyer smeye.nosp@m.r@da.nosp@m.tabay.nosp@m..de
Version
Id:
class.ilObjFolderAccess.php 20139 2009-06-08 09:45:39Z akill

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

Member Function Documentation

ilObjFolderAccess::_construct ( )

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

{
parent::__construct();
}
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 63 of file class.ilObjFolderAccess.php.

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

Referenced by ilObjFolderListGUI\init().

{
$commands = array();
$commands[] = array("permission" => "read", "cmd" => "view", "lang_var" => "show", "default" => true);
// why here, why read permission? it just needs info_screen_enabled = true in ilObjCategoryListGUI (alex, 30.7.2008)
// this is not consistent, with all other objects...
//$commands[] = array("permission" => "read", "cmd" => "showSummary", "lang_var" => "info_short", "enable_anonymous" => "false");
{
$commands[] = array("permission" => "read", "cmd" => "downloadFolder", "lang_var" => "download", "enable_anonymous" => "false");
}
// BEGIN WebDAV: Mount Webfolder.
require_once ('Services/WebDAV/classes/class.ilDAVActivationChecker.php');
{
$commands[] = array("permission" => "read", "cmd" => "mount_webfolder", "lang_var" => "mount_webfolder", "enable_anonymous" => "false");
}
$commands[] = array("permission" => "write", "cmd" => "edit", "lang_var" => "edit");
// END WebDAV: Mount Webfolder.
return $commands;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static ilObjFolderAccess::getFolderSettings ( )
staticprivate

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

References $folderSettings.

Referenced by hasDownloadAction().

+ Here is the caller graph for this function:

ilObjFolderAccess::hasDownloadAction (   $ref_id)
private

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

References getFolderSettings().

Referenced by _getCommands().

{
global $tree, $ilUser;
// default value should reflect previous behaviour (-> 0)
if ($settings->get("enable_download_folder", 0) != 1)
return false;
/*
* deactivated check for now, because wrong ref_id here!
$children = $tree->getChildsByTypeFilter($ref_id, array("file","fold"));
// no children at all, so no download button
if (count ($children) == 0)
return false;
// check if at least one of the children has a read permission
foreach ($children as $child)
{
if ($rbacsystem->checkAccessOfUser($ilUser->getId(), "read", $child["ref_id"]))
return true;
}
return false;
*/
return true;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Field Documentation

ilObjFolderAccess::$folderSettings
staticprivate

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

Referenced by getFolderSettings().


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