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

share calendar -> wrong username #924

Open
Dennis1993 opened this issue Dec 17, 2016 · 10 comments
Open

share calendar -> wrong username #924

Dennis1993 opened this issue Dec 17, 2016 · 10 comments

Comments

@Dennis1993
Copy link

Hey guys,

I downloaded the version 3.2.0 and copied the calendarserver.php from the examples and modified the timezone and database driver to mysql. Then I imported the mysql-files into the datebase. It works fine!

Then I have created a user called max (in the table users and three entries in the table principals) The user admin has a calendar default and the user max has a calendar private. It's all ok, it works!
principals
calendar_instances

Now the problem:
I have logged in with the user admin and shared my calendar default with max (type mailto:[email protected] in the webinterface) and connected the calendar with my iphone as the user max. Now I see the following
img_1776
The system says: Geteilt von Max. I did not share it with myself, that's wrong. There must stand "Geteilt von admin" (shared by admin).

I hope you can understand what I will show you. Sorry for my bad english. 👍

iOS 10.2 on an iPhone SE and the default calendar app from Apple.

@evert
Copy link
Member

evert commented Dec 28, 2016

I don't really have time yet to further investigate the issue, but it does indeed seem like a bug.

@bernhy
Copy link

bernhy commented Apr 9, 2017

Any progress in this? :)

@Dennis1993
Copy link
Author

I think: no 😂

@Dennis1993
Copy link
Author

😊

@Dennis1993
Copy link
Author

🙄

@swalter88
Copy link

swalter88 commented Mar 31, 2022

I dont know if it is correct, but checking line 196 in this file:
https://github.com/sabre-io/dav/blob/master/lib/CalDAV/Backend/PDO.php

Changing the code to the following, fixed the username issue:

$stmt2 = $this->pdo->prepare('SELECT principaluri FROM ' . $this->calendarInstancesTableName . ' WHERE access = 1 AND calendarid = ?');
$stmt2->execute([$row['calendarid']]);

$originalRow = $stmt2->fetch(\PDO::FETCH_ASSOC);
$calendar['principaluri'] = $originalRow['principaluri'];

@DeepDiver1975
Copy link
Member

@swalter88 feel free to open a pull request with these changes - THX 🙏

@swalter88
Copy link

@DeepDiver1975 Unfortunately this destroys the ACL feature for the shared calendar. because the rights are required from the original principal. Seems not to be the complete solution. I will investigate in this problem.

@swalter88
Copy link

@DeepDiver1975 I have a solution that i could provide, but i would like to discuss it first. I think there is a general misconception in the code.... For me it works now, but i had to bypass the ACL for the principal list. Another change is a extension of the ACL rules for SharedCalendars. Especially the bypassing of the ACL rules is a point i would like to talk about. I think there must be a better solution, but i am to far away of the protocols and the inside of the complete codebase.

@Trekky12
Copy link

Any progress with this issue?

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

No branches or pull requests

6 participants