nextcloud / circles

👪 Create groups with other users on a Nextcloud instance and share with them
GNU Affero General Public License v3.0
142 stars 47 forks source link

Allow users to filter files by circles #137

Open dtygel opened 6 years ago

dtygel commented 6 years ago

Today, the file list view allows users to filter files by tags, but there is no way to list files per circle(s).

We are working on a PR to do this. For this to be possible, we will also need to make a PR to NextCloud Core, including the needed infrastructure in core/js/files/client.js and in apps/dav/lib/Connector/Sabre/FilesReportPlugin.

Our solution involves the creation of a new Method in Circles API V1, which we called getObjectIdsForCircles, and uses another new method, in ShareByCirclesProvider, which retrieves the shares by Circles's Unique Ids.

dtygel commented 6 years ago

@viniciuscb

ArtificialOwl commented 6 years ago

About the Circles API, I know it is missing a function to retrieve the list of the shared items (circles_shares), I think nothing read the information listed in that database right now, and I will work on this.

However this will not be necessary in here.

If you start working on the files from Nextcloud, maybe adding a entry on the left menu:

selection_083

A 'shared by ...' entry that allow your users to filter the file shared by another user, a group or a circle. This way you use directly the ShareProvider as the shares for the files are in oc_shares and not oc_circles_shares

This would be an interesting feature.

ArtificialOwl commented 6 years ago

(Are we talking about the same thing in fact ? ;p)

ArtificialOwl commented 6 years ago

The API to get item shared from a Circle, in 2 versions, safe and not safe: https://github.com/nextcloud/circles/pull/139

But I am sure it is not needed for this feature.

ArtificialOwl commented 6 years ago

@dtygel I still like the idea, any update ? :)

dtygel commented 6 years ago

@daita Yes! We have a working code, but haven't done the tests yet. If you'd like to see how it's going, we can make a PR, still without the tests. What do you think?

ArtificialOwl commented 6 years ago

Sure, please do. This would be great for NC13

dtygel commented 6 years ago

Above are the 3 commits that make the files' panel work. The first one is in core. The second and third ones are in circles' plugin.

We'll do both PRs this week or on Monday for your review.

ArtificialOwl commented 6 years ago

Wow, this is nice.

I am cleaning few stuff and I will PR on your fork, but can you please rebase on your side ?

ArtificialOwl commented 6 years ago

selection_092

dtygel commented 6 years ago

Cool that you liked it, @daita . We'll then rebase now to master so that you can create the PR and do the cleanings. Our branch was based on stable12, so we'll create another one.

ArtificialOwl commented 6 years ago

I don't think I am able to PR on your fork, so this is my work about this:

https://github.com/nextcloud/circles/tree/edit-files-panel

ArtificialOwl commented 6 years ago

https://github.com/coletivoEITA/circles/pull/2

cleaner, without the merge mess.

viniciuscb commented 6 years ago

We tested, everything seems fine. Great job!! Should we do a PR of this to circles?

Um abraço!

ArtificialOwl commented 6 years ago

:+1:

please, make the PR for circles and nextcloud

ArtificialOwl commented 5 years ago

@viniciuscb can you check if the integration of this feature is still working on your side ? it seems to be buggy on NC13 and NC14 !

Obrigado