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

fix: automatically disable sab #50605

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

SebastianKrupinski
Copy link
Contributor

@SebastianKrupinski SebastianKrupinski commented Feb 1, 2025

Summary

Automatically disables system address book when a configured limit is reached.

Checklist

@SebastianKrupinski SebastianKrupinski added the 3. to review Waiting for reviews label Feb 1, 2025
@SebastianKrupinski SebastianKrupinski self-assigned this Feb 1, 2025
@AndyScherzinger AndyScherzinger added this to the Nextcloud 32 milestone Feb 11, 2025
@SebastianKrupinski SebastianKrupinski force-pushed the fix/49431-automatically-disable-sab branch from 4950879 to f81af1e Compare February 12, 2025 05:34
Copy link
Member

@ChristophWurst ChristophWurst 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

@SebastianKrupinski
Copy link
Contributor Author

/backport to stable31

@SebastianKrupinski
Copy link
Contributor Author

/backport to stable30

@SebastianKrupinski
Copy link
Contributor Author

/backport to stable29

@SebastianKrupinski SebastianKrupinski force-pushed the fix/49431-automatically-disable-sab branch from f81af1e to a288ada Compare February 17, 2025 14:06
Copy link
Member

@st3iny st3iny 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 and tests are included.

@SebastianKrupinski
Copy link
Contributor Author

@st3iny thank you

@SebastianKrupinski
Copy link
Contributor Author

Temporarily converted to draft to adjust logic.

@SebastianKrupinski SebastianKrupinski marked this pull request as draft February 17, 2025 19:28
@st3iny
Copy link
Member

st3iny commented Feb 17, 2025

Temporarily converted to draft to adjust logic.

What is the problem? The sync being run despite the exposed config being set to no?

@kesselb
Copy link
Contributor

kesselb commented Feb 17, 2025

What is the problem?

The code is only executed when running the sync command via occ or when installing nextcloud (but then you don't have a 5k user directory connected). It should be a migration / repair step to automatically disable sab. Not as side effection when calling the sync command.

@SebastianKrupinski
Copy link
Contributor Author

SebastianKrupinski commented Feb 17, 2025

What is the problem? The sync being run despite the exposed config being set to no?

No... at the moment the logic disables the system address book automatically even if the admin forces the "system_addressbook_exposed" to yes, if the limit is reached. And during our 1 on 1 today, we thought that is might cause confusion. So the solution is to only automatically disable the address book if the "system_addressbook_exposed" has not been set yet, I just have not made the adjustment yet.

@SebastianKrupinski SebastianKrupinski force-pushed the fix/49431-automatically-disable-sab branch from a288ada to 0ee3572 Compare February 17, 2025 23:46
Copy link
Member

@st3iny st3iny left a comment

Choose a reason for hiding this comment

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

Daniel is right though. The syncInstance() method is only called from the occ command (or during an old migration).

image

Signed-off-by: SebastianKrupinski <krupinskis05@gmail.com>
@SebastianKrupinski SebastianKrupinski force-pushed the fix/49431-automatically-disable-sab branch from 0ee3572 to 5d5e11b Compare March 4, 2025 00:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Automatically disable the system address book for large instances
5 participants