ILIAS  Release_4_4_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilObjCloudAccess Class Reference

Class ilObjCloudAccess. More...

+ Inheritance diagram for ilObjCloudAccess:
+ Collaboration diagram for ilObjCloudAccess:

Public Member Functions

 _getCommands ()
 get commands
 _checkAccess ($a_cmd, $a_permission, $a_ref_id, $a_obj_id, $a_user_id="")
 _checkGoto ($a_target)
- Public Member Functions inherited from ilObjectAccess
 _checkCondition ($a_obj_id, $a_operator, $a_value, $a_usr_id=0)
 check condition
 _preloadData ($a_obj_ids, $a_ref_ids)
 Preload data.

Static Public Member Functions

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

Static Protected Attributes

static $access_cache = array()

Detailed Description

Member Function Documentation

ilObjCloudAccess::_checkAccess (   $a_cmd,
  $a_permission,
  $a_ref_id,
  $a_obj_id,
  $a_user_id = "" 
)
Parameters
string$a_cmd
string$a_permission
int$a_ref_id
int$a_obj_id
string$a_user_id
Returns
bool

Check if plugin of object is active

Check if authentication is complete. If not, only the owner of the object has access. This prevents the authentication of an account which does not belong to the owner.

Reimplemented from ilObjectAccess.

Definition at line 40 of file class.ilObjCloudAccess.php.

References $ilUser, checkAuthStatus(), checkOnline(), and ilCloudConnector\checkServiceActive().

{
global $ilUser, $rbacsystem, $rbacreview;
$object = new ilObjCloud($a_ref_id);
try
{
ilCloudConnector::checkServiceActive($object->getServiceName());
} catch (Exception $e)
{
return false;
}
if ($a_user_id == "")
{
$a_user_id = $ilUser->getId();
}
if (!ilObjCloudAccess::checkAuthStatus($a_obj_id) && $a_user_id != $object->getOwnerId() && !$rbacreview->isAssigned($a_user_id, 2))
{
return false;
}
switch ($a_permission)
{
case "visible":
case "read":
if (!ilObjCloudAccess::checkOnline($a_obj_id) && !$rbacsystem->checkAccessOfUser($a_user_id, "write", $a_ref_id))
{
return false;
}
break;
}
return true;
}

+ Here is the call graph for this function:

ilObjCloudAccess::_checkGoto (   $a_target)
Parameters
$a_target
Returns
bool

Reimplemented from ilObjectAccess.

Definition at line 90 of file class.ilObjCloudAccess.php.

{
global $ilAccess;
$t_arr = explode("_", $a_target);
if ($ilAccess->checkAccess("read", "", $t_arr[1]))
{
return true;
}
return false;
}
ilObjCloudAccess::_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 20 of file class.ilObjCloudAccess.php.

Referenced by ilObjCloudListGUI\init().

{
$commands = array
(
array("permission" => "read", "cmd" => "render", "lang_var" => "show", "default" => true),
array("permission" => "write", "cmd" => "editSettings", "lang_var" => "settings")
);
return $commands;
}

+ Here is the caller graph for this function:

static ilObjCloudAccess::checkAuthStatus (   $a_id)
static
Parameters
$a_id
Returns
mixed

Definition at line 129 of file class.ilObjCloudAccess.php.

Referenced by _checkAccess(), and ilObjCloudListGUI\getProperties().

{
global $ilDB;
if (!isset(self::$access_cache[$a_id]["auth_status"]))
{
$set = $ilDB->query("SELECT auth_complete FROM il_cld_data " .
" WHERE id = " . $ilDB->quote($a_id, "integer")
);
$rec = $ilDB->fetchAssoc($set);
self::$access_cache[$a_id]["auth_status"] = (boolean)$rec["auth_complete"];
}
return self::$access_cache[$a_id]["auth_status"];
}

+ Here is the caller graph for this function:

static ilObjCloudAccess::checkOnline (   $a_id)
static
Parameters
$a_id
Returns
mixed

Definition at line 108 of file class.ilObjCloudAccess.php.

Referenced by _checkAccess(), and ilObjCloudListGUI\getProperties().

{
global $ilDB;
if(!isset(self::$access_cache[$a_id]["online"]))
{
$set = $ilDB->query("SELECT is_online FROM il_cld_data " .
" WHERE id = " . $ilDB->quote($a_id, "integer")
);
$rec = $ilDB->fetchAssoc($set);
self::$access_cache[$a_id]["online"] = (boolean)($rec["is_online"]);
}
return self::$access_cache[$a_id]["online"];
}

+ Here is the caller graph for this function:

Field Documentation

ilObjCloudAccess::$access_cache = array()
staticprotected

Definition at line 18 of file class.ilObjCloudAccess.php.


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