summaryrefslogtreecommitdiff
path: root/lib/Kolab
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2013-02-27 20:23:04 (GMT)
committerThomas Bruederli <bruederli@kolabsys.com>2013-02-27 20:23:04 (GMT)
commitbb251d58147a4486b4824facac265e346303e043 (patch)
tree76011f87db23d1ee34085ac70cee53157675005c /lib/Kolab
parentf780011a58d463a2980bf1b5de5d8161c213fdf2 (diff)
downloadiRony-bb251d58147a4486b4824facac265e346303e043.tar.gz
Enable ACL and service detection to work with Apple iCal
Diffstat (limited to 'lib/Kolab')
-rw-r--r--lib/Kolab/CalDAV/Calendar.php13
-rw-r--r--lib/Kolab/CalDAV/CalendarBackend.php1
-rw-r--r--lib/Kolab/DAV/Auth/HTTPBasic.php15
-rw-r--r--lib/Kolab/DAVACL/PrincipalBackend.php4
4 files changed, 17 insertions, 16 deletions
diff --git a/lib/Kolab/CalDAV/Calendar.php b/lib/Kolab/CalDAV/Calendar.php
index 7b33744..40a6b35 100644
--- a/lib/Kolab/CalDAV/Calendar.php
+++ b/lib/Kolab/CalDAV/Calendar.php
@@ -59,19 +59,6 @@ class Calendar extends \Sabre\CalDAV\Calendar
/**
- * Getter for a nice and human readable name for this calendar
- * See http://wiki.kolab.org/UI-Concepts/Folder-Listing for reference
- *
- * @return string Name of this calendar
- */
- public function getName()
- {
- $folder = kolab_storage::object_name($this->imap_folder, $this->namespace);
- return $folder;
- }
-
-
- /**
* Returns the owner principal
*
* This must be a url to a principal, or null if there's no owner
diff --git a/lib/Kolab/CalDAV/CalendarBackend.php b/lib/Kolab/CalDAV/CalendarBackend.php
index 3dd5016..a277353 100644
--- a/lib/Kolab/CalDAV/CalendarBackend.php
+++ b/lib/Kolab/CalDAV/CalendarBackend.php
@@ -279,7 +279,6 @@ class CalendarBackend extends CalDAV\Backend\AbstractBackend
$storage = $this->get_storage_folder($calendarId);
if ($storage && ($event = $storage->get_object($uid))) {
- console('FOUND: ' . $event['uid']);
return array(
'id' => $event['uid'],
'uri' => $event['uid'] . '.ics',
diff --git a/lib/Kolab/DAV/Auth/HTTPBasic.php b/lib/Kolab/DAV/Auth/HTTPBasic.php
index 23a7ac0..036d54f 100644
--- a/lib/Kolab/DAV/Auth/HTTPBasic.php
+++ b/lib/Kolab/DAV/Auth/HTTPBasic.php
@@ -34,7 +34,7 @@ use Kolab\Utils\CacheAPC;
class HTTPBasic extends \Sabre\DAV\Auth\Backend\AbstractBasic
{
// Make the current user name availabel to all classes
- public static $current_user;
+ public static $current_user = null;
/**
* Validates a username and password
@@ -97,4 +97,17 @@ class HTTPBasic extends \Sabre\DAV\Auth\Backend\AbstractBasic
return $success;
}
+
+ /**
+ * Returns information about the currently logged in username.
+ *
+ * If nobody is currently logged in, this method should return null.
+ *
+ * @return string|null
+ */
+ public function getCurrentUser()
+ {
+ // return the canonic user name
+ return self::$current_user;
+ }
}
diff --git a/lib/Kolab/DAVACL/PrincipalBackend.php b/lib/Kolab/DAVACL/PrincipalBackend.php
index 4f46eca..7297747 100644
--- a/lib/Kolab/DAVACL/PrincipalBackend.php
+++ b/lib/Kolab/DAVACL/PrincipalBackend.php
@@ -63,7 +63,7 @@ class PrincipalBackend implements \Sabre\DAVACL\PrincipalBackend\BackendInterfac
if (HTTPBasic::$current_user) {
return array(
- 'uri' => '/' . HTTPBasic::$current_user,
+ 'uri' => 'principals/' . HTTPBasic::$current_user,
'{DAV:}displayname' => HTTPBasic::$current_user,
);
}
@@ -116,6 +116,8 @@ class PrincipalBackend implements \Sabre\DAVACL\PrincipalBackend\BackendInterfac
*/
public function getPrincipalByPath($path)
{
+ console(__METHOD__, $path);
+
list($prefix,$name) = explode('/', $path);
if ($prefix == 'principals' && $name == HTTPBasic::$current_user) {