Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sabre Delegation support #32

Open
Trickscenique opened this issue Apr 17, 2017 · 1 comment
Open

Sabre Delegation support #32

Trickscenique opened this issue Apr 17, 2017 · 1 comment

Comments

@Trickscenique
Copy link

Trickscenique commented Apr 17, 2017

Hi,

Does the function FindCalendars( ) can reach the calendars shared with Sabre delegation ?

I use baikal, and i've done theses records like explain in the sabre's docs but i just see the calendars affected to the main user :

If you want to give user A access to user B's calendars, this means that principal/userA needs to be part of the principal/userB/calendar-proxy-write group.

To do this through the database, you need to look up the id for principal/userA and principal/userB/calendar-proxy-write. You add these id's to the groupmembers table.

The id for principal/userA will become the member_id field value, and the id for principal/userB/calendar-proxy-write should be put in the principal_id field.
http://sabre.io/dav/caldav-proxy/

This is my code

$client = new SimpleCalDAVClient();

$client->connect('http://baikalserver.example/cal.php/calendars/userB/default', 'userA', 'userApassword');

$client->findCalendars();
@Trickscenique
Copy link
Author

Trickscenique commented Apr 17, 2017

I resolve my problem by adding this function in SimpleCalDAVClient.php

function getCalendarDetailsByURL($url)
	{
		if(!isset($this->client)) throw new Exception('No connection. Try connect().');
		
		return $this->client->GetCalendarDetailsByURL($url);
	}

Then my code become :

$client = new SimpleCalDAVClient();

$client->connect('http://baikalserver.example/cal.php/calendars/userB/default', 'userA', 'userApassword');

$client->getCalendarDetailsByURL('http://baikalserver.example/cal.php/calendars/userB/default');

It can not list all the delegated calendars but it permit to access to one if you know the name :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant