nextcloud / calendar

📆 Calendar app for Nextcloud
https://apps.nextcloud.com/apps/calendar
GNU Affero General Public License v3.0
984 stars 241 forks source link

Calendar with write permissions listed in the wrong section #316

Closed nickvergessen closed 7 years ago

nickvergessen commented 7 years ago

Steps

  1. Create a calendar as admin
  2. Create a user test1 that is part of group1 and group2
  3. Share calendar with group1
  4. Share calendar with group2
  5. Tick the "can edit" box for group1

Expected

test1 should be able to create events and see the calendar in the normal list.

Actually

test1 sees the calendar in the subscription list and therefor can not add events.

Workarounds

Swap step 4 and 5 makes it work. But you can then again break it, when you remove the "can edit" from all shares and add it to the first group again....

Dav response

```xml /remote.php/dav/calendars/test1/ /remote.php/dav/principals/users/test1/ /remote.php/dav/principals/users/test1/ /remote.php/dav/principals/users/test1/calendar-proxy-write/ /remote.php/dav/principals/users/test1/calendar-proxy-write/ /remote.php/dav/principals/users/test1/calendar-proxy-read/ /remote.php/dav/principals/users/test1/ HTTP/1.1 200 OK HTTP/1.1 404 Not Found /remote.php/dav/calendars/test1/personal/ Persönlich 0 /remote.php/dav/principals/users/test1/ /remote.php/dav/principals/users/test1/ /remote.php/dav/principals/users/test1/ HTTP/1.1 200 OK HTTP/1.1 404 Not Found /remote.php/dav/calendars/test1/test_shared_by_admin/ Test (Admin Istrato) 0 #78e774 /remote.php/dav/principals/users/admin/ /remote.php/dav/principals/users/admin/ /remote.php/dav/principals/users/test1/ /remote.php/dav/principals/groups/group2/ /remote.php/dav/principals/groups/group2/ /remote.php/dav/principals/groups/group1/ /remote.php/dav/principals/groups/group1/ /remote.php/dav/principals/users/admin/ principal:principals/groups/group2 principal:principals/groups/group1 HTTP/1.1 200 OK HTTP/1.1 404 Not Found /remote.php/dav/calendars/test1/inbox/ /remote.php/dav/principals/users/test1/ /remote.php/dav/principals/users/test1/ /remote.php/dav/principals/users/test1/calendar-proxy-write/ /remote.php/dav/principals/users/test1/ HTTP/1.1 200 OK HTTP/1.1 404 Not Found /remote.php/dav/calendars/test1/outbox/ /remote.php/dav/principals/users/test1/ /remote.php/dav/principals/users/test1/ /remote.php/dav/principals/users/test1/calendar-proxy-write/ /remote.php/dav/principals/users/test1/calendar-proxy-read/ /remote.php/dav/principals/users/test1/calendar-proxy-write/ /remote.php/dav/principals/users/test1/ HTTP/1.1 200 OK HTTP/1.1 404 Not Found ```
georgehrke commented 7 years ago

Dav response looks fine, bug in calendar

georgehrke commented 7 years ago

Wait, I think this actually is a Dav bug.

It only contains:

                    <d:ace>
                        <d:principal>
                            <d:href>/remote.php/dav/principals/users/test1/</d:href>
                        </d:principal>
                        <d:grant>
                            <d:privilege>
                                <d:read/>
                            </d:privilege>
                        </d:grant>
                        <d:protected/>
                    </d:ace>

But it's missing something like this:

     <d:ace>
      <d:principal>
       <d:href>/remote.php/dav/principals/users/test1/</d:href>
      </d:principal>
      <d:grant>
       <d:privilege>
        <d:write/>
       </d:privilege>
      </d:grant>
      <d:protected/>
     </d:ace>

@nickvergessen

nickvergessen commented 7 years ago

It has multiple sections, one per group. Depening on the group order it works, so i guess the calendar app or its dav part only looks for the first permission set?

georgehrke commented 7 years ago

Bug in server, will reopen there with a couple of insights

georgehrke commented 7 years ago

see https://github.com/nextcloud/server/issues/3677