Skip to content

Conversation

@yash-rajpal
Copy link
Member

@yash-rajpal yash-rajpal commented Sep 1, 2025

Proposed changes (including videos or screenshots)

The API doesn't assign roles properly to the user subscriptions.

Issue(s)

Steps to test or reproduce

  • Identify a valid teamId and userId.
  • Send a POST request to the /api/v1/teams.addMembers endpoint.
  • Include a JSON body with a members array containing the userId and a roles array, for example:

{
    "teamId": "some-valid-team-id",
    "members": [
        {
            "userId": "some-valid-user-id",
            "roles": ["owner", "leader", "moderator"]
        }
    ]
}
  • Observe the API response.
  • Check the user's roles within the team via the Rocket.Chat GUI or by using the teams. Members API endpoint.

Further comments

SUP-821

@changeset-bot
Copy link

changeset-bot bot commented Sep 1, 2025

🦋 Changeset detected

Latest commit: be84134

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

This PR includes changesets to release 39 packages
Name Type
@rocket.chat/core-services Patch
@rocket.chat/meteor 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/network-broker Patch
@rocket.chat/omni-core-ee Patch
@rocket.chat/omnichannel-services Patch
@rocket.chat/presence Patch
rocketchat-services 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/cron Patch
@rocket.chat/ddp-client Patch
@rocket.chat/freeswitch Patch
@rocket.chat/fuselage-ui-kit Patch
@rocket.chat/gazzodown Patch
@rocket.chat/http-router Patch
@rocket.chat/livechat Patch
@rocket.chat/model-typings Patch
@rocket.chat/ui-avatar Patch
@rocket.chat/ui-client Patch
@rocket.chat/ui-contexts Patch
@rocket.chat/web-ui-registration Patch
@rocket.chat/license Patch
@rocket.chat/pdf-worker Patch
@rocket.chat/models Patch
@rocket.chat/mock-providers Patch
@rocket.chat/ui-video-conf Patch
@rocket.chat/ui-voip Patch
@rocket.chat/instance-status Patch
@rocket.chat/omni-core 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

@dionisio-bot
Copy link
Contributor

dionisio-bot bot commented Sep 1, 2025

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

  • This PR is targeting the wrong base branch. It should target 7.11.0, but it targets 7.10.0

Please fix the issues and try again

If you have any trouble, please check the PR guidelines

@codecov
Copy link

codecov bot commented Sep 1, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 66.34%. Comparing base (e10eca1) to head (be84134).
⚠️ Report is 1 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #36852      +/-   ##
===========================================
- Coverage    66.34%   66.34%   -0.01%     
===========================================
  Files         3324     3324              
  Lines       111340   111339       -1     
  Branches     21084    21095      +11     
===========================================
- Hits         73872    73871       -1     
+ Misses       34777    34776       -1     
- Partials      2691     2692       +1     
Flag Coverage Δ
e2e 57.67% <ø> (+<0.01%) ⬆️
unit 71.62% <ø> (ø)

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@yash-rajpal yash-rajpal marked this pull request as ready for review September 1, 2025 18:08
@yash-rajpal yash-rajpal requested a review from a team as a code owner September 1, 2025 18:08
Copy link
Member

@abhinavkrin abhinavkrin left a comment

Choose a reason for hiding this comment

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

Could we add an api e2e test to verify the fix?

@dougfabris dougfabris added this to the 7.11.0 milestone Sep 1, 2025
Copy link
Member

@abhinavkrin abhinavkrin 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 to me.

abhinavkrin

This comment was marked as duplicate.

@yash-rajpal yash-rajpal added the stat: QA assured Means it has been tested and approved by a company insider label Sep 2, 2025
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Sep 2, 2025
@kodiakhq kodiakhq bot merged commit 3dfb557 into develop Sep 3, 2025
75 of 111 checks passed
@kodiakhq kodiakhq bot deleted the fix/add-team-member-roles branch September 3, 2025 21:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stat: QA assured Means it has been tested and approved by a company insider stat: ready to merge PR tested and approved waiting for merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants