Uh oh!
There was an error while loading. Please reload this page.
Create infrastructure to allow files to be shared with circles - #6959
Create infrastructure to allow files to be shared with circles#6959viniciuscb wants to merge 9 commits into
Conversation
This commit allows the user to view the calendars that are shared with any circle s/he belongs to. Signed-off-by: Vinicius Cubas Brand <viniciuscb@gmail.com>
There is a proposal to allow users to filter files shared to circles. This commit is needed to provide the infrastucture for it. Issue: nextcloud/circles#137 Signed-off-by: Vinicius Cubas Brand <viniciuscb@gmail.com>
…ivoEITA/server into add_circle_to_caldav_and_filepanel
Signed-off-by: Vinicius Cubas Brand <viniciuscb@gmail.com>
| throw new TagNotFoundException('Tag with ids ' . implode(', ', $unknownTagIds) . ' not found'); | ||
| } | ||
| } | ||
| */ |
There was a problem hiding this comment.
Maybe cleaning those commented line
ArtificialOwl
commented
Oct 25, 2017
ArtificialOwl
commented
Oct 25, 2017
it might needs some unit tests |
viniciuscb
commented
Oct 31, 2017
@daita we were informed that nc13 will freeze the new features this friday. What can we make to have this PR accepted? |
nickvergessen
left a comment
There was a problem hiding this comment.
I don't really like all this merging of circles into the dav app. We should instead add hooks, so the circles app can provide the functionality with code in it's own Namespace
| const NS_OWNCLOUD = 'http://owncloud.org/ns'; | ||
| const REPORT_NAME = '{http://owncloud.org/ns}filter-files'; | ||
| const SYSTEMTAG_PROPERTYNAME = '{http://owncloud.org/ns}systemtag'; | ||
| const CIRCLE_PROPERTYNAME = '{http://owncloud.org/ns}circle'; |
There was a problem hiding this comment.
Should be {http:/nextcloud.com/ns}circle
There was a problem hiding this comment.
In fact, adding hooks in dav app would be more elegant. But since system tags are already core factored in dav, we thought a first approach would be to have both system tags and circles working similarly.
We would be happy to collaborate to implement hooks in dav in the future, and then migrate both circles and system tags to the hooks approach.
Maybe, for NC13, we could start the way we've implemented now... What do you think?
There was a problem hiding this comment.
There is another difference ;)
systemtags are shipped (therefor the code is not missing etc) while circles are totally optional
ArtificialOwl
commented
Nov 1, 2017
The hook thing could be a great improvement ! |
Signed-off-by: Vinicius Cubas Brand <viniciuscb@gmail.com>
Codecov Report
@@ Coverage Diff @@## master #6959 +/- ##
=========================================
Coverage ? 29.49% Complexity ? 24490 =========================================
Files ? 1581 Lines ? 93622 Branches ? 1359 =========================================
Hits ? 27615 Misses ? 66007 Partials ? 0
|
| return $resultFileIds; | ||
| } | ||
| private function getCirclesFileIds($circlesIds) { |
There was a problem hiding this comment.
PHPDocs on the function parameters and the return value would be awesome.
Also is $circlesIds an array? If so you can typehint it with array $circleIds.
| throw new Exception('Principal not found'); | ||
| } | ||
| $userSession = \OC::$server->getUserSession(); |
There was a problem hiding this comment.
Can we inject the current user in the constructor instead?
ArtificialOwl
commented
Nov 7, 2017
@viniciuscb - I made the few changes requested by @LukasReschke |
viniciuscb
commented
Nov 10, 2017
Hi @daita , taking a look... |
viniciuscb
commented
Nov 10, 2017
@daita Seems to be working fine! In my opinion, can merge. |
| if ($filterRule['name'] === $ns . 'systemtag') { | ||
| $systemTagIds[] = $filterRule['value']; | ||
| } | ||
| if ($filterRule['name'] === $ns . 'circle') { |
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
| body += ' <oc:systemtag>' + escapeHTML(systemTagIds) + '</oc:systemtag>\n'; | ||
| }); | ||
| _.each(filter.circlesIds, function(circlesIds) { | ||
| body += ' <oc:circle>' + escapeHTML(circlesIds) + '</oc:circle>\n'; |
MorrisJobke
commented
Dec 8, 2017
I moved this to 14 |
MorrisJobke
commented
Mar 6, 2018
@viniciuscb@daita Sorry that this somehow slipped through. What is the status of this? |
MorrisJobke
commented
Jun 29, 2018
The unit tests in this one fail :/ @danxuliu@georgehrke@daita Mind to have a look at this one? |
…to_caldav_and_filepanel
MorrisJobke
commented
Nov 7, 2018
This was continued in #12119 -> let's close this one here |

This PR is necessary to nextcloud/circles#141 .
Proposal and discussion is on nextcloud/circles#137 .