Skip to content
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

Don't show groups in share placeholder if group sharing is disabled #2242

Closed
tcitworld opened this issue Jun 1, 2021 · 4 comments · Fixed by #2419
Closed

Don't show groups in share placeholder if group sharing is disabled #2242

tcitworld opened this issue Jun 1, 2021 · 4 comments · Fixed by #2419
Labels
4. to release Ready to be released and/or waiting for tests to finish bug Something isn't working good first issue Good for newcomers

Comments

@tcitworld
Copy link
Member

Steps to reproduce

  1. Check out Dav respect disallow sharing with groups server#25658
  2. Disallow sharing with groups in the sharing settings
  3. Open the share section on an address book

Expected behaviour

No mention of "groups" in the placeholder.

Actual behaviour

Mention of "groups" in the placeholder.

@tcitworld tcitworld added bug Something isn't working 1. to develop Accepted and waiting to be taken care of good first issue Good for newcomers labels Jun 1, 2021
@harisaisundhar
Copy link

Hello! I would like to work on this issue, is it available? If so, can you tell more about this ?

@tcitworld
Copy link
Member Author

Great !

So in server we have introduced nextcloud/server#25658 a while ago, which is a flag to disable sharing with groups. It's working as intended, no groups are suggested in the autocomplete sharing field, but it would be nicer if the placeholder just said Share with users instead of Share with users or groups when group sharing is disabled.

See https://github.com/nextcloud/contacts/blob/master/src/components/AppNavigation/Settings/SettingsAddressbookShare.vue#L82

To know if group sharing if enabled you'll have to get the config value here and provide it though initial state.

$this->config->getAppValue('core', 'shareapi_allow_group_sharing', 'yes') === 'yes'

https://github.com/nextcloud/contacts/blob/master/lib/Controller/PageController.php

Then you can get the state for instance in a service:
https://github.com/nextcloud/contacts/blob/master/src/services/isContactsInteractionEnabled.js

And finally change the placeholder in the component linked at first depending on this value.

@harisaisundhar
Copy link

Awesome, thanks! Will come up with updates soon.

Zishan-7 added a commit to Zishan-7/contacts that referenced this issue Aug 30, 2021
Zishan-7 added a commit to Zishan-7/contacts that referenced this issue Aug 30, 2021
Zishan-7 added a commit to Zishan-7/contacts that referenced this issue Aug 30, 2021
Zishan-7 added a commit to Zishan-7/contacts that referenced this issue Aug 30, 2021
@Zishan-7
Copy link
Contributor

Hey! I tried to fix the issue can you please review the PR?

Zishan-7 added a commit to Zishan-7/contacts that referenced this issue Aug 30, 2021
ChristophWurst pushed a commit to Zishan-7/contacts that referenced this issue Dec 15, 2022
@ChristophWurst ChristophWurst added 4. to release Ready to be released and/or waiting for tests to finish and removed 1. to develop Accepted and waiting to be taken care of labels Dec 15, 2022
hamza221 pushed a commit to Zishan-7/contacts that referenced this issue May 22, 2023
ChristophWurst added a commit that referenced this issue May 22, 2023
Fix Don't show groups in share placeholder if group sharing is disabled #2242
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4. to release Ready to be released and/or waiting for tests to finish bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants