Skip to content

Conversation

@juliusknorr
Copy link
Member

This PR makes accepting shares automatically the default. There are two config.php settings:

  • sharing.enable_share_accept - set to true to disable automated share acceptance (reverting the current logic in master)
  • sharing.force_share_accept - allow to enforce the new mechanism

The sharing settings will be hidden if accepting is enforced.

@juliusknorr juliusknorr added 3. to review Waiting for reviews bug labels Jan 16, 2020
@juliusknorr juliusknorr added this to the Nextcloud 19 milestone Jan 16, 2020
@juliusknorr
Copy link
Member Author

/backport to stable18

Copy link
Member

@rullzer rullzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also I think you need to update the classmap


private function handleAutoAccept(IShare $share, string $userId) {
if ($this->config->getUserValue($userId, 'files_sharing','default_accept','no') === 'yes') {
$defaultAcceptSystemConfig = $this->config->getSystemValueBool('sharing.enable_share_accept', false) ? 'no' : 'yes';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we have another if here. That if share accept is false. We just accept it directly?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No this is just the default value that might be overwritten later by the user value. If no user value is set it will be used.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aaaah right!

@juliusknorr juliusknorr requested a review from rullzer January 16, 2020 18:26
Signed-off-by: Julius Härtl <jus@bitgrid.net>
…are acceptance process

Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
@rullzer rullzer force-pushed the force-share-accept branch from 3abdadb to 176aeab Compare January 16, 2020 21:08
@rullzer rullzer merged commit d1c8469 into master Jan 17, 2020
@rullzer rullzer deleted the force-share-accept branch January 17, 2020 00:14
@backportbot-nextcloud
Copy link

The backport to stable18 failed. Please do this backport manually.

@juliusknorr juliusknorr added the pending documentation This pull request needs an associated documentation update label Mar 25, 2020
@juliusknorr juliusknorr removed the pending documentation This pull request needs an associated documentation update label Nov 14, 2022
@juliusknorr
Copy link
Member Author

Autodocumented through the config.php sample

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

Labels

3. to review Waiting for reviews bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants