server icon indicating copy to clipboard operation
server copied to clipboard

Allow to specify allowed groups to share instead of excluded groups

Open cdammanintopix opened this issue 2 years ago • 7 comments

In my use case, I use Nextcloud to share files with a lot of people that are members of separate groups. I do not want those people to be able to share files between them, nor to share files with me. However, I want to allow sharing from my team to those groups.

The feature I need is then to be able to specify allowed groups to share, instead of excluded groups. Hence, I can create a group with my team, allow it to share, and do not allow this feature to any other groups (without having to list all of them).

Suggested UI: image

Relates to #3387

cdammanintopix avatar Sep 16 '22 15:09 cdammanintopix

This is how it looks with the new UI: image Let me know if I should change it.

Also, should I update the translation files?

cdammanintopix avatar Sep 16 '22 16:09 cdammanintopix

No need to update the translation files, this is done automatically by scripts

CarlSchwan avatar Sep 16 '22 16:09 CarlSchwan

Just added testing :slightly_smiling_face:

cdammanintopix avatar Sep 19 '22 09:09 cdammanintopix

Hm good question. Sounds like it should be 3 radio options and an input:

Limit sharing based on groups

  • Allow sharing for everyone (default)
  • Exclude some groups from sharing
  • Limit sharing to some groups

And then an input field below the option which is chosen. @nimishavijay?

jancborchardt avatar Sep 19 '22 11:09 jancborchardt

Agreed with the UX, suggestion on the wording:

Allow sharing for

  • everyone (default)
  • only some groups
  • everyone except some groups

And when an option is selected the input field appears below that option like @jancborchardt mentioned

nimishavijay avatar Sep 19 '22 11:09 nimishavijay

Sounds good @nimishavijay! Would just switch around option 2 and 3 in the order, so it's sorted by permissiveness.

jancborchardt avatar Sep 19 '22 11:09 jancborchardt

New UI: image

cdammanintopix avatar Sep 19 '22 16:09 cdammanintopix

Hello, @CarlSchwan any updates on this?

cdammanintopix avatar Sep 28 '22 09:09 cdammanintopix

Actually thinking about it again accessibility-wise, I’m wondering if the sentence-like wording @nimishavijay suggested works well with a screen-reader. My previous suggestion reads a bit better when you only look at the radio buttons, and also when you use a screen reader to tab over the items – what do you think @cdammanintopix @nimishavijay?

jancborchardt avatar Oct 11 '22 08:10 jancborchardt

@jancborchardt sure, could be clearer. @nimishavijay ok with that change?

cdammanintopix avatar Oct 20 '22 07:10 cdammanintopix

I rebased on the latest master commit, and updated the UI as @jancborchardt suggested. The new UI looks like this:

image

cdammanintopix avatar Feb 02 '23 10:02 cdammanintopix

Hello, do you think you could review this? @CarlSchwan This small pull request was opened about 10 months ago 🙂

cdammanintopix avatar Jul 20 '23 13:07 cdammanintopix

Any day now I'm sure

colin969 avatar Sep 06 '23 12:09 colin969

Hello @CarlSchwan @icewind1991 any chance you could review this for next beta?

cdammanintopix avatar Nov 07 '23 15:11 cdammanintopix

I updated the code to match the lastest release. The new UI looks like this

image

cdammanintopix avatar Nov 23 '23 15:11 cdammanintopix

Code looks good but I lost a bit touch with Nextcloud codebase so I prefer if someone like @icewind1991 or @come-nc review this

CarlSchwan avatar Nov 23 '23 16:11 CarlSchwan

So after your review @come-nc do you confirm you approve this pull request?

cdammanintopix avatar Jan 19 '24 12:01 cdammanintopix

Checking why the cypress tests failed

cdammanintopix avatar Jan 23 '24 07:01 cdammanintopix

Checking why the cypress tests failed

Seems like if I rename the branch "master", all tests pass. Do you know if this is a CI bug or not? Does it fail because this pull request comes from a fork?

cdammanintopix avatar Jan 23 '24 08:01 cdammanintopix

@cdammanintopix can you rebase and fix conflicts please?

Cypress will fail because it breaks on forks

skjnldsv avatar Feb 23 '24 18:02 skjnldsv

@skjnldsv done 😉

cdammanintopix avatar Feb 26 '24 14:02 cdammanintopix

@cdammanintopix lint issue (see comment) Otherwise good for me.

Can you also reword your commit to follow conventional commits? I suggest something like feat(files_sharing): allow to specify allowed groups to share instead of excluded groups

skjnldsv avatar Feb 27 '24 15:02 skjnldsv

Hello @skjnldsv I rebased and fixed the conflicts. Should I worry about this test No DB unit tests (PHP 8.1) failing?

cdammanintopix avatar Mar 05 '24 10:03 cdammanintopix

Hello @skjnldsv I finally managed to reproduce the issue in the No DB unit tests (PHP 8.1) locally and fixed it. I rebased and fixed the conflicts. Could you start the tests? All should pass now 🙂 (except Cypress of course)

cdammanintopix avatar Mar 12 '24 08:03 cdammanintopix

Seems like all tests passed (except Cypress that fails on forks), could you merge this then, so that it is included in the next beta? 🙂

cdammanintopix avatar Mar 12 '24 13:03 cdammanintopix

Aaaand we have conflicts again :see_no_evil: Sorry @cdammanintopix lots of merges lately, this is frustrating, we're aware of the issue :smiling_face_with_tear:

EDIT: rebased

skjnldsv avatar Mar 15 '24 15:03 skjnldsv

Thanks for your first pull request and welcome to the community! Feel free to keep them coming! If you are looking for issues to tackle then have a look at this selection: https://github.com/nextcloud/server/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22

welcome[bot] avatar Mar 15 '24 16:03 welcome[bot]