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

Fixed: Short-circuit the LDAP sync if LDAP is disabled #12444

Merged
merged 1 commit into from
Feb 2, 2023

Conversation

snipe
Copy link
Owner

@snipe snipe commented Feb 2, 2023

Previously, even if LDAP was disabled in the LDAP settings, if a cron was set up to sync, we would still sync, since we weren't checking to see if LDAP was enabled. This should resolve that issue.

Signed-off-by: snipe <snipe@snipe.net>
@what-the-diff
Copy link

what-the-diff bot commented Feb 2, 2023

  • Added a check to see if LDAP is enabled. If it isn't, then the script will abort and display an error message
  • Changed ini_set() calls from using env('LDAP_TIME_LIM', 600) to use Setting::getSettings()->ldap instead of hardcoded values

@snipe snipe requested a review from uberbrady February 2, 2023 00:38
Copy link
Collaborator

@uberbrady uberbrady left a comment

Choose a reason for hiding this comment

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

I can't possibly imagine a situation where someone has "LDAP enabled" set to off and yet is using LDAP to do syncs, so I think this should be a pretty reasonable change. If we start to see blowback from it, maybe we can figure out a way to mess around with it. But good catch, and it makes total sense to me.

@snipe snipe merged commit 1432403 into develop Feb 2, 2023
@snipe snipe changed the title Fixed: Short-circuit the LDAP sync is LDAP is disabled Fixed: Short-circuit the LDAP sync if LDAP is disabled Feb 2, 2023
@snipe snipe deleted the fixes/only_fire_ldap_sync_in_console_if_enabled branch February 2, 2023 00:43
@snipe
Copy link
Owner Author

snipe commented Feb 2, 2023

@uberbrady the use-case is for our hosted customers. If they have LDAP disabled (for example, because they are trying to sort out some settings, or username formats, but they have a sync cron running.)

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.

None yet

2 participants