mirror of
https://github.com/nextcloud/server.git
synced 2026-06-11 01:30:50 -04:00
fix(calendar): Fix getting the permissions of the user
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
6f3ee6b09a
commit
4fd84e47bf
2 changed files with 6 additions and 2 deletions
|
|
@ -110,6 +110,10 @@ class CalendarImpl implements ICreateFromString, IHandleImipMessage {
|
|||
$permissions = $this->calendar->getACL();
|
||||
$result = 0;
|
||||
foreach ($permissions as $permission) {
|
||||
if ($this->calendarInfo['principaluri'] !== $permission['principal']) {
|
||||
continue;
|
||||
}
|
||||
|
||||
switch ($permission['privilege']) {
|
||||
case '{DAV:}read':
|
||||
$result |= Constants::PERMISSION_READ;
|
||||
|
|
@ -133,7 +137,7 @@ class CalendarImpl implements ICreateFromString, IHandleImipMessage {
|
|||
public function isWritable(): bool {
|
||||
return $this->calendar->canWrite();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @since 26.0.0
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ interface ICalendar {
|
|||
public function search(string $pattern, array $searchProperties = [], array $options = [], ?int $limit = null, ?int $offset = null): array;
|
||||
|
||||
/**
|
||||
* @return int build up using \OCP\Constants
|
||||
* @return int build up using {@see \OCP\Constants}
|
||||
* @since 13.0.0
|
||||
*/
|
||||
public function getPermissions(): int;
|
||||
|
|
|
|||
Loading…
Reference in a new issue