Skip to content

Conversation

@MartinSchoeler
Copy link
Member

@MartinSchoeler MartinSchoeler commented Jul 31, 2025

Proposed changes (including videos or screenshots)

When the "Create Private/Public Channels" permission is turned off, the team creation UI still allows selecting a private team. However, attempting to create such a team results in an API error ("error-team-creation"). This is inconsistent with the channel creation UI, which disables the public/private toggle when the corresponding permission is off.

Since the Team has a main "channel", the user needs both create-team and create-c or create-p to be able to create a team

Issue(s)

SUP-747

Steps to test or reproduce

Disable the "Create Private Channels" permission for the user role.

Attempt to create a new team with the payload:

For public team → Succeeds

For private team → Fails with "error-team-creation"

@dionisio-bot
Copy link
Contributor

dionisio-bot bot commented Jul 31, 2025

Looks like this PR is ready to merge! 🎉
If you have any trouble, please check the PR guidelines

@MartinSchoeler MartinSchoeler added this to the 7.10.0 milestone Jul 31, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Jul 31, 2025

PR Preview Action v1.6.2

🚀 View preview at
https://RocketChat.github.io/Rocket.Chat/pr-preview/pr-36592/

Built to branch gh-pages at 2025-08-07 20:17 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@codecov
Copy link

codecov bot commented Jul 31, 2025

Codecov Report

❌ Patch coverage is 75.86207% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 65.77%. Comparing base (4e55ef4) to head (8545509).
⚠️ Report is 1 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #36592      +/-   ##
===========================================
+ Coverage    65.70%   65.77%   +0.06%     
===========================================
  Files         3199     3200       +1     
  Lines       106892   106886       -6     
  Branches     20343    20362      +19     
===========================================
+ Hits         70232    70299      +67     
+ Misses       34015    33936      -79     
- Partials      2645     2651       +6     
Flag Coverage Δ
e2e 56.99% <75.86%> (+0.01%) ⬆️
unit 71.30% <ø> (+0.02%) ⬆️

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.

@changeset-bot
Copy link

changeset-bot bot commented Jul 31, 2025

🦋 Changeset detected

Latest commit: 8545509

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/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/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/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/mock-providers Patch
@rocket.chat/ui-video-conf Patch
@rocket.chat/ui-voip Patch
@rocket.chat/instance-status Patch
@rocket.chat/omni-core Patch
@rocket.chat/omni-core-ee 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

@MartinSchoeler MartinSchoeler marked this pull request as ready for review July 31, 2025 20:24
@MartinSchoeler MartinSchoeler requested a review from a team as a code owner July 31, 2025 20:24
Copy link
Member

@dougfabris dougfabris left a comment

Choose a reason for hiding this comment

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

Copy link
Member

@dougfabris dougfabris left a comment

Choose a reason for hiding this comment

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

But since its the same rule we have in CreateChannelModal, can we create a shared hook to handle the permission for them?

@dougfabris dougfabris force-pushed the fix/private-team-permission branch from ea09d03 to 5b0090c Compare August 7, 2025 15:03
@dougfabris dougfabris added the stat: QA assured Means it has been tested and approved by a company insider label Aug 7, 2025
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Aug 7, 2025
Copy link
Member

@dougfabris dougfabris left a comment

Choose a reason for hiding this comment

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

thankyoumartinho

@kodiakhq kodiakhq bot merged commit 903e0db into develop Aug 7, 2025
49 checks passed
@kodiakhq kodiakhq bot deleted the fix/private-team-permission branch August 7, 2025 21:09
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.

3 participants