-
Notifications
You must be signed in to change notification settings - Fork 112
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
add filter by sharetype in the ocs API #2050
Conversation
e593447
to
eacfb8a
Compare
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.
The |
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.
could you add the filter to the sql driver in
reva/pkg/share/manager/sql/sql.go
Line 278 in eacfb8a
if f.Type == collaboration.Filter_TYPE_RESOURCE_ID { |
and maybe in
reva/pkg/cbox/share/sql/sql.go
Line 283 in eacfb8a
if f.Type == collaboration.Filter_TYPE_RESOURCE_ID { |
if not track it in a new issue.
Ok let me try. |
This pull request introduces 2 alerts when merging 8f0de6e into f2109fc - view on LGTM.com new alerts:
|
1c991f3
to
5f7b705
Compare
I resolved this but the comment doesn't disappear and I also can't remove it. |
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.
LGTM. At least I didn't find something obviously wrong here. (Take this with a grain of salt, as I am still pretty new to the code base)
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.
Just a pedantic comment from mine, nice PR and nice expected failures cleanup! Thanks!
5f7b705
to
216679b
Compare
33b27dd
to
06bce1c
Compare
The tests fail now because of this PR #2072. Because of that PR rejected shares are not shown in @labkode, how do we want to go forward with this? I think setting the filter in the ocdav layer would be better and then making that behavior configurable. Then an admin could choose if rejected shares should be shown or not. |
06bce1c
to
e0c8e47
Compare
Hi @C0rby that PR should do nothing about accepting or denying shares as we know them today. That PR handles a specific type of share that denies access (DENIAL). That type of share cannot be accepted or rejected by the receiver, the receiver basically can't do anything about it. The filter set in that PR is to not shown this type of special shares to the receiving user, NOT to filter out reject shares. Let me know if you need further clarifications. |
I see, then I misunderstood this filter. I will rewrite my code then to reflect the correct behavior. |
@labkode, how do I recognize such deny shares? |
c88c57d
to
d901f66
Compare
Hi @C0rby, in the SQL manager we set a DenyShare as having |
d901f66
to
65d8cfc
Compare
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.
Hi @C0rby this is really nice! Just left a couple of comments
internal/http/services/owncloud/ocs/handlers/apps/sharing/shares/shares.go
Show resolved
Hide resolved
65d8cfc
to
46f3b4b
Compare
5c6046b
to
c39d980
Compare
Let me just add some unit tests for the new functions and then this PR is good to go. :) |
c39d980
to
d9dfebe
Compare
It's ready now. |
Added a query parameter to the OCS API to filter the received shares by type.