Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[reva] favorites #15

Closed
butonic opened this issue Aug 23, 2019 · 7 comments
Closed

[reva] favorites #15

butonic opened this issue Aug 23, 2019 · 7 comments

Comments

@butonic
Copy link
Member

butonic commented Aug 23, 2019

curl 'https://phoenix.owncloud.com/remote.php/dav/files/demo/' -X REPORT \
-H 'origin: https://phoenix.owncloud.com' \
-H 'accept-encoding: gzip, deflate, br' \
-H 'accept-language: en-US,en;q=0.9,de;q=0.8' \
-H 'authorization: Bearer xRjL4AeJlsbQjdJsEt1QMbPWRhskMTSlmrIVkEUEiECkhkCvtc46BCuJcI6dqIIO' \
-H 'ocs-apirequest: true' \
-H 'cookie: oc_sessionPassphrase=yODxGWYV1Lj2YVhEaZNBAFytjKBlvLhtW2Gg63L5o3fwyM1neQexQ93%2FtMPkk3v%2BbViPNcs7%2BErTXRI50b0uaOc7anFJRFPjjUADrb7NG%2BMEGJrl8231MA3zyc3dRK2q; ocmru40aixqr=jguuule56tpt2ojnvtvf6g7c3c' \
-H 'x-request-id: 12647d70-9312-4db7-af13-aadcb558ec3f' \
-H 'pragma: no-cache' \
-H 'user-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36' \
-H 'content-type: application/xml; charset=UTF-8' \
-H 'accept: */*' \
-H 'cache-control: no-cache' \
-H 'authority: phoenix.owncloud.com' \
-H 'referer: https://phoenix.owncloud.com/custom/phoenix/index.html' --data-binary $'<?xml version="1.0"?>\n<oc:filter-files  xmlns:d="DAV:" xmlns:oc="http://owncloud.org/ns">\n  <d:prop>\n    <oc:permissions />\n    <oc:favorite />\n    <oc:fileid />\n    <oc:owner-id />\n    <oc:owner-display-name />\n    <oc:privatelink />\n    <d:getcontentlength />\n    <oc:size />\n    <d:getlastmodified />\n    <d:getetag />\n    <d:resourcetype />\n  </d:prop>\n<oc:filter-rules>\n<oc:favorite>1</oc:favorite>\n</oc:filter-rules>\n</oc:filter-files>' --compressed | xml_pp
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--   100  3661  100  3220  100   441  10339   1416 --:--:-- --:--:-- --:--:-- 10100  3661  100  3220  100   441  10328   1414 --:--:-- --:--:-- --:--:-- 10320
<?xml version="1.0"?>
<d:multistatus xmlns:d="DAV:" xmlns:oc="http://owncloud.org/ns" xmlns:s="http://sabredav.org/ns">
  <d:response>
    <d:href>/remote.php/dav/files/demo/ok</d:href>
    <d:propstat>
      <d:prop>
        <oc:permissions>RDNVW</oc:permissions>
        <oc:favorite>1</oc:favorite>
        <oc:fileid>122</oc:fileid>
        <oc:owner-id>demo</oc:owner-id>
        <oc:owner-display-name>demo</oc:owner-display-name>
        <oc:privatelink>https://phoenix.owncloud.com/f/122</oc:privatelink>
        <d:getcontentlength>0</d:getcontentlength>
        <oc:size>0</oc:size>
        <d:getlastmodified>Thu, 25 Apr 2019 11:45:25 GMT</d:getlastmodified>
        <d:getetag>&quot;5b015f9055a56e89f4a3702ffd1988d9&quot;</d:getetag>
        <d:resourcetype/>
      </d:prop>
      <d:status>HTTP/1.1 200 OK</d:status>
    </d:propstat>
  </d:response>
  <d:response>
    <d:href>/remote.php/dav/files/demo/eula.lnk</d:href>
    <d:propstat>
      <d:prop>
        <oc:permissions>RDNVW</oc:permissions>
        <oc:favorite>1</oc:favorite>
        <oc:fileid>382</oc:fileid>
        <oc:owner-id>demo</oc:owner-id>
        <oc:owner-display-name>demo</oc:owner-display-name>
        <oc:privatelink>https://phoenix.owncloud.com/f/382</oc:privatelink>
        <d:getcontentlength>830</d:getcontentlength>
        <oc:size>830</oc:size>
        <d:getlastmodified>Wed, 12 Jun 2019 12:39:07 GMT</d:getlastmodified>
        <d:getetag>&quot;522e5c8b8d91831b82bc8f671af2884a&quot;</d:getetag>
        <d:resourcetype/>
      </d:prop>
      <d:status>HTTP/1.1 200 OK</d:status>
    </d:propstat>
  </d:response>
  <d:response>
    <d:href>/remote.php/dav/files/demo/test.md</d:href>
    <d:propstat>
      <d:prop>
        <oc:permissions>RDNVW</oc:permissions>
        <oc:favorite>1</oc:favorite>
        <oc:fileid>383</oc:fileid>
        <oc:owner-id>demo</oc:owner-id>
        <oc:owner-display-name>demo</oc:owner-display-name>
        <oc:privatelink>https://phoenix.owncloud.com/f/383</oc:privatelink>
        <d:getcontentlength>305</d:getcontentlength>
        <oc:size>305</oc:size>
        <d:getlastmodified>Sat, 15 Jun 2019 08:02:30 GMT</d:getlastmodified>
        <d:getetag>&quot;a7d5ca36d47abe586cfaf4622c064e3c&quot;</d:getetag>
        <d:resourcetype/>
      </d:prop>
      <d:status>HTTP/1.1 200 OK</d:status>
    </d:propstat>
  </d:response>
  <d:response>
    <d:href>/remote.php/dav/files/demo/fd5526f556f445a4f54afe2e2ce7fe26.jpg</d:href>
    <d:propstat>
      <d:prop>
        <oc:permissions>RDNVW</oc:permissions>
        <oc:favorite>1</oc:favorite>
        <oc:fileid>414</oc:fileid>
        <oc:owner-id>demo</oc:owner-id>
        <oc:owner-display-name>demo</oc:owner-display-name>
        <oc:privatelink>https://phoenix.owncloud.com/f/414</oc:privatelink>
        <d:getcontentlength>50183</d:getcontentlength>
        <oc:size>50183</oc:size>
        <d:getlastmodified>Mon, 24 Jun 2019 15:17:05 GMT</d:getlastmodified>
        <d:getetag>&quot;461b098d039ec7bd3d3ffa4d05a128ab&quot;</d:getetag>
        <d:resourcetype/>
      </d:prop>
      <d:status>HTTP/1.1 200 OK</d:status>
    </d:propstat>
  </d:response>
  <d:response>
    <d:href>/remote.php/dav/files/demo/ok.dms</d:href>
    <d:propstat>
      <d:prop>
        <oc:permissions>RDNVW</oc:permissions>
        <oc:favorite>1</oc:favorite>
        <oc:fileid>449</oc:fileid>
        <oc:owner-id>demo</oc:owner-id>
        <oc:owner-display-name>demo</oc:owner-display-name>
        <oc:privatelink>https://phoenix.owncloud.com/f/449</oc:privatelink>
        <d:getcontentlength>0</d:getcontentlength>
        <oc:size>0</oc:size>
        <d:getlastmodified>Mon, 22 Jul 2019 11:01:00 GMT</d:getlastmodified>
        <d:getetag>&quot;fbe39751824e3923347e9a30765ba58c&quot;</d:getetag>
        <d:resourcetype/>
      </d:prop>
      <d:status>HTTP/1.1 200 OK</d:status>
    </d:propstat>
  </d:response>
</d:multistatus>
@butonic
Copy link
Member Author

butonic commented Aug 26, 2019

This is more related to file properties, tagging and search. We cannot simply extend ListContainerRequest with a filter. That does not make sense.

@butonic
Copy link
Member Author

butonic commented Sep 6, 2019

storing a list of userids an an extended attribute eg. user.oc.favorite:jfd,felix,refs would require locking. a better way I think ist to use a separate folder in the storage. at loast for the owncloud storage drives we could use /data/einstein/files_favorites an then just store files that contain a json object with a reference to the actual file ... OR we use the freedesktop spec: https://www.freedesktop.org/wiki/Specifications/desktop-bookmark-spec/

the latter might make sense for the local storage driver ... or a freedesktop storage driver

@labkode
Copy link
Member

labkode commented Sep 6, 2019

@butonic for the owncloud fs you could also use soft hardlinks if you the files_favourites approach. On the other hand, to avoid locking on the xattrs you can namespace them.

user.oc.favorite.jfd
user.oc.favorite.felix
user.oc.favorite.refs

This way you have atomic operations on the xattrs, and as you know the user getting the file, you can query by getxattr rather than listing of the xattrs.

The downsize is that the number of xattrs will not be capped.

@butonic
Copy link
Member Author

butonic commented Sep 10, 2019

for now we set them them as not set in the ocdav api with cs3org/reva#248

@butonic
Copy link
Member Author

butonic commented Sep 10, 2019

cs3 api for arbitrary metadata in cs3org/cs3apis#31

@butonic butonic transferred this issue from owncloud-archive/nexus Oct 1, 2019
@butonic butonic added this to the Feature Complete milestone Oct 15, 2019
@butonic butonic self-assigned this Nov 11, 2019
@butonic butonic assigned butonic and unassigned butonic Nov 11, 2019
@butonic
Copy link
Member Author

butonic commented Nov 13, 2019

impementation using arbitrary metadata in cs3org/reva#372, but needs rethinking

@butonic butonic removed their assignment Nov 14, 2019
@butonic
Copy link
Member Author

butonic commented Nov 22, 2019

merged, but needs discussion at cs3 tracked in cs3org/cs3apis#43

@butonic butonic closed this as completed Nov 22, 2019
refs added a commit that referenced this issue Sep 18, 2020
Load Config from Viper on Before hook
refs pushed a commit that referenced this issue Sep 18, 2020
fix and simplify oidc middleware
refs pushed a commit that referenced this issue Sep 18, 2020
Remove logtostderr from protoc generation
refs pushed a commit that referenced this issue Sep 18, 2020
refs pushed a commit that referenced this issue Sep 18, 2020
Introduce ErrorCode enum for error handling
refs added a commit that referenced this issue Sep 18, 2020
Update konnect to IljaN/konnect v0.29.0-alpha2
refs pushed a commit that referenced this issue Sep 18, 2020
Grant access to protected branches to oc employees
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants