-
Notifications
You must be signed in to change notification settings - Fork 13k
fix: check if new LDAP users will exceed the license #35244
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
Conversation
|
Looks like this PR is ready to merge! 🎉 |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #35244 +/- ##
========================================
Coverage 59.62% 59.62%
========================================
Files 2832 2832
Lines 68362 68362
Branches 15144 15144
========================================
Hits 40758 40758
Misses 24996 24996
Partials 2608 2608
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
🦋 Changeset detectedLatest commit: 05b2b68 The changes in this PR will be included in the next version bump. This PR includes changesets to release 36 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
I can't write tests for this one. E2E is impossible because of the LDAP, and unit testing is almost insane, considering how much I would need to mock and how artificial the test would be. |
|
dd8ecf3
refactor: early return to improve readability Create famous-falcons-laugh.md test: ensure that license is being checked feat: use `shouldPreventAction` from License rewrites changeset validate license on user insertion instead oops
7b2e7d9 to
fac8690
Compare
Kody Review CompleteGreat news! 🎉 Keep up the excellent work! 🚀 Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
Proposed changes (including videos or screenshots)
Check the license before inserting new users on the LDAP Sync (It will continue to update existing users).
Issue(s)
Steps to test or reproduce
Further comments
This pull request addresses an issue in the Rocket.Chat repository by adding a validation mechanism to the LDAP synchronization process. The update ensures that the activation of new LDAP users does not exceed the license restrictions. Specifically, a new method
insertUseris introduced in theLDAPUserConverterclass to manage user insertion while checking against the active user license limit. Additionally, a logger is implemented to provide warnings when the maximum number of users is reached. These changes aim to prevent any violations of the seat limit defined by the license.