Uh oh!
There was an error while loading. Please reload this page.
Show sharees via propfind - #14429
Conversation
| Share::SHARE_TYPE_ROOM | ||
| ]; | ||
| if ($this->getPath() === "/") { |
There was a problem hiding this comment.
or-connect it with the condition in line 303
| } | ||
| } | ||
| } | ||
| return implode(', ', $sharees); |
There was a problem hiding this comment.
ain't it better return the array and format it where the output is being handled (the callee)? This also only works as long as "," is prohibited as identifier. Further, you have all the types mixed in and identifiers are not unique across those types. → What do you want to achieve eventually?
There was a problem hiding this comment.
If I simply return $sharees, I do get that as plain string, e.g. "adminuser1user2".
If you have a better way, please feel free to change it or give me a hint.
I do not "care" as long as the client has a list of userIds of all sharees.
There was a problem hiding this comment.
I removed Circle and Rooms, so that now only user, remote user and groups are returned.
40f086b to
3ff5424Compareblizzz
commented
Feb 28, 2019
as discussed on irc, we agreed about not returning grouped by type and and each user, group etc. is inside an id-tag within the appropriate element. |
rullzer
left a comment
There was a problem hiding this comment.
So I knew this looked familiar.
Because the way this is implemented it won't scale. If you request this property for a user on a share with 200 entries. It will fire off 300 SQL requests.
We should bundle it with https://github.com/nextcloud/server/blob/master/apps/dav/lib/Connector/Sabre/SharesPlugin.php
| $path = $userFolder->get($path); | ||
| $this->lock($path); | ||
| } catch (\OCP\Files\NotFoundException $e) { | ||
| throw new OCSNotFoundException($this->l->t('Wrong path, file/folder doesn\'t exist')); |
| } catch (\OCP\Files\NotFoundException $e) { | ||
| throw new OCSNotFoundException($this->l->t('Wrong path, file/folder doesn\'t exist')); | ||
| } catch (LockedException $e) { | ||
| throw new OCSNotFoundException($this->l->t('Could not lock path')); |
3ff5424 to
221a8c6ComparetobiasKaminsky
commented
Jul 2, 2019
Bump, can anyone help me here? Or direct me in the right direction? :-) |
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
b7c0bdb to
b965c79Compareb965c79 to
efa0733CompareI really would like to have this in. I changed it as good as I can and can help/rewrite if needed. |
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This makes the XML parsing more sane ;) Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
rullzer
commented
Jul 31, 2019
Let me fix the tests this evening |
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
rullzer
commented
Jul 31, 2019
Ok so the test require some more work as they were/are not the cleanest. I'll have a look tomorrow. |
rullzer
commented
Aug 2, 2019
Test all look good. Time for reviews. |
rullzer
commented
Aug 2, 2019
Small note. Once we have this we could also enhance the server UI. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
georgehrke
commented
Aug 6, 2019
Besides those two remarks it looks good and works |
no camelCase Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
tobiasKaminsky
commented
Aug 6, 2019
Can you test this please with an admin account: For some reason the display name of an admin is missing, but it should be at least userId. |
| foreach ($this->shares as $share) { | ||
| $writer->startElement('{' . self::NS_NEXTCLOUD . '}sharee'); | ||
| $writer->writeElement('{' . self::NS_NEXTCLOUD . '}id', $share->getSharedWith()); | ||
| $writer->writeElement('{' . self::NS_NEXTCLOUD . '}display-name', $share->getSharedWithDisplayName()); |
There was a problem hiding this comment.
| $writer->writeElement('{' . self::NS_NEXTCLOUD . '}display-name', $share->getSharedWithDisplayName()); | |
| $writer->writeElement('{' . self::NS_NEXTCLOUD . '}display-name', $share->getSharedWithDisplayName() ?? $share->getSharedWith()); |
There was a problem hiding this comment.
I wrote a test for android library and there the problem also exists.
It seems that always one of the display names is set to userId.
tobiasKaminsky
commented
Aug 6, 2019
BUG:
|
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
tobiasKaminsky
commented
Aug 8, 2019
Bug fixed via latest commit. |
tobiasKaminsky
commented
Aug 9, 2019
From my side this is ready to get in |
rullzer
commented
Aug 11, 2019
Fixed the failing tests |
georgehrke
left a comment
There was a problem hiding this comment.
Seems to do what its supposed do and webdav compliance wise I'm also happy with it 👍
❗ TODO: once this is merged, change/check OCFileListAdapter: showShareAvatar boolean ❗
Steps to test
<nc:sharees>tobi@http://localhost/nc15</nc:sharees><nc:sharees>admin, Tobi Kaminsky</nc:sharees><nc:sharees>admin</nc:sharees>Please note that this shows only the user you have created & shared a file to.
The other way around (receiving a share) is already exists via < owner-id> and < owner-display-name>.
Signed-off-by: tobiasKaminsky tobias@kaminsky.me