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: check if new LDAP users will exceed the license #35244

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from

Conversation

tapiarafael
Copy link
Member

@tapiarafael tapiarafael commented Feb 18, 2025

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)

CORE-990

Steps to test or reproduce

Further comments

Copy link
Contributor

dionisio-bot bot commented Feb 18, 2025

Looks like this PR is not ready to merge, because of the following issues:

  • This PR is missing the 'stat: QA assured' label
  • This PR is targeting the wrong base branch. It should target 7.5.0, but it targets 7.4.0

Please fix the issues and try again

If you have any trouble, please check the PR guidelines

Copy link

codecov bot commented Feb 18, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 59.45%. Comparing base (e1ef47d) to head (84446c1).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##           develop   #35244   +/-   ##
========================================
  Coverage    59.45%   59.45%           
========================================
  Files         2828     2828           
  Lines        68159    68159           
  Branches     15124    15124           
========================================
  Hits         40521    40521           
  Misses       24982    24982           
  Partials      2656     2656           
Flag Coverage Δ
unit 75.70% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Copy link

changeset-bot bot commented Feb 18, 2025

🦋 Changeset detected

Latest commit: 84446c1

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 35 packages
Name Type
@rocket.chat/meteor Patch
@rocket.chat/core-typings Patch
@rocket.chat/rest-typings Patch
@rocket.chat/uikit-playground Patch
@rocket.chat/api-client Patch
@rocket.chat/apps Patch
@rocket.chat/core-services Patch
@rocket.chat/cron Patch
@rocket.chat/ddp-client Patch
@rocket.chat/freeswitch Patch
@rocket.chat/fuselage-ui-kit Patch
@rocket.chat/gazzodown Patch
@rocket.chat/livechat Patch
@rocket.chat/model-typings Patch
@rocket.chat/ui-contexts Patch
@rocket.chat/account-service Patch
@rocket.chat/authorization-service Patch
@rocket.chat/ddp-streamer Patch
@rocket.chat/omnichannel-transcript Patch
@rocket.chat/presence-service Patch
@rocket.chat/queue-worker Patch
@rocket.chat/stream-hub-service Patch
@rocket.chat/license Patch
@rocket.chat/omnichannel-services Patch
@rocket.chat/pdf-worker Patch
@rocket.chat/presence Patch
rocketchat-services Patch
@rocket.chat/models Patch
@rocket.chat/network-broker Patch
@rocket.chat/ui-avatar Patch
@rocket.chat/ui-client Patch
@rocket.chat/ui-video-conf Patch
@rocket.chat/ui-voip Patch
@rocket.chat/web-ui-registration Patch
@rocket.chat/instance-status Patch

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

@tapiarafael
Copy link
Member Author

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.
The best scenario would be extracting the license seat validation to a function and testing the function isolated, but this would be only to say that we have tests, since I would be testing a dumb sum equation (2 users + 2 newUsers >= licenseLimit)

@tapiarafael tapiarafael marked this pull request as ready for review February 18, 2025 17:29
@scuciatto scuciatto added this to the 7.5.0 milestone Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants