⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.37
Server IP:
41.128.143.86
Server:
Linux host.raqmix.cloud 6.8.0-1025-azure #30~22.04.1-Ubuntu SMP Wed Mar 12 15:28:20 UTC 2025 x86_64
Server Software:
Apache
PHP Version:
8.3.23
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
psa-horde
/
kronolith
/
lib
/
Calendar
/
View File Name :
ResourceGroup.php
* @author Michael J Rubinsky
* @package Kronolith */ class Kronolith_Calendar_ResourceGroup extends Kronolith_Calendar { /** * The share of this calendar. * * @var Kronolith_Resource_Group */ protected $_resource; /** * Constructor. * * @param array $params A hash with any parameters that this calendar * might need. * Required parameters: * - share: The share of this calendar. */ public function __construct($params = array()) { if (!isset($params['resource'])) { throw new BadMethodCallException('resource parameter is missing.'); } if (!($params['resource'] instanceof Kronolith_Resource_Group)) { throw new InvalidArgumentException('resource parameter is not a Kronolith_Resource_Single object.'); } parent::__construct($params); } /** * Returns the owner of this calendar. * * @return string This calendar's owner. */ public function owner() { // @TODO: what to return here? Resources do not currently have owners. return ''; } /** * Returns the name of this calendar. * * @return string This calendar's name. */ public function name() { return $this->_resource->get('name'); } /** * Returns the description of this calendar. * * @return string This calendar's description. */ public function description() { return $this->_resource->get('description'); } /** * Encapsulates permissions checking. * * @param integer $permission The permission to check for. * @param string $user The user to check permissions for. Defaults * to the current user. * @param string $creator An event creator, to check for creator * permissions. * * @return boolean Whether the user has the permission on this calendar. */ public function hasPermission($permission, $user = null, $creator = null) { return $this->_resource->hasPermission($user, $permission, $creator); } /** * Whether this calendar is supposed to be displayed in lists. * * @return boolean True if this calendar should be displayed. */ public function display() { return in_array($this->_resource->get('calendar'), $GLOBALS['calendar_manager']->get(Kronolith::DISPLAY_CALENDARS)); } /** * Returns a hash representing this calendar. * * @return array A simple hash. */ public function toHash() { $owner = $GLOBALS['registry']->isAdmin(); $hash = parent::toHash(); $hash['id'] = $this->_resource->getId(); $hash['name'] = $this->name(); $hash['owner'] = $owner; $hash['show'] = $this->display(); $hash['edit'] = $this->hasPermission(Horde_Perms::EDIT); $hash['sub'] = null; $hash['feed'] = null; $hash['embed'] = null; $hash['members'] = $this->_resource->get('members'); if ($owner) { $hash['perms'] = array( 'type' => 'matrix', 'default' => 0, 'guest' => 0, 'creator' => 0); } return $hash; } }