ILIAS  release_4-3 Revision
 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
 _preloadData ($a_obj_ids, $a_ref_ids)
 Preload data.

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.

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

ilObjFolderAccess::_construct ( )

Definition at line 19 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 44 of file class.ilObjFolderAccess.php.

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

Referenced by ilObjFolderListGUI\init().

{
$commands = array();
$commands[] = array("permission" => "read", "cmd" => "view", "lang_var" => "show", "default" => true);
include_once './Services/WebServices/FileManager/classes/class.ilFMSettings.php';
if(ilFMSettings::getInstance()->isEnabled())
{
$commands[] = array(
'permission' => 'read',
'cmd' => 'fileManagerLaunch',
'lang_var' => 'fm_start',
'enable_anonymous' => false
);
}
// 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.
include_once ('Services/WebDAV/classes/class.ilDAVActivationChecker.php');
{
include_once './Services/WebDAV/classes/class.ilDAVUtils.php';
if(ilDAVUtils::getInstance()->isLocalPasswordInstructionRequired())
{
$commands[] = array('permission' => 'read', 'cmd' => 'showPasswordInstruction', 'lang_var' => 'mount_webfolder', 'enable_anonymous' => 'false');
}
else
{
$commands[] = array("permission" => "read", "cmd" => "mount_webfolder", "lang_var" => "mount_webfolder", "enable_anonymous" => "false");
}
}
$commands[] = array("permission" => "write", "cmd" => "enableAdministrationPanel", "lang_var" => "edit_content");
$commands[] = array("permission" => "write", "cmd" => "edit", "lang_var" => "settings");
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 23 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 88 of file class.ilObjFolderAccess.php.

References $ilUser, and 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 17 of file class.ilObjFolderAccess.php.

Referenced by getFolderSettings().


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