* @license http://www.fsf.org/copyleft/lgpl.html LGPL
* @link http://pear.horde.org/index.php?package=Kolab_Storage
*/
-class Horde_Kolab_Storage_Driver
+abstract class Horde_Kolab_Storage_Driver
{
-
/**
* Factory.
*
}
throw new Horde_Kolab_Storage_Exception(
'Driver type definition "' . $class . '" missing.');
+ }
+ /**
+ * Retrieve the namespace information for this connection.
+ *
+ * @return Horde_Kolab_Storage_Namespace The initialized namespace handler.
+ */
+ public function getNamespace()
+ {
+ return new Horde_Kolab_Storage_Namespace();
}
+
}
\ No newline at end of file
}
/**
- * Retrieve the namespace information for this connection.
- *
- * @return Horde_Kolab_Storage_Namespace The initialized namespace handler.
- */
- public function getNamespace()
- {
- return new Horde_Kolab_Storage_Namespace();
- }
-
- /**
* Retrieves a list of mailboxes on the server.
*
* @return array The list of mailboxes.
return $this->_imap->getACL($folder);
} catch (Exception $e) {
try {
- return $this->_imap->getMyACLRights($folder);
+ return array(Horde_Auth::getAuth() => str_split($this->_imap->getMyACLRights($folder)));
} catch (Exception $e) {
- $acl = array();
- $acl[Horde_Auth::getAuth()] = 'lrid';
- return $acl;
+ return array(Horde_Auth::getAuth() => str_split('lrid'));
}
}
}
*/
function getACL()
{
- $acl = $this->_connection->getACL($this->name);
-
- /*
- * Check if the getPerm comes from the owner in this case we
- * can use getACL to have all the right of the share Otherwise
- * we just ask for the right of the current user for a folder
- */
- if ($this->getOwner() == Horde_Auth::getAuth()) {
- return $acl;
- } else {
- if (!is_a($acl, 'PEAR_Error')) {
- return $acl;
- }
-
- $my_rights = $this->_connection->getMyrights($this->name);
- if (is_a($my_rights, 'PEAR_Error')) {
- return $my_rights;
- }
-
- $acl = array();
- $acl[Horde_Auth::getAuth()] = $my_rights;
- return $acl;
- }
+ return $this->_connection->getACL($this->name);
}
/**
)
);
$perms = new Horde_Kolab_Storage_Permission($folder);
- $data = $perms->getData();
+ $data = $perms->getData();
$this->assertContains('users', array_keys($data));
$this->assertContains('wrobel', array_keys($data['users']));
$this->assertContains('reader', array_keys($data['users']));
'wrobel'
);
$perms = new Horde_Kolab_Storage_Permission($folder);
- $data = $perms->getData();
+ $data = $perms->getData();
unset($data['guest']);
unset($data['default']);
unset($data['users']['viewer']);
{
$GLOBALS['language'] = 'de_DE';
$storage = new Horde_Kolab_Storage(
+ new Horde_Kolab_Storage_Connection(),
'Imap',
array(
'username' => 'test',