Skip to content

New core setting : shareapi_only_share_with_group_members_exclude_gro… - #38173

Merged
artonge merged 4 commits into
nextcloud:masterfrom
arawa:feature/37677/exclude-some-groups-from-sharing-with-users
Jan 31, 2024
Merged

New core setting : shareapi_only_share_with_group_members_exclude_gro…#38173
artonge merged 4 commits into
nextcloud:masterfrom
arawa:feature/37677/exclude-some-groups-from-sharing-with-users

Conversation

@smarinier

@smarinier smarinier commented May 10, 2023

Copy link
Copy Markdown

…up_list (issue #37677)

Summary

This implements new settings 'shareapi_only_share_with_group_members_exclude_group_list' wich complements the actual boolean setting 'shareapi_only_share_with_group_members'. Indeed the admin may need to isolate some specific groups (eg admin groups) from this consideration of "we can share each others".

  • Implement the new array of groups settings, enabled/hidden in admin view by shareapi_only_share_with_group_members enabled/disabled.
  • Implement the complement group filtering in different part of code

Screenshots

Here is the list of users with their groups.

users-list-with-groups

In the demonstration, I log in with the alice's account and she is in the "DSI" and "Groupe A" groups.

Before

From the Settings > Sharing page.
I checked "Restrict users to only share with users in their groups" in the checkbox.

settings-sharing-before

As "alice", I would like to share my "Project-A" folder.

alice-search-users-before.webm

After

But, I would like, as "alice", to list the users who are in the same group as me to share my folder... Except for some groups where I wouldn't want to list those users.

So, from the Settings > Sharing page.
I checked "Restrict users to only share with users in their groups" in the checkbox... and a search bar appears.
I enter the groups I don't want to see in the shares.

In the example, I enter the "DSI" and "RH" groups.

settings-sharing-after

As "alice", I would like to share my "Project-A" folder.

alice-search-users-after.webm

And now, I cannot see the user "john" because he is in the DSI group. And yet, we are in the same group.

TODO

  • Should be handled in "dav" application, to be really picky
    • apps/dav/lib/Command/MoveCalendar.php : aff
    • apps/dav/lib/Connector/Sabre/Principal.php :
      *apps/dav/lib/DAV/GroupPrincipalBackend.php

Checklist

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2. developing Work in progress enhancement feature: settings pending documentation This pull request needs an associated documentation update

Projects

None yet