Merge pull request #5301 from nextcloud/bugfix-stable12/noid/fix_proppatch_requests_to_groupshares

[stable12] allow users to send PropPatch request when calendar is group-shared with them
This commit is contained in:
Morris Jobke 2017-06-14 23:11:18 -05:00 committed by GitHub
commit aeb80e0f57
2 changed files with 12 additions and 0 deletions

View File

@ -142,6 +142,12 @@ class Calendar extends \Sabre\CalDAV\Calendar implements IShareable {
'principal' => parent::getOwner(),
'protected' => true,
];
} else {
$acl[] = [
'privilege' => '{DAV:}write-properties',
'principal' => parent::getOwner(),
'protected' => true,
];
}
}
if ($this->isPublic()) {

View File

@ -209,6 +209,12 @@ class CalendarTest extends TestCase {
'principal' => 'user2',
'protected' => true
];
} else {
$expectedAcl[] = [
'privilege' => '{DAV:}write-properties',
'principal' => 'user2',
'protected' => true
];
}
}
$this->assertEquals($expectedAcl, $acl);