Skip to content

Conversation

@pierre-lehnen-rc
Copy link
Contributor

@pierre-lehnen-rc pierre-lehnen-rc commented Dec 2, 2025

Proposed changes (including videos or screenshots)

Issue(s)

CORE-1521

Steps to test or reproduce

Further comments

Summary by CodeRabbit

  • Chores
    • Removed deprecated VoIP permissions framework, including manage-voip-extensions, view-user-voip-extension, and view-voip-extension-details.
    • Removed legacy FreeSwitch integration from the system.
    • Simplified VoIP extension access control: visibility is now managed through a global configuration setting (VoIP_TeamCollab_Enabled) instead of individual user permissions.
    • Updated user data to consistently include VoIP extension information across API endpoints.

✏️ Tip: You can customize this high-level summary in your review settings.

@dionisio-bot
Copy link
Contributor

dionisio-bot bot commented Dec 2, 2025

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

@changeset-bot
Copy link

changeset-bot bot commented Dec 2, 2025

🦋 Changeset detected

Latest commit: 26f33eb

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

This PR includes changesets to release 42 packages
Name Type
@rocket.chat/i18n Major
@rocket.chat/meteor Major
@rocket.chat/model-typings Major
@rocket.chat/core-typings Major
@rocket.chat/rest-typings Major
@rocket.chat/ui-contexts Major
@rocket.chat/ui-voip Major
@rocket.chat/models Major
@rocket.chat/apps-engine Minor
@rocket.chat/core-services Minor
@rocket.chat/message-types Minor
@rocket.chat/ddp-client Minor
@rocket.chat/mock-providers Patch
@rocket.chat/web-ui-registration Major
@rocket.chat/omnichannel-transcript Patch
@rocket.chat/omnichannel-services Patch
@rocket.chat/apps Patch
@rocket.chat/account-service Patch
@rocket.chat/authorization-service Patch
@rocket.chat/ddp-streamer Patch
@rocket.chat/presence-service Patch
@rocket.chat/queue-worker Patch
rocketchat-services Patch
@rocket.chat/uikit-playground Patch
@rocket.chat/api-client Patch
@rocket.chat/cron Patch
@rocket.chat/fuselage-ui-kit Major
@rocket.chat/gazzodown Major
@rocket.chat/http-router Patch
@rocket.chat/livechat Patch
@rocket.chat/ui-avatar Major
@rocket.chat/ui-client Major
@rocket.chat/federation-matrix Patch
@rocket.chat/license Patch
@rocket.chat/media-calls Patch
@rocket.chat/pdf-worker Patch
@rocket.chat/presence Patch
@rocket.chat/ui-video-conf Major
@rocket.chat/instance-status Patch
@rocket.chat/omni-core Patch
@rocket.chat/omni-core-ee Patch
@rocket.chat/network-broker 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

@pierre-lehnen-rc pierre-lehnen-rc added this to the 8.0.0 milestone Dec 2, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 2, 2025

Walkthrough

This PR removes deprecated VoIP/FreeSwitch permissions (manage-voip-extensions, view-user-voip-extension, view-voip-extension-details) from the system. The freeSwitchExtension field is now unconditionally included in user projections, permission checks are removed, related UI hooks are replaced with a settings-based approach, localization keys are deleted, and a migration is added to clean up the permission records from the database.

Changes

Cohort / File(s) Summary
Permission & Authorization Removals
apps/meteor/app/authorization/server/constant/permissions.ts
Deleted three VOIP permission definitions: manage-voip-extensions, view-user-voip-extension, and view-voip-extension-details.
User Data Projection Changes
apps/meteor/app/api/server/lib/users.ts, apps/meteor/app/api/server/v1/im.ts, apps/meteor/app/lib/server/functions/getFullUserData.ts
Removed permission-based conditionals for freeSwitchExtension projection; field is now always included unconditionally. Simplified import statements by removing hasAtLeastOnePermissionAsync references.
Permission Check Function Signature Update
apps/meteor/app/lib/server/functions/saveUser/validateUserEditing.ts, apps/meteor/app/api/server/v1/users.ts
Changed canEditExtension from accepting (userId, newExtension) to only (newExtension), removing userId-based permission check logic. Updated all call sites accordingly.
Client-side VoIP UI Hook Migration
apps/meteor/client/views/admin/users/useShowVoipExtension.tsx, apps/meteor/client/views/admin/users/useVoipExtensionPermission.tsx, apps/meteor/client/views/admin/users/AdminUserForm.tsx, apps/meteor/client/views/admin/users/UsersTable/UsersTable.tsx
Deleted useVoipExtensionPermission hook; added new useShowVoipExtension hook that checks only a setting (VoIP_TeamCollab_Enabled). Updated components to use the new hook and renamed internal variable canManageVoipExtension to showVoipExtension.
Test Cleanup
apps/meteor/tests/end-to-end/api/users.ts
Removed VoIP permission grant/revoke logic and test cases validating permission-based behavior during VoIP extension operations.
Localization Key Removals
packages/i18n/src/locales/en.i18n.json, packages/i18n/src/locales/nb.i18n.json, packages/i18n/src/locales/nn.i18n.json, packages/i18n/src/locales/pt-BR.i18n.json, packages/i18n/src/locales/sv.i18n.json
Removed six translation keys per locale related to VoIP permissions: manage-voip-extensions, manage-voip-extensions_description, view-user-voip-extension, view-user-voip-extension_description, view-voip-extension-details, view-voip-extension-details_description.
Database Migration
apps/meteor/server/startup/migrations/v328.ts, apps/meteor/server/startup/migrations/index.ts
Added new migration v328 that deletes the three removed VOIP permission documents from the Permissions collection. Added import reference in migrations index.
Changeset Documentation
.changeset/chilly-cobras-look.md, .changeset/curly-bats-wink.md, .changeset/four-timers-enjoy.md
Added changeset entries marking major version bumps for @rocket.chat/i18n, @rocket.chat/meteor, and related packages; notes removal of deprecated VoIP/FreeSwitch integration.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Areas requiring extra attention:

  • Signature change to canEditExtension() function in validateUserEditing.ts and all call sites — verify all invocations have been updated correctly
  • User projection logic changes across three API files (users.ts, im.ts, getFullUserData.ts) — confirm freeSwitchExtension is properly exposed unconditionally
  • Migration v328 delete logic — verify it correctly targets and removes the three permission entries without side effects
  • UI hook replacement (useVoipExtensionPermissionuseShowVoipExtension) — ensure all dependent components are updated and rendering logic is correct

Possibly related PRs

Suggested labels

stat: ready to merge

Suggested reviewers

  • KevLehman
  • tassoevan

Poem

🐰 Hop, hop—permissions fade away,
VoIP extensions vanish today,
No checks to slow us down,
Settings wear the crown,
Cleaner code, simpler play!

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The PR includes out-of-scope changes beyond the stated objective of removing deprecated permissions: modifications to freeSwitchExtension projection logic, canEditExtension signature changes, and hook replacement (useVoipExtensionPermission to useShowVoipExtension). Clarify or separate changes unrelated to permission removal. Either expand the issue scope to explicitly cover freeSwitchExtension and permission check modifications, or move those changes to a separate PR.
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title 'chore!: remove old voip permissions' clearly and concisely describes the primary change—removing deprecated VOIP permissions for the 8.0.0 release.
Linked Issues check ✅ Passed The PR successfully removes all three deprecated Voice Call permissions (manage-voip-extensions, view-user-voip-extension, view-voip-extension-details) as required by CORE-1521.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/remove-old-voip-permissions

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between db1acf4 and 26f33eb.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (21)
  • .changeset/chilly-cobras-look.md (1 hunks)
  • .changeset/curly-bats-wink.md (1 hunks)
  • .changeset/four-timers-enjoy.md (1 hunks)
  • apps/meteor/app/api/server/lib/users.ts (1 hunks)
  • apps/meteor/app/api/server/v1/im.ts (2 hunks)
  • apps/meteor/app/api/server/v1/users.ts (1 hunks)
  • apps/meteor/app/authorization/server/constant/permissions.ts (0 hunks)
  • apps/meteor/app/lib/server/functions/getFullUserData.ts (1 hunks)
  • apps/meteor/app/lib/server/functions/saveUser/validateUserEditing.ts (2 hunks)
  • apps/meteor/client/views/admin/users/AdminUserForm.tsx (3 hunks)
  • apps/meteor/client/views/admin/users/UsersTable/UsersTable.tsx (5 hunks)
  • apps/meteor/client/views/admin/users/useShowVoipExtension.tsx (1 hunks)
  • apps/meteor/client/views/admin/users/useVoipExtensionPermission.tsx (0 hunks)
  • apps/meteor/server/startup/migrations/index.ts (1 hunks)
  • apps/meteor/server/startup/migrations/v328.ts (1 hunks)
  • apps/meteor/tests/end-to-end/api/users.ts (1 hunks)
  • packages/i18n/src/locales/en.i18n.json (0 hunks)
  • packages/i18n/src/locales/nb.i18n.json (0 hunks)
  • packages/i18n/src/locales/nn.i18n.json (0 hunks)
  • packages/i18n/src/locales/pt-BR.i18n.json (0 hunks)
  • packages/i18n/src/locales/sv.i18n.json (0 hunks)
💤 Files with no reviewable changes (7)
  • apps/meteor/client/views/admin/users/useVoipExtensionPermission.tsx
  • apps/meteor/app/authorization/server/constant/permissions.ts
  • packages/i18n/src/locales/nn.i18n.json
  • packages/i18n/src/locales/nb.i18n.json
  • packages/i18n/src/locales/en.i18n.json
  • packages/i18n/src/locales/sv.i18n.json
  • packages/i18n/src/locales/pt-BR.i18n.json
🚧 Files skipped from review as they are similar to previous changes (9)
  • apps/meteor/tests/end-to-end/api/users.ts
  • apps/meteor/app/api/server/lib/users.ts
  • apps/meteor/server/startup/migrations/index.ts
  • apps/meteor/app/api/server/v1/im.ts
  • apps/meteor/app/api/server/v1/users.ts
  • apps/meteor/server/startup/migrations/v328.ts
  • apps/meteor/client/views/admin/users/useShowVoipExtension.tsx
  • apps/meteor/client/views/admin/users/UsersTable/UsersTable.tsx
  • .changeset/four-timers-enjoy.md
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,tsx,js}

📄 CodeRabbit inference engine (.cursor/rules/playwright.mdc)

**/*.{ts,tsx,js}: Write concise, technical TypeScript/JavaScript with accurate typing in Playwright tests
Avoid code comments in the implementation

Files:

  • apps/meteor/client/views/admin/users/AdminUserForm.tsx
  • apps/meteor/app/lib/server/functions/saveUser/validateUserEditing.ts
  • apps/meteor/app/lib/server/functions/getFullUserData.ts
🧠 Learnings (4)
📓 Common learnings
Learnt from: pierre-lehnen-rc
Repo: RocketChat/Rocket.Chat PR: 36718
File: packages/media-signaling/src/lib/Call.ts:633-642
Timestamp: 2025-09-23T00:27:05.438Z
Learning: In PR #36718, pierre-lehnen-rc prefers to maintain consistency with the old architecture patterns for DTMF handling rather than implementing immediate validation improvements, deferring enhancements to future work.
📚 Learning: 2025-11-19T12:32:29.696Z
Learnt from: d-gubert
Repo: RocketChat/Rocket.Chat PR: 37547
File: packages/i18n/src/locales/en.i18n.json:634-634
Timestamp: 2025-11-19T12:32:29.696Z
Learning: Repo: RocketChat/Rocket.Chat
Context: i18n workflow
Learning: In this repository, new translation keys should be added to packages/i18n/src/locales/en.i18n.json only; other locale files are populated via the external translation pipeline and/or fall back to English. Do not request adding the same key to all locale files in future reviews.

Applied to files:

  • .changeset/chilly-cobras-look.md
📚 Learning: 2025-11-19T18:20:07.720Z
Learnt from: gabriellsh
Repo: RocketChat/Rocket.Chat PR: 37419
File: packages/i18n/src/locales/en.i18n.json:918-921
Timestamp: 2025-11-19T18:20:07.720Z
Learning: Repo: RocketChat/Rocket.Chat — i18n/formatting
Learning: This repository uses a custom message formatting parser in UI blocks/messages; do not assume standard Markdown rules. For keys like Call_ended_bold, Call_not_answered_bold, Call_failed_bold, and Call_transferred_bold in packages/i18n/src/locales/en.i18n.json, retain the existing single-asterisk emphasis unless maintainers request otherwise.

Applied to files:

  • .changeset/chilly-cobras-look.md
  • .changeset/curly-bats-wink.md
📚 Learning: 2025-09-19T15:15:04.642Z
Learnt from: rodrigok
Repo: RocketChat/Rocket.Chat PR: 36991
File: apps/meteor/server/services/federation/infrastructure/rocket-chat/adapters/Settings.ts:219-221
Timestamp: 2025-09-19T15:15:04.642Z
Learning: The Federation_Matrix_homeserver_domain setting in apps/meteor/server/services/federation/infrastructure/rocket-chat/adapters/Settings.ts is part of the old federation system and is being deprecated/removed, so configuration issues with this setting should not be flagged for improvement.

Applied to files:

  • .changeset/chilly-cobras-look.md
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: CodeQL-Build
  • GitHub Check: CodeQL-Build
🔇 Additional comments (8)
.changeset/curly-bats-wink.md (1)

1-16: LGTM!

The changeset correctly declares major version bumps for packages affected by the breaking change (removal of VoIP permissions), and minor bumps for packages with non-breaking related updates.

.changeset/chilly-cobras-look.md (1)

1-6: LGTM!

The changeset properly declares major version bumps for the affected packages. Multiple changesets in a PR are valid and will be combined during release.

apps/meteor/client/views/admin/users/AdminUserForm.tsx (3)

40-40: LGTM!

The import change correctly switches from the permission-based hook to the new settings-based hook.


126-126: LGTM!

The renamed variable showVoipExtension better reflects its purpose as a visibility flag rather than a permission check.


344-355: LGTM!

The VoIP extension field is now conditionally rendered based on the VoIP_TeamCollab_Enabled setting instead of user permissions, aligning with the PR objective of removing deprecated VoIP permissions.

apps/meteor/app/lib/server/functions/getFullUserData.ts (1)

24-24: Verify that exposing freeSwitchExtension to all users is intentional.

Moving freeSwitchExtension from fullFields (permission-gated) to defaultFields means this data is now visible to all users, not just those with view-full-other-user-info permission. This is a change in data exposure semantics.

If this is intentional (i.e., VoIP extensions are no longer considered sensitive), the change is correct. Otherwise, consider keeping it in fullFields or adding a separate condition.

apps/meteor/app/lib/server/functions/saveUser/validateUserEditing.ts (2)

15-25: Authorization model change: verify this is intended.

The function now only checks if VoIP_TeamCollab_Enabled is true, removing the previous manage-voip-extensions permission check. This means any user can potentially edit VoIP extensions (subject to other validation in validateUserEditing).

The uniqueness check (line 20-22) is correctly preserved to prevent duplicate extension assignments.


114-122: LGTM!

The call site correctly uses the simplified canEditExtension signature, and the validation flow remains intact—the extension edit is blocked if VoIP is disabled or if the extension is already assigned to another user.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@pierre-lehnen-rc pierre-lehnen-rc marked this pull request as ready for review December 2, 2025 17:55
@pierre-lehnen-rc pierre-lehnen-rc requested review from a team as code owners December 2, 2025 17:55
@pierre-lehnen-rc pierre-lehnen-rc added the stat: QA assured Means it has been tested and approved by a company insider label Dec 2, 2025
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Dec 2, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Dec 2, 2025

📦 Docker Image Size Report

📈 Changes

Service Current Baseline Change Percent
sum of all images 1.1GiB 1.1GiB +8.6MiB
rocketchat 358MiB 349MiB +9.0MiB
omnichannel-transcript-service 132MiB 132MiB -92KiB
queue-worker-service 132MiB 132MiB -92KiB
ddp-streamer-service 126MiB 126MiB -38KiB
account-service 113MiB 113MiB -44KiB
authorization-service 111MiB 111MiB -40KiB
presence-service 111MiB 111MiB -39KiB

📊 Historical Trend

---
config:
  theme: "dark"
  xyChart:
    width: 900
    height: 400
---
xychart
  title "Image Size Evolution by Service (Last 30 Days + This PR)"
  x-axis ["11/15 22:28", "11/16 01:28", "11/17 23:50", "11/18 22:53", "11/19 23:02", "11/21 16:49", "11/24 17:34", "11/27 22:32", "11/28 19:05", "12/01 23:01", "12/02 21:57", "12/03 21:00", "12/04 18:17", "12/05 21:56", "12/08 20:15", "12/09 15:01", "12/09 15:51 (PR)"]
  y-axis "Size (GB)" 0 --> 0.5
  line "account-service" [0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11]
  line "authorization-service" [0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11]
  line "ddp-streamer-service" [0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12]
  line "omnichannel-transcript-service" [0.14, 0.14, 0.14, 0.14, 0.14, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13]
  line "presence-service" [0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11]
  line "queue-worker-service" [0.14, 0.14, 0.14, 0.14, 0.14, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13]
  line "rocketchat" [0.36, 0.36, 0.35, 0.35, 0.35, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.35]
Loading

Statistics (last 16 days):

  • 📊 Average: 1.5GiB
  • ⬇️ Minimum: 1.2GiB
  • ⬆️ Maximum: 1.6GiB
  • 🎯 Current PR: 1.1GiB
ℹ️ About this report

This report compares Docker image sizes from this build against the develop baseline.

  • Tag: pr-37672
  • Baseline: develop
  • Timestamp: 2025-12-09 15:51:51 UTC
  • Historical data points: 16

Updated: Tue, 09 Dec 2025 15:51:52 GMT

@ggazzo ggazzo requested review from a team as code owners December 2, 2025 21:26
@kodiakhq kodiakhq bot removed the stat: ready to merge PR tested and approved waiting for merge label Dec 2, 2025
@kodiakhq
Copy link
Contributor

kodiakhq bot commented Dec 2, 2025

This PR currently has a merge conflict. Please resolve this and then re-add the ['stat: ready to merge', 'automerge'] label.

@ggazzo ggazzo force-pushed the release-8.0.0 branch 4 times, most recently from 169b783 to 73d9200 Compare December 2, 2025 23:22
@pierre-lehnen-rc pierre-lehnen-rc force-pushed the chore/remove-old-voip-permissions branch from 3e746ec to dc7e8a3 Compare December 8, 2025 15:12
@pierre-lehnen-rc pierre-lehnen-rc removed request for a team December 8, 2025 15:13
KevLehman
KevLehman previously approved these changes Dec 8, 2025
@pierre-lehnen-rc pierre-lehnen-rc force-pushed the chore/remove-old-voip-permissions branch from db1acf4 to 1609231 Compare December 9, 2025 15:10
@pierre-lehnen-rc pierre-lehnen-rc force-pushed the chore/remove-old-voip-permissions branch from 1609231 to 26f33eb Compare December 9, 2025 15:16
@ggazzo ggazzo merged commit 88fd76d into release-8.0.0 Dec 9, 2025
72 of 75 checks passed
@ggazzo ggazzo deleted the chore/remove-old-voip-permissions branch December 9, 2025 17:01
ggazzo pushed a commit that referenced this pull request Dec 10, 2025
ggazzo pushed a commit that referenced this pull request Dec 15, 2025
ggazzo pushed a commit that referenced this pull request Dec 17, 2025
ggazzo pushed a commit that referenced this pull request Dec 17, 2025
ggazzo pushed a commit that referenced this pull request Dec 17, 2025
ggazzo pushed a commit that referenced this pull request Dec 18, 2025
ggazzo pushed a commit that referenced this pull request Dec 18, 2025
ggazzo pushed a commit that referenced this pull request Dec 18, 2025
ggazzo pushed a commit that referenced this pull request Dec 18, 2025
ggazzo pushed a commit that referenced this pull request Dec 19, 2025
ggazzo pushed a commit that referenced this pull request Dec 19, 2025
ggazzo pushed a commit that referenced this pull request Dec 19, 2025
ggazzo pushed a commit that referenced this pull request Dec 20, 2025
ggazzo pushed a commit that referenced this pull request Dec 20, 2025
ggazzo pushed a commit that referenced this pull request Dec 20, 2025
ggazzo pushed a commit that referenced this pull request Dec 20, 2025
gaolin1 pushed a commit to gaolin1/medsense.webchat that referenced this pull request Jan 6, 2026
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants