SURFnet / rd-sram-integration

Research Drive / SURF Research Access Management Integration
2 stars 3 forks source link

cannot accept share through 'Shared with you' view #240

Closed michielbdejong closed 1 year ago

michielbdejong commented 1 year ago
Screenshot 2023-08-28 at 15 18 23

Clicking 'accept' or 'reject' in https://oc2.docker/index.php/apps/files/?dir=/&view=sharingin shows an error message and doesn't work. The API call does return a 200 status code but with the following body:


{"ocs":{"meta":{
  "status":"failure",
  "statuscode":404,
  "message":"wrong share ID, share doesn't exist.",
  "totalitems":"",
  "itemsperpage":""
},"data":[]}}
michielbdejong commented 1 year ago

This only happens when trying to accept/decline from the 'Shared with you' view. A workaround is to refresh the page and then accept through the modal dialog.

michielbdejong commented 1 year ago

It's probably coming from https://github.com/pondersource/core/blob/3a99facff69b2b14d6d0d294331e60dae2a002c0/apps/files_sharing/lib/Controller/RemoteOcsController.php#L117

michielbdejong commented 1 year ago

Turns out that getShares has the switch to the second ExternalManager, but acceptShare does not :(

yasharpm commented 1 year ago

Neither does declineShare. We need another PR into OwnCloud :(

michielbdejong commented 1 year ago

Yes! but a small one this time, and it should be easy to write.

yasharpm commented 1 year ago

Gonna do it tomorrow...

yasharpm commented 1 year ago

I have pushed the fix to the fixing_issue_240 branch of our fork of OwnCloud core.

yasharpm commented 1 year ago

This is not tested. I am working on a way to test it!

michielbdejong commented 1 year ago

Great! I updated dev-stock to use that branch of owncloud/core for opencloudmesh-testing and for rd-sram-testing. Building the images now.

yasharpm commented 1 year ago

Testing the fix... There is bug is reproduced as follows: Decline a share in the "shared with you". then share it again. This time try to accept using the notification pop up. It won't work.

yasharpm commented 1 year ago

It might be a bug that exists independently. Might be because we need different table constraints

michielbdejong commented 1 year ago

then share it again.

In my experience, when Marie declines a share, for Einstein it still looks like shared with Test Group, so he can't share it again?

I tried with Einstein removing Test Group from the sharees list and readding it after Marie had declined it, and then there is no problem, she can accept it in both ways.

yasharpm commented 1 year ago

I created an issue about it here on the OCM app repository.

michielbdejong commented 1 year ago

The original issue of this ticket is fixed in https://github.com/owncloud/core/pull/40967