-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
returns reshares in API #14605
returns reshares in API #14605
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works for me 👍
@daita This breaks the sharing tests. |
@daita for me it seems as if "path" is wrong:
With master (on a file I shared with user admin):
|
Another question: should this really return the same user? |
@MorrisJobke @ChristophWurst any reason that most of the errors are from the TwoFactorBackupCodes app ? |
Ignore the risky tests, those are just warnings that there was no check (due to the environment) - the problem here are the failures. |
@MorrisJobke How can I just run one scenario from the tests ? |
That should do the trick:
|
a8c14c3
to
2923887
Compare
@MorrisJobke could not point the source of the issue but my guess is that a rebase (done) should do the trick |
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
d9df077
to
0166990
Compare
@faily-bot still returns error, but nothing on my own tests, rebasing.
|
@MorrisJobke : looks green to me, some hiccup on drone |
@daita have you fixed |
The first one is fixed and was the reason of the tests issue. |
@@ -609,7 +609,7 @@ public function getSharesInFolder($userId, Folder $node, $reshares) { | |||
*/ | |||
public function getSharesBy($userId, $shareType, $node, $reshares, $limit, $offset) { | |||
$qb = $this->dbConn->getQueryBuilder(); | |||
$qb->select('*') | |||
$qb->selectDistinct('*') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @rullzer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note that I could swap back to select() as I filters duplicate results
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this can go then? Or should we leave it ?
👍 working
This means I cannot simply display all received shares for a given folder, but first have to check if "share_with" is not the username. |
@tobiasKaminsky I think it is the main idea behind the edit: displaying all shares if you have reshares rights ? or am I missing something ? |
But seeing myself as a share is kind of useless, or? This is how it currently looks like: In my expectation it should be this way:
So, if admin shared this files also to userA, userB and I shared it to friendA, friendB, I would expect that I get this returend via API:
but I do not see myself in this list |
Ok, wasn't clear who was the viewer, let me check what can be done |
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
@tobiasKaminsky can you try now ? (Also, in my opinion, it should not be filtered by the API but by the client itself) |
works for me now as expected 🎉 |
@rullzer Mind to review? |
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let do this then. 🐘 saw @tobiasKaminsky test it and code makes sese
See nextcloud/server#14605 for more information Signed-off-by: Joas Schilling <coding@schilljs.com>
(#14112) Returns reshares to the API