owncloud-sdk icon indicating copy to clipboard operation
owncloud-sdk copied to clipboard

Dav properties for shared files

Open LukasHirt opened this issue 4 years ago • 12 comments

Description

When listing files shared with others we need to access dav properties [e. g. permissions (getting only permissions from the share for the receiver), etag...]. I guess we need to create a proper api method.

LukasHirt avatar Aug 07 '19 15:08 LukasHirt

according to https://doc.owncloud.com/server/developer_manual/core/apis/ocs-share-api.html#example-request-response-payloads-2 a share holds the file id of the shared file/folder in the property file_source

using oc.files.fileInfo all file properties can be queried.

do I miss anything?

DeepDiver1975 avatar Aug 08 '19 11:08 DeepDiver1975

Then we need to do api call for every file we get from the share api. Would then eat quite a lot of performance, wouldn't it?

LukasHirt avatar Aug 08 '19 13:08 LukasHirt

very much true ..... let me think about this ....

DeepDiver1975 avatar Aug 08 '19 14:08 DeepDiver1975

Then we only show the information we have .... just like in oc10 Screenshot from 2019-08-08 16-34-50

DeepDiver1975 avatar Aug 08 '19 14:08 DeepDiver1975

Well we still need to get the permissions otherwise we need to drop actions. Same for etag and versions. (both are in old UI)

LukasHirt avatar Aug 08 '19 14:08 LukasHirt

Before loading the sidebar we can load all necessary additional information using oc.files.fileinfo

Regarding the permissions .....

  • for incoming you can use the share permissions (bitmask)
  • for outgoing you can assume that the user has full access

does that make sense?

DeepDiver1975 avatar Aug 08 '19 14:08 DeepDiver1975

Before loading the sidebar we can load all necessary additional information using oc.files.fileinfo

Ah, right

  • for outgoing you can assume that the user has full access

Well the user can be only viewer but still be able to share.

LukasHirt avatar Aug 08 '19 14:08 LukasHirt

Well the user can be only viewer but still be able to share.

let me test this in oc10 ....

DeepDiver1975 avatar Aug 08 '19 15:08 DeepDiver1975

I just tried:

  • A shares folder with B read+share
  • B re-shares it with C with what ever permissions
  • The folder will not be listed for B as outgoing but for A - who has full access

:man_shrugging:

DeepDiver1975 avatar Aug 08 '19 15:08 DeepDiver1975

Tried the same.

  • Shared file as Admin with Bob as Viewer with can share permission
  • Shared the same file as Bob with Alice
  • File is in the shared with others list for Bob

image

LukasHirt avatar Aug 09 '19 14:08 LukasHirt

What about dropping actions in that list for now and let's solve it later so we can deliver the milestone?

LukasHirt avatar Aug 09 '19 15:08 LukasHirt

actions will reappear as part of the resolution of https://github.com/owncloud/phoenix/issues/2077

PVince81 avatar Oct 31 '19 08:10 PVince81