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

Auto Accept Shares #7097

Merged
merged 5 commits into from
Sep 7, 2023
Merged

Auto Accept Shares #7097

merged 5 commits into from
Sep 7, 2023

Conversation

kobergj
Copy link
Collaborator

@kobergj kobergj commented Aug 22, 2023

Auto accepts shares when configured

Fixes #4834

According to story auto-accept should be true by default, but test pipeline cannot handle this for now. Steps to test auto acceptance:

  • Make sure service accounts are enabled by setting OCIS_SERVICE_ACCOUNT_ID and OCIS_SERVICE_ACCOUNT_SECRET (or running ocis init on a fresh system)
  • Enable auto-accept by setting FRONTEND_AUTO_ACCEPT_SHARES to true
  • Disable auto-accept for einstein:
curl --insecure -X POST -u einstein:relativity https://localhost:9200/api/v0/settings/values-save -d '{"value":{"accountUuid":"me","bundleId":"2a506de7-99bd-4f0d-994e-c38e72c28fd9","settingId":"ec3ed4a3-3946-4efc-8f9f-76d38b12d3a9","resource":{"type":"TYPE_USER"},"boolValue":false}}'
  • share a file with physics-lovers
  • login with marie -> Her share is accepted
  • login with einstein -> His share is not accepted

Note: Share acception is done asynchronously so there is a short gap between the creation of the share and the accept. This should not be visible on manual testing.

@update-docs
Copy link

update-docs bot commented Aug 22, 2023

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.

@kobergj kobergj force-pushed the AutoAcceptShares branch 6 times, most recently from 5d8bc09 to b2a8182 Compare September 4, 2023 12:50
@kobergj kobergj marked this pull request as ready for review September 4, 2023 12:51
services/ocs/README.md Outdated Show resolved Hide resolved
Signed-off-by: jkoberg <jkoberg@owncloud.com>
@kobergj kobergj force-pushed the AutoAcceptShares branch 2 times, most recently from 870d906 to 4a2cb75 Compare September 6, 2023 13:12
Signed-off-by: jkoberg <jkoberg@owncloud.com>
Copy link
Contributor

@mmattel mmattel left a comment

Choose a reason for hiding this comment

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

Looks good from a docs pov 👍

services/frontend/pkg/command/server.go Outdated Show resolved Hide resolved
Signed-off-by: jkoberg <jkoberg@owncloud.com>
@kobergj kobergj requested a review from rhafer September 6, 2023 14:48
services/ocs/README.md Outdated Show resolved Hide resolved
Co-authored-by: Martin <github@diemattels.at>
Copy link
Contributor

@fschade fschade left a comment

Choose a reason for hiding this comment

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

Code ✅
Tested ✅

would be nice to have it covered in ci... cc.: @individual-it

LGTM 🚀

@saw-jan
Copy link
Member

saw-jan commented Sep 7, 2023

would be nice to have it covered in ci... cc.: @individual-it

I have opened a ticket to add test coverage: #7241
We will be working on it.

@saw-jan
Copy link
Member

saw-jan commented Sep 7, 2023

According to story auto-accept should be true by default, but test pipeline cannot handle this for now

@kobergj, if it's required to be enabled by default in oCIS then maybe enable it by default and run tests with FRONTEND_AUTO_ACCEPT_SHARES=false for now, the later we can fix the tests and remove FRONTEND_AUTO_ACCEPT_SHARES=false. And we add some test scenarios with FRONTEND_AUTO_ACCEPT_SHARES=false.

@kobergj kobergj merged commit 55f6f20 into owncloud:master Sep 7, 2023
@kobergj kobergj deleted the AutoAcceptShares branch September 7, 2023 07:07
ownclouders pushed a commit that referenced this pull request Sep 7, 2023
@sonarqubecloud
Copy link

sonarqubecloud bot commented Sep 7, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

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

Successfully merging this pull request may close these issues.

[ocis] Auto-accept shares
6 participants