Skip to content

Conversation

@MartinSchoeler
Copy link
Member

@MartinSchoeler MartinSchoeler commented Nov 11, 2025

Proposed changes (including videos or screenshots)

Adds a new field in room info that shows the ABAC room attributes when the setting ABAC_ShowAttributesInRooms is enabled. Since neither abac attributes nor setting exists on develop, this is a chore, only adding the components to be used later on

Screenshot 2025-11-11 at 16 10 47

Issue(s)

ABAC-73

Steps to test or reproduce

Further comments

Summary by CodeRabbit

  • New Features

    • Added an ABAC section to the Room Info panel that displays room attributes and values when ABAC is enabled.
    • ABAC-managed rooms now show compliance info and an ABAC tag in room details.
  • Documentation

    • Added English localization strings for ABAC labels and descriptions.
  • Tests

    • Added unit, accessibility (jest-axe), and snapshot tests for ABAC section behavior.
  • Chores

    • Added a Storybook story demonstrating ABAC attributes in Room Info.

@dionisio-bot
Copy link
Contributor

dionisio-bot bot commented Nov 11, 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 Nov 11, 2025

⚠️ No Changeset found

Latest commit: b56f763

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@MartinSchoeler MartinSchoeler added this to the 7.13.0 milestone Nov 11, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 11, 2025

Walkthrough

Adds a RoomInfoABACSection component, tests, Storybook story, and three English i18n entries to display a room's ABAC attributes in the Room Info contextual bar when ABAC and the "show attributes" setting are enabled.

Changes

Cohort / File(s) Summary
New ABAC component
apps/meteor/client/views/room/contextualBar/Info/RoomInfo/ABAC/RoomInfoABACSection.tsx
New default-exported React component that reads ABAC_Enabled and ABAC_ShowAttributesInRooms via useSetting and conditionally renders a "Room Attributes" panel showing room.abacAttributes as Tag elements; returns null when disabled or attributes are empty.
Component tests
apps/meteor/client/views/room/contextualBar/Info/RoomInfo/ABAC/RoomInfoABACSection.spec.tsx
New test suite covering conditional rendering (ABAC off, setting off, empty attrs), accessibility check (jest-axe), and snapshot for multiple attributes; uses mockAppRoot, createFakeRoom, and React Testing Library utilities.
RoomInfo integration
apps/meteor/client/views/room/contextualBar/Info/RoomInfo/RoomInfo.tsx
Imports and renders RoomInfoABACSection inside the Info panel section after the retention policy callout.
Storybook
apps/meteor/client/views/room/contextualBar/Info/RoomInfo/RoomInfo.stories.tsx
Adds an ABAC story with abacAttributes sample data and uses mockAppRoot / FakeRoomProvider to enable ABAC settings for the story.
Localization
packages/i18n/src/locales/en.i18n.json
Adds three English keys: ABAC_Managed, ABAC_Managed_description, and ABAC_Room_Attributes.

Sequence Diagram(s)

sequenceDiagram
    participant RoomInfo
    participant ABAC as RoomInfoABACSection
    participant Settings
    Note over Settings: reads UI settings (ABAC_Enabled, ABAC_ShowAttributesInRooms)
    RoomInfo->>ABAC: mount(room)
    ABAC->>Settings: get ABAC_Enabled
    alt ABAC disabled
        ABAC-->>RoomInfo: render null
    else ABAC enabled
        ABAC->>Settings: get ABAC_ShowAttributesInRooms
        alt show disabled
            ABAC-->>RoomInfo: render null
        else show enabled
            ABAC->>ABAC: inspect room.abacAttributes
            alt empty
                ABAC-->>RoomInfo: render null
            else non-empty
                ABAC-->>RoomInfo: render divider, label, description, and attribute Tag lists
            end
        end
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Pay attention to conditional guards around ABAC_Enabled and ABAC_ShowAttributesInRooms.
  • Verify i18n key lookups and copy in the component and stories.
  • Ensure tests correctly mock settings (mockAppRoot) and that jest-axe is configured properly.

Possibly related PRs

Suggested reviewers

  • tassoevan
  • aleksandernsilva

Poem

🐇
I hop through rooms and peek at every tag,
Little attributes snug in my bag.
A panel appears, tidy and bright,
Tests and stories keep everything right.
Hooray — ABAC attributes in sight.

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Linked Issues check ❓ Inconclusive The PR implements UI components for ABAC attributes but the linked issue requires an admin setting (ABAC_ShowAttributesInRooms) which is not present in the code changes. Clarify whether the admin setting ABAC_ShowAttributesInRooms is implemented elsewhere or if this requirement is pending; verify the setting is properly configured.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'chore: ABAC Attributes room info view' clearly describes the main change: adding ABAC attributes display to the room info view.
Out of Scope Changes check ✅ Passed All changes are scoped to implementing the UI components for ABAC room attributes display as intended by the PR objectives.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/abac-room-info

📜 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 de53087 and 0cb3df3.

📒 Files selected for processing (1)
  • packages/i18n/src/locales/en.i18n.json (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/i18n/src/locales/en.i18n.json
⏰ 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). (3)
  • GitHub Check: 📦 Build Packages
  • GitHub Check: CodeQL-Build
  • GitHub Check: CodeQL-Build

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.

@codecov
Copy link

codecov bot commented Nov 13, 2025

Codecov Report

❌ Patch coverage is 55.55556% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 68.98%. Comparing base (9063d56) to head (b56f763).
⚠️ Report is 1 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##           develop   #37484   +/-   ##
========================================
  Coverage    68.97%   68.98%           
========================================
  Files         3358     3359    +1     
  Lines       114215   114224    +9     
  Branches     20534    20535    +1     
========================================
+ Hits         78780    78793   +13     
+ Misses       33344    33340    -4     
  Partials      2091     2091           
Flag Coverage Δ
e2e 57.44% <55.55%> (+<0.01%) ⬆️
e2e-api 42.89% <ø> (+0.05%) ⬆️

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.

@MartinSchoeler MartinSchoeler marked this pull request as ready for review November 13, 2025 18:38
@MartinSchoeler MartinSchoeler requested a review from a team as a code owner November 13, 2025 18:39
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (4)
apps/meteor/client/views/room/contextualBar/Info/RoomInfo/RoomInfo.tsx (1)

132-133: Consider using optional chaining for safer null handling.

The condition room.abacAttributes !== undefined would evaluate to true if abacAttributes is null (since null !== undefined), then accessing null.length would throw a runtime error.

Apply this diff to use optional chaining:

 {/* @ts-expect-error - abacAttributes is not yet implemented in Rooms properties */}
-{room.abacAttributes !== undefined && room.abacAttributes.length > 0 && <RoomInfoABACSection room={room} />}
+{room.abacAttributes?.length > 0 && <RoomInfoABACSection room={room} />}

This also simplifies the condition while safely handling both undefined and null.

packages/i18n/src/locales/en.i18n.json (2)

80-82: Polish microcopy for clarity.

ABAC_Managed_description reads a bit awkwardly. Suggest concise phrasing that aligns with existing tone.

Apply this diff:

-  "ABAC_Managed_description": "Only compliant users have access to attribute-based access controlled rooms. Attributes determine room access.",
+  "ABAC_Managed_description": "Only compliant users can access rooms protected by attribute‑based access control. Attributes determine room access.",

80-82: Pre-add i18n for admin setting and empty state.

To meet the acceptance criteria and avoid hardcoded strings later, add keys for the ABAC “Show room attributes” setting and an empty-state message.

Apply this diff near the ABAC entries:

   "ABAC_Managed": "ABAC Managed",
   "ABAC_Managed_description": "Only compliant users can access rooms protected by attribute‑based access control. Attributes determine room access.",
   "ABAC_Room_Attributes": "Room Attributes",
+  "ABAC_ShowAttributesInRooms": "Show room attributes",
+  "ABAC_ShowAttributesInRooms_Description": "Display ABAC room attributes in the Room Info panel when ABAC is enabled.",
+  "ABAC_No_Room_Attributes": "No room attributes",
+  "ABAC_No_Room_Attributes_Hint": "This room has no ABAC attributes to display.",

This keeps UI copy ready when the setting and backend arrive and provides a graceful empty state.

apps/meteor/client/views/room/contextualBar/Info/RoomInfo/ABAC/RoomInfoABACSection.tsx (1)

29-59: LGTM! Clean and accessible rendering logic.

The rendering structure follows Fuselage and InfoPanel patterns well, with proper spacing and semantic markup. The use of attribute.name and value as React keys is appropriate, assuming attributes and their values are unique within the context.

Optional: Consider handling edge case of empty values array.

If an attribute could have an empty values array, the current implementation will render the attribute name without any value tags. If this is intentional (e.g., for placeholder attributes), the current behavior is fine. Otherwise, you might want to add a check:

 {room.abacAttributes.map((attribute) => (
-  <Box key={attribute.name} mb={16}>
+  attribute.values.length > 0 && <Box key={attribute.name} mb={16}>
     {attribute.name}

However, this is likely unnecessary if the data model guarantees attributes always have values.

📜 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 60a9587 and d738f36.

⛔ Files ignored due to path filters (1)
  • apps/meteor/client/views/room/contextualBar/Info/RoomInfo/ABAC/__snapshots__/RoomInfoABACSection.spec.tsx.snap is excluded by !**/*.snap
📒 Files selected for processing (5)
  • apps/meteor/client/views/room/contextualBar/Info/RoomInfo/ABAC/RoomInfoABACSection.spec.tsx (1 hunks)
  • apps/meteor/client/views/room/contextualBar/Info/RoomInfo/ABAC/RoomInfoABACSection.tsx (1 hunks)
  • apps/meteor/client/views/room/contextualBar/Info/RoomInfo/RoomInfo.stories.tsx (3 hunks)
  • apps/meteor/client/views/room/contextualBar/Info/RoomInfo/RoomInfo.tsx (2 hunks)
  • packages/i18n/src/locales/en.i18n.json (1 hunks)
🧰 Additional context used
🧠 Learnings (4)
📓 Common learnings
Learnt from: KevLehman
Repo: RocketChat/Rocket.Chat PR: 37303
File: apps/meteor/tests/end-to-end/api/abac.ts:1125-1137
Timestamp: 2025-10-27T14:38:46.994Z
Learning: In Rocket.Chat ABAC feature, when ABAC is disabled globally (ABAC_Enabled setting is false), room-level ABAC attributes are not evaluated when changing room types. This means converting a private room to public will succeed even if the room has ABAC attributes, as long as the global ABAC setting is disabled.
Learnt from: KevLehman
Repo: RocketChat/Rocket.Chat PR: 37299
File: apps/meteor/ee/server/lib/ldap/Manager.ts:438-454
Timestamp: 2025-10-24T17:32:05.348Z
Learning: In Rocket.Chat, ABAC attributes can only be set on private rooms and teams (type 'p'), not on public rooms (type 'c'). Therefore, when checking for ABAC-protected rooms/teams during LDAP sync or similar operations, it's sufficient to query only private rooms using methods like `findPrivateRoomsByIdsWithAbacAttributes`.
📚 Learning: 2025-10-30T19:30:46.541Z
Learnt from: MartinSchoeler
Repo: RocketChat/Rocket.Chat PR: 37244
File: apps/meteor/client/views/admin/ABAC/AdminABACRoomAttributesForm.spec.tsx:125-146
Timestamp: 2025-10-30T19:30:46.541Z
Learning: In the AdminABACRoomAttributesForm component (apps/meteor/client/views/admin/ABAC/AdminABACRoomAttributesForm.tsx), the first attribute value field is mandatory and does not have a Remove button. Only additional values beyond the first have Remove buttons. This means trashButtons[0] corresponds to the second value's Remove button, not the first value's.

Applied to files:

  • apps/meteor/client/views/room/contextualBar/Info/RoomInfo/RoomInfo.tsx
  • apps/meteor/client/views/room/contextualBar/Info/RoomInfo/ABAC/RoomInfoABACSection.tsx
📚 Learning: 2025-10-27T14:38:46.994Z
Learnt from: KevLehman
Repo: RocketChat/Rocket.Chat PR: 37303
File: apps/meteor/tests/end-to-end/api/abac.ts:1125-1137
Timestamp: 2025-10-27T14:38:46.994Z
Learning: In Rocket.Chat ABAC feature, when ABAC is disabled globally (ABAC_Enabled setting is false), room-level ABAC attributes are not evaluated when changing room types. This means converting a private room to public will succeed even if the room has ABAC attributes, as long as the global ABAC setting is disabled.

Applied to files:

  • apps/meteor/client/views/room/contextualBar/Info/RoomInfo/RoomInfo.tsx
  • apps/meteor/client/views/room/contextualBar/Info/RoomInfo/RoomInfo.stories.tsx
  • apps/meteor/client/views/room/contextualBar/Info/RoomInfo/ABAC/RoomInfoABACSection.tsx
  • packages/i18n/src/locales/en.i18n.json
  • apps/meteor/client/views/room/contextualBar/Info/RoomInfo/ABAC/RoomInfoABACSection.spec.tsx
📚 Learning: 2025-10-24T17:32:05.348Z
Learnt from: KevLehman
Repo: RocketChat/Rocket.Chat PR: 37299
File: apps/meteor/ee/server/lib/ldap/Manager.ts:438-454
Timestamp: 2025-10-24T17:32:05.348Z
Learning: In Rocket.Chat, ABAC attributes can only be set on private rooms and teams (type 'p'), not on public rooms (type 'c'). Therefore, when checking for ABAC-protected rooms/teams during LDAP sync or similar operations, it's sufficient to query only private rooms using methods like `findPrivateRoomsByIdsWithAbacAttributes`.

Applied to files:

  • apps/meteor/client/views/room/contextualBar/Info/RoomInfo/RoomInfo.tsx
  • apps/meteor/client/views/room/contextualBar/Info/RoomInfo/RoomInfo.stories.tsx
  • apps/meteor/client/views/room/contextualBar/Info/RoomInfo/ABAC/RoomInfoABACSection.tsx
🧬 Code graph analysis (2)
apps/meteor/client/views/room/contextualBar/Info/RoomInfo/ABAC/RoomInfoABACSection.tsx (2)
packages/core-typings/src/IRoom.ts (1)
  • IRoom (21-95)
packages/ui-contexts/src/index.ts (1)
  • useSetting (69-69)
apps/meteor/client/views/room/contextualBar/Info/RoomInfo/ABAC/RoomInfoABACSection.spec.tsx (3)
packages/core-typings/src/IRoom.ts (1)
  • IRoom (21-95)
apps/meteor/tests/mocks/data.ts (1)
  • createFakeRoom (46-61)
packages/mock-providers/src/index.ts (1)
  • mockAppRoot (3-3)
🔇 Additional comments (10)
apps/meteor/client/views/room/contextualBar/Info/RoomInfo/RoomInfo.tsx (1)

32-32: LGTM!

The import path is correct and the component is properly integrated into the render logic below.

apps/meteor/client/views/room/contextualBar/Info/RoomInfo/RoomInfo.stories.tsx (2)

5-5: LGTM!

The decorator refactoring properly wraps all stories with FakeRoomProvider, ensuring room context is available. This is a clean pattern that supports the new ABAC story and maintains consistency across all story variants.

Also applies to: 14-20


71-84: LGTM!

The ABAC story is well-structured and provides realistic sample data. The abacAttributes structure (array of objects with name and values properties) demonstrates various scenarios, including attributes with multiple values. The story will effectively showcase the new ABAC UI component.

apps/meteor/client/views/room/contextualBar/Info/RoomInfo/ABAC/RoomInfoABACSection.spec.tsx (4)

1-14: LGTM! Clean test setup.

The imports and type definitions are well-organized and appropriate for the test suite. The RoomWithABAC type correctly extends IRoom with the abacAttributes structure that matches the component's requirements.


16-24: LGTM! Reusable test helper.

The createRoomWithABAC helper is clean and promotes DRY principles across the test suite.


25-55: LGTM! Comprehensive conditional rendering coverage.

The test suite thoroughly validates all conditional rendering paths, ensuring the component correctly responds to ABAC settings and attribute presence. Good use of the shared appRootWithABACEnabled setup to reduce duplication.


57-78: LGTM! Excellent test coverage with accessibility validation.

Great to see accessibility testing with jest-axe alongside snapshot testing. This ensures the component is both accessible and visually consistent.

apps/meteor/client/views/room/contextualBar/Info/RoomInfo/ABAC/RoomInfoABACSection.tsx (3)

1-8: LGTM! Clean imports.

All imports are necessary and properly organized for the component's functionality.


9-17: Type definition is clear and well-documented.

The TODO comment appropriately documents that this is a temporary type extension until abacAttributes is added to the IRoom interface. This aligns with the PR's preparatory nature.

Based on learnings


19-27: LGTM! Correct conditional rendering logic.

The component properly validates all required conditions before rendering, with a clean early-return pattern. The logic correctly aligns with the test coverage.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

♻️ Duplicate comments (2)
apps/meteor/client/views/room/contextualBar/Info/RoomInfo/ABAC/RoomInfoABACSection.tsx (2)

33-40: Design choice: Tag component for section header.

The Tag component is used here as a visual badge to indicate "ABAC Managed" status, which provides visual prominence. A previous reviewer questioned whether using a Tag for the section header might be confusing when the section body also contains Tags for attribute values. Consider whether a different visual treatment (e.g., bold text with icon) might provide clearer hierarchy.


44-60: Consider semantic HTML for better accessibility.

While the current implementation includes ARIA labels (aria-labelledby), using semantic HTML elements (<ul> and <li>) would improve accessibility for screen readers. A previous reviewer suggested this approach and offered to help with the implementation.

Example structure using semantic elements:

<InfoPanelLabel id='room-attributes-list-label'>{t('ABAC_Room_Attributes')}</InfoPanelLabel>
<Box is='ul' aria-labelledby='room-attributes-list-label' style={{ listStyle: 'none', padding: 0 }}>
  {room.abacAttributes.map((attribute) => (
    <Box is='li' key={attribute.name} mb={16}>
      <Box is='span' id={`room-attribute-${attribute.name}-label`}>
        {attribute.name}
      </Box>
      <Box is='ul' display='flex' mbs={8} alignItems='center' aria-labelledby={`room-attribute-${attribute.name}-label`} style={{ listStyle: 'none', padding: 0 }}>
        {attribute.values.map((value) => (
          <Box is='li' mie={4} key={value}>
            <Tag medium>{value}</Tag>
          </Box>
        ))}
      </Box>
    </Box>
  ))}
</Box>
🧹 Nitpick comments (2)
apps/meteor/client/views/room/contextualBar/Info/RoomInfo/RoomInfo.stories.tsx (1)

74-81: Consider removing the duplicate FakeRoomProvider decorator.

The ABAC story redefines the FakeRoomProvider decorator (lines 76-80) which already exists in the default decorators (lines 15-21). In Storybook, story-level decorators are applied before component-level decorators, so both will run. The duplicate wrapper is redundant—only the mockAppRoot decorator (line 75) is needed for the ABAC story.

Consider simplifying to:

 ABAC.decorators = [
 	mockAppRoot().withSetting('ABAC_Enabled', true).withSetting('ABAC_ShowAttributesInRooms', true).buildStoryDecorator(),
-	(fn) => (
-		<FakeRoomProvider roomOverrides={roomArgs}>
-			<Contextualbar height='100vh'>{fn()}</Contextualbar>
-		</FakeRoomProvider>
-	),
 ];
apps/meteor/client/views/room/contextualBar/Info/RoomInfo/ABAC/RoomInfoABACSection.tsx (1)

19-27: LGTM! Component initialization and guards are correct.

The component properly checks ABAC settings and attribute presence before rendering.

Optional: Line 25 could be slightly more concise:

-if (!abacEnabled || !showAttributesInRoom || room.abacAttributes?.length === 0) {
+if (!abacEnabled || !showAttributesInRoom || !room.abacAttributes?.length) {
📜 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 d738f36 and 7ef6305.

⛔ Files ignored due to path filters (1)
  • apps/meteor/client/views/room/contextualBar/Info/RoomInfo/ABAC/__snapshots__/RoomInfoABACSection.spec.tsx.snap is excluded by !**/*.snap
📒 Files selected for processing (3)
  • apps/meteor/client/views/room/contextualBar/Info/RoomInfo/ABAC/RoomInfoABACSection.tsx (1 hunks)
  • apps/meteor/client/views/room/contextualBar/Info/RoomInfo/RoomInfo.stories.tsx (3 hunks)
  • apps/meteor/client/views/room/contextualBar/Info/RoomInfo/RoomInfo.tsx (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/meteor/client/views/room/contextualBar/Info/RoomInfo/RoomInfo.tsx
🧰 Additional context used
🧠 Learnings (5)
📓 Common learnings
Learnt from: KevLehman
Repo: RocketChat/Rocket.Chat PR: 37303
File: apps/meteor/tests/end-to-end/api/abac.ts:1125-1137
Timestamp: 2025-10-27T14:38:46.994Z
Learning: In Rocket.Chat ABAC feature, when ABAC is disabled globally (ABAC_Enabled setting is false), room-level ABAC attributes are not evaluated when changing room types. This means converting a private room to public will succeed even if the room has ABAC attributes, as long as the global ABAC setting is disabled.
Learnt from: KevLehman
Repo: RocketChat/Rocket.Chat PR: 37299
File: apps/meteor/ee/server/lib/ldap/Manager.ts:438-454
Timestamp: 2025-10-24T17:32:05.348Z
Learning: In Rocket.Chat, ABAC attributes can only be set on private rooms and teams (type 'p'), not on public rooms (type 'c'). Therefore, when checking for ABAC-protected rooms/teams during LDAP sync or similar operations, it's sufficient to query only private rooms using methods like `findPrivateRoomsByIdsWithAbacAttributes`.
📚 Learning: 2025-10-27T14:38:46.994Z
Learnt from: KevLehman
Repo: RocketChat/Rocket.Chat PR: 37303
File: apps/meteor/tests/end-to-end/api/abac.ts:1125-1137
Timestamp: 2025-10-27T14:38:46.994Z
Learning: In Rocket.Chat ABAC feature, when ABAC is disabled globally (ABAC_Enabled setting is false), room-level ABAC attributes are not evaluated when changing room types. This means converting a private room to public will succeed even if the room has ABAC attributes, as long as the global ABAC setting is disabled.

Applied to files:

  • apps/meteor/client/views/room/contextualBar/Info/RoomInfo/ABAC/RoomInfoABACSection.tsx
  • apps/meteor/client/views/room/contextualBar/Info/RoomInfo/RoomInfo.stories.tsx
📚 Learning: 2025-10-30T19:30:46.541Z
Learnt from: MartinSchoeler
Repo: RocketChat/Rocket.Chat PR: 37244
File: apps/meteor/client/views/admin/ABAC/AdminABACRoomAttributesForm.spec.tsx:125-146
Timestamp: 2025-10-30T19:30:46.541Z
Learning: In the AdminABACRoomAttributesForm component (apps/meteor/client/views/admin/ABAC/AdminABACRoomAttributesForm.tsx), the first attribute value field is mandatory and does not have a Remove button. Only additional values beyond the first have Remove buttons. This means trashButtons[0] corresponds to the second value's Remove button, not the first value's.

Applied to files:

  • apps/meteor/client/views/room/contextualBar/Info/RoomInfo/ABAC/RoomInfoABACSection.tsx
📚 Learning: 2025-09-23T19:22:59.217Z
Learnt from: dougfabris
Repo: RocketChat/Rocket.Chat PR: 36987
File: apps/meteor/tests/e2e/page-objects/fragments/room-toolbar.ts:10-20
Timestamp: 2025-09-23T19:22:59.217Z
Learning: In Playwright e2e tests, prefer stable selectors like data-qa-id attributes over localized text in getByRole() or getByText() calls to prevent test failures when UI language changes. Test translations separately by validating actual text content after ensuring UI interactions work with stable selectors.

Applied to files:

  • apps/meteor/client/views/room/contextualBar/Info/RoomInfo/ABAC/RoomInfoABACSection.tsx
📚 Learning: 2025-10-24T17:32:05.348Z
Learnt from: KevLehman
Repo: RocketChat/Rocket.Chat PR: 37299
File: apps/meteor/ee/server/lib/ldap/Manager.ts:438-454
Timestamp: 2025-10-24T17:32:05.348Z
Learning: In Rocket.Chat, ABAC attributes can only be set on private rooms and teams (type 'p'), not on public rooms (type 'c'). Therefore, when checking for ABAC-protected rooms/teams during LDAP sync or similar operations, it's sufficient to query only private rooms using methods like `findPrivateRoomsByIdsWithAbacAttributes`.

Applied to files:

  • apps/meteor/client/views/room/contextualBar/Info/RoomInfo/ABAC/RoomInfoABACSection.tsx
  • apps/meteor/client/views/room/contextualBar/Info/RoomInfo/RoomInfo.stories.tsx
🧬 Code graph analysis (2)
apps/meteor/client/views/room/contextualBar/Info/RoomInfo/ABAC/RoomInfoABACSection.tsx (2)
packages/core-typings/src/IRoom.ts (1)
  • IRoom (21-95)
packages/ui-contexts/src/index.ts (1)
  • useSetting (69-69)
apps/meteor/client/views/room/contextualBar/Info/RoomInfo/RoomInfo.stories.tsx (1)
packages/mock-providers/src/index.ts (1)
  • mockAppRoot (3-3)
⏰ 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). (3)
  • GitHub Check: 📦 Build Packages
  • GitHub Check: CodeQL-Build
  • GitHub Check: CodeQL-Build
🔇 Additional comments (5)
apps/meteor/client/views/room/contextualBar/Info/RoomInfo/RoomInfo.stories.tsx (3)

2-2: LGTM! Imports support the ABAC story.

The mockAppRoot and FakeRoomProvider imports are correctly used to provide the necessary context for testing ABAC functionality in Storybook.

Also applies to: 6-6


15-21: LGTM! Default decorator provides room context.

The FakeRoomProvider wrapper correctly supplies room context to all stories, enabling the RoomInfo component to access room data.


82-93: LGTM! ABAC story args are well-structured.

The ABAC story correctly includes sample abacAttributes data for testing the UI. The @ts-expect-error comment appropriately documents that this is preparatory work before the attribute schema is formally added to the Room type.

apps/meteor/client/views/room/contextualBar/Info/RoomInfo/ABAC/RoomInfoABACSection.tsx (2)

1-7: LGTM! Imports are appropriate.

All necessary types, UI components, and hooks are correctly imported for the ABAC section functionality.


9-17: LGTM! Type definition aligns with preparatory nature of PR.

The temporary type union with abacAttributes is appropriately documented with a TODO comment, consistent with the PR's objective to add UI components before the backend implementation exists.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

📜 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 7ef6305 and be7a0b8.

⛔ Files ignored due to path filters (1)
  • apps/meteor/client/views/room/contextualBar/Info/RoomInfo/ABAC/__snapshots__/RoomInfoABACSection.spec.tsx.snap is excluded by !**/*.snap
📒 Files selected for processing (1)
  • apps/meteor/client/views/room/contextualBar/Info/RoomInfo/ABAC/RoomInfoABACSection.tsx (1 hunks)
🧰 Additional context used
🧠 Learnings (5)
📓 Common learnings
Learnt from: KevLehman
Repo: RocketChat/Rocket.Chat PR: 37303
File: apps/meteor/tests/end-to-end/api/abac.ts:1125-1137
Timestamp: 2025-10-27T14:38:46.994Z
Learning: In Rocket.Chat ABAC feature, when ABAC is disabled globally (ABAC_Enabled setting is false), room-level ABAC attributes are not evaluated when changing room types. This means converting a private room to public will succeed even if the room has ABAC attributes, as long as the global ABAC setting is disabled.
Learnt from: KevLehman
Repo: RocketChat/Rocket.Chat PR: 37299
File: apps/meteor/ee/server/lib/ldap/Manager.ts:438-454
Timestamp: 2025-10-24T17:32:05.348Z
Learning: In Rocket.Chat, ABAC attributes can only be set on private rooms and teams (type 'p'), not on public rooms (type 'c'). Therefore, when checking for ABAC-protected rooms/teams during LDAP sync or similar operations, it's sufficient to query only private rooms using methods like `findPrivateRoomsByIdsWithAbacAttributes`.
📚 Learning: 2025-10-27T14:38:46.994Z
Learnt from: KevLehman
Repo: RocketChat/Rocket.Chat PR: 37303
File: apps/meteor/tests/end-to-end/api/abac.ts:1125-1137
Timestamp: 2025-10-27T14:38:46.994Z
Learning: In Rocket.Chat ABAC feature, when ABAC is disabled globally (ABAC_Enabled setting is false), room-level ABAC attributes are not evaluated when changing room types. This means converting a private room to public will succeed even if the room has ABAC attributes, as long as the global ABAC setting is disabled.

Applied to files:

  • apps/meteor/client/views/room/contextualBar/Info/RoomInfo/ABAC/RoomInfoABACSection.tsx
📚 Learning: 2025-10-30T19:30:46.541Z
Learnt from: MartinSchoeler
Repo: RocketChat/Rocket.Chat PR: 37244
File: apps/meteor/client/views/admin/ABAC/AdminABACRoomAttributesForm.spec.tsx:125-146
Timestamp: 2025-10-30T19:30:46.541Z
Learning: In the AdminABACRoomAttributesForm component (apps/meteor/client/views/admin/ABAC/AdminABACRoomAttributesForm.tsx), the first attribute value field is mandatory and does not have a Remove button. Only additional values beyond the first have Remove buttons. This means trashButtons[0] corresponds to the second value's Remove button, not the first value's.

Applied to files:

  • apps/meteor/client/views/room/contextualBar/Info/RoomInfo/ABAC/RoomInfoABACSection.tsx
📚 Learning: 2025-09-23T19:22:59.217Z
Learnt from: dougfabris
Repo: RocketChat/Rocket.Chat PR: 36987
File: apps/meteor/tests/e2e/page-objects/fragments/room-toolbar.ts:10-20
Timestamp: 2025-09-23T19:22:59.217Z
Learning: In Playwright e2e tests, prefer stable selectors like data-qa-id attributes over localized text in getByRole() or getByText() calls to prevent test failures when UI language changes. Test translations separately by validating actual text content after ensuring UI interactions work with stable selectors.

Applied to files:

  • apps/meteor/client/views/room/contextualBar/Info/RoomInfo/ABAC/RoomInfoABACSection.tsx
📚 Learning: 2025-10-24T17:32:05.348Z
Learnt from: KevLehman
Repo: RocketChat/Rocket.Chat PR: 37299
File: apps/meteor/ee/server/lib/ldap/Manager.ts:438-454
Timestamp: 2025-10-24T17:32:05.348Z
Learning: In Rocket.Chat, ABAC attributes can only be set on private rooms and teams (type 'p'), not on public rooms (type 'c'). Therefore, when checking for ABAC-protected rooms/teams during LDAP sync or similar operations, it's sufficient to query only private rooms using methods like `findPrivateRoomsByIdsWithAbacAttributes`.

Applied to files:

  • apps/meteor/client/views/room/contextualBar/Info/RoomInfo/ABAC/RoomInfoABACSection.tsx
🧬 Code graph analysis (1)
apps/meteor/client/views/room/contextualBar/Info/RoomInfo/ABAC/RoomInfoABACSection.tsx (1)
packages/core-typings/src/IRoom.ts (1)
  • IRoom (21-95)
⏰ 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). (1)
  • GitHub Check: CodeQL-Build
🔇 Additional comments (2)
apps/meteor/client/views/room/contextualBar/Info/RoomInfo/ABAC/RoomInfoABACSection.tsx (2)

44-60: Well-structured accessibility implementation.

The semantic HTML structure with proper ARIA labeling addresses the accessibility concerns raised in previous reviews. The lists are correctly associated with their labels using aria-labelledby, enabling better screen reader navigation.

Note: Ensure the null check on line 25 is fixed to prevent reaching line 46 when abacAttributes is undefined.


4-4: No changes needed—this is the standard translation pattern in the codebase.

The import of useTranslation from 'react-i18next' is consistent with established conventions. Verification confirms this pattern is used throughout apps/meteor/client/views/, including multiple files in the same contextualBar directory (UserInfoWithData.tsx, ReportUserModal.tsx, OTR.tsx, etc.). This is the standard approach; no deviation exists.

Likely an incorrect or invalid review comment.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 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 be7a0b8 and 41cbd35.

📒 Files selected for processing (1)
  • apps/meteor/client/views/room/contextualBar/Info/RoomInfo/ABAC/RoomInfoABACSection.tsx (1 hunks)
🧰 Additional context used
🧠 Learnings (6)
📓 Common learnings
Learnt from: KevLehman
Repo: RocketChat/Rocket.Chat PR: 37303
File: apps/meteor/tests/end-to-end/api/abac.ts:1125-1137
Timestamp: 2025-10-27T14:38:46.994Z
Learning: In Rocket.Chat ABAC feature, when ABAC is disabled globally (ABAC_Enabled setting is false), room-level ABAC attributes are not evaluated when changing room types. This means converting a private room to public will succeed even if the room has ABAC attributes, as long as the global ABAC setting is disabled.
Learnt from: KevLehman
Repo: RocketChat/Rocket.Chat PR: 37299
File: apps/meteor/ee/server/lib/ldap/Manager.ts:438-454
Timestamp: 2025-10-24T17:32:05.348Z
Learning: In Rocket.Chat, ABAC attributes can only be set on private rooms and teams (type 'p'), not on public rooms (type 'c'). Therefore, when checking for ABAC-protected rooms/teams during LDAP sync or similar operations, it's sufficient to query only private rooms using methods like `findPrivateRoomsByIdsWithAbacAttributes`.
📚 Learning: 2025-10-27T14:38:46.994Z
Learnt from: KevLehman
Repo: RocketChat/Rocket.Chat PR: 37303
File: apps/meteor/tests/end-to-end/api/abac.ts:1125-1137
Timestamp: 2025-10-27T14:38:46.994Z
Learning: In Rocket.Chat ABAC feature, when ABAC is disabled globally (ABAC_Enabled setting is false), room-level ABAC attributes are not evaluated when changing room types. This means converting a private room to public will succeed even if the room has ABAC attributes, as long as the global ABAC setting is disabled.

Applied to files:

  • apps/meteor/client/views/room/contextualBar/Info/RoomInfo/ABAC/RoomInfoABACSection.tsx
📚 Learning: 2025-10-30T19:30:46.541Z
Learnt from: MartinSchoeler
Repo: RocketChat/Rocket.Chat PR: 37244
File: apps/meteor/client/views/admin/ABAC/AdminABACRoomAttributesForm.spec.tsx:125-146
Timestamp: 2025-10-30T19:30:46.541Z
Learning: In the AdminABACRoomAttributesForm component (apps/meteor/client/views/admin/ABAC/AdminABACRoomAttributesForm.tsx), the first attribute value field is mandatory and does not have a Remove button. Only additional values beyond the first have Remove buttons. This means trashButtons[0] corresponds to the second value's Remove button, not the first value's.

Applied to files:

  • apps/meteor/client/views/room/contextualBar/Info/RoomInfo/ABAC/RoomInfoABACSection.tsx
📚 Learning: 2025-09-23T19:22:59.217Z
Learnt from: dougfabris
Repo: RocketChat/Rocket.Chat PR: 36987
File: apps/meteor/tests/e2e/page-objects/fragments/room-toolbar.ts:10-20
Timestamp: 2025-09-23T19:22:59.217Z
Learning: In Playwright e2e tests, prefer stable selectors like data-qa-id attributes over localized text in getByRole() or getByText() calls to prevent test failures when UI language changes. Test translations separately by validating actual text content after ensuring UI interactions work with stable selectors.

Applied to files:

  • apps/meteor/client/views/room/contextualBar/Info/RoomInfo/ABAC/RoomInfoABACSection.tsx
📚 Learning: 2025-10-24T17:32:05.348Z
Learnt from: KevLehman
Repo: RocketChat/Rocket.Chat PR: 37299
File: apps/meteor/ee/server/lib/ldap/Manager.ts:438-454
Timestamp: 2025-10-24T17:32:05.348Z
Learning: In Rocket.Chat, ABAC attributes can only be set on private rooms and teams (type 'p'), not on public rooms (type 'c'). Therefore, when checking for ABAC-protected rooms/teams during LDAP sync or similar operations, it's sufficient to query only private rooms using methods like `findPrivateRoomsByIdsWithAbacAttributes`.

Applied to files:

  • apps/meteor/client/views/room/contextualBar/Info/RoomInfo/ABAC/RoomInfoABACSection.tsx
📚 Learning: 2025-09-25T09:59:26.461Z
Learnt from: Dnouv
Repo: RocketChat/Rocket.Chat PR: 37057
File: packages/apps-engine/src/definition/accessors/IUserRead.ts:23-27
Timestamp: 2025-09-25T09:59:26.461Z
Learning: UserBridge.doGetUserRoomIds in packages/apps-engine/src/server/bridges/UserBridge.ts has a bug where it implicitly returns undefined when the app lacks read permission (missing return statement in the else case of the permission check).

Applied to files:

  • apps/meteor/client/views/room/contextualBar/Info/RoomInfo/ABAC/RoomInfoABACSection.tsx
🧬 Code graph analysis (1)
apps/meteor/client/views/room/contextualBar/Info/RoomInfo/ABAC/RoomInfoABACSection.tsx (2)
packages/core-typings/src/IRoom.ts (1)
  • IRoom (21-95)
packages/ui-contexts/src/index.ts (1)
  • useSetting (69-69)
⏰ 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). (3)
  • GitHub Check: 📦 Build Packages
  • GitHub Check: CodeQL-Build
  • GitHub Check: CodeQL-Build
🔇 Additional comments (3)
apps/meteor/client/views/room/contextualBar/Info/RoomInfo/ABAC/RoomInfoABACSection.tsx (3)

1-17: LGTM! Type definition correctly addresses previous feedback.

The type definition properly declares abacAttributes as optional, which aligns with the component's runtime checks and addresses the previous review feedback.


33-40: Tag usage pattern is intentional but consider visual distinction.

The component uses a Tag for the "ABAC_Managed" header/badge and also uses Tag components for attribute values. While this might initially seem confusing (as noted in a previous review), the usage serves different semantic purposes:

  • Header Tag: Indicates the room is ABAC-managed (badge/indicator)
  • Value Tags: Display individual attribute values (pills/chips)

The implementation is clean and follows React best practices. If visual confusion becomes an issue in user testing, consider adding distinct styling or using a different component for the header.


19-27: Guard clause correctly handles all edge cases and the incomplete feature state.

Verification confirms that ABAC_Enabled and ABAC_ShowAttributesInRooms settings do not currently exist in the codebase—no server-side registration, no EE settings definitions. The component's guard clause !abacEnabled || !showAttributesInRoom || !room.abacAttributes?.length is properly defensive: when these settings are undefined (as they currently are), useSetting() returns undefined, which correctly triggers an early null return. The optional chaining ?.length and early return also protect the .map() call at line 46 from runtime errors.

The TODO comment at line 9 confirms ABAC is an incomplete feature, and the code is appropriately written to handle this state. No changes needed.

@aleksandernsilva aleksandernsilva added the stat: QA assured Means it has been tested and approved by a company insider label Nov 17, 2025
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Nov 17, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Nov 17, 2025

📦 Docker Image Size Report

📈 Changes

Service Current Baseline Change Percent
sum of all images 1.2GiB 1.2GiB +12MiB
rocketchat 367MiB 355MiB +12MiB
omnichannel-transcript-service 141MiB 141MiB -4.1KiB
queue-worker-service 141MiB 141MiB -925B
ddp-streamer-service 127MiB 127MiB -1.1KiB
account-service 114MiB 114MiB -2.2KiB
stream-hub-service 111MiB 111MiB -91B
authorization-service 111MiB 111MiB -697B
presence-service 111MiB 111MiB +356B

📊 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 13:47 (PR)"]
  y-axis "Size (GB)" 0 --> 0.5
  line "account-service" [0.11, 0.11, 0.11, 0.11, 0.11]
  line "authorization-service" [0.11, 0.11, 0.11, 0.11, 0.11]
  line "ddp-streamer-service" [0.12, 0.12, 0.12, 0.12, 0.12]
  line "omnichannel-transcript-service" [0.14, 0.14, 0.14, 0.14, 0.14]
  line "presence-service" [0.11, 0.11, 0.11, 0.11, 0.11]
  line "queue-worker-service" [0.14, 0.14, 0.14, 0.14, 0.14]
  line "rocketchat" [0.36, 0.36, 0.35, 0.35, 0.36]
  line "stream-hub-service" [0.11, 0.11, 0.11, 0.11, 0.11]
Loading

Statistics (last 4 days):

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

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

  • Tag: pr-37484
  • Baseline: develop
  • Timestamp: 2025-11-19 13:47:09 UTC
  • Historical data points: 4

Updated: Wed, 19 Nov 2025 13:47:10 GMT

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
apps/meteor/client/views/room/contextualBar/Info/RoomInfo/ABAC/RoomInfoABACSection.spec.tsx (1)

27-55: Add tests for undefined attributes and content verification.

The conditional rendering tests are solid, but consider these additions for more comprehensive coverage:

  1. Add a test for when abacAttributes is undefined (not just an empty array), to ensure the component handles both cases correctly.
  2. Add a test that verifies the actual attribute key-value pairs are rendered in the UI, not just the presence of the 'ABAC_Managed' heading.

Example test for verifying content:

it('should render attribute key-value pairs correctly', () => {
  const room = createRoomWithABAC([
    { key: 'Chat-sensitivity', values: ['Classified', 'Top-Secret'] },
    { key: 'Country', values: ['US-only'] },
  ]);
  render(<RoomInfoABACSection room={room} />, { wrapper: appRootWithABACEnabled });
  
  expect(screen.getByText('Chat-sensitivity')).toBeInTheDocument();
  expect(screen.getByText(/Classified.*Top-Secret/)).toBeInTheDocument();
  expect(screen.getByText('Country')).toBeInTheDocument();
  expect(screen.getByText('US-only')).toBeInTheDocument();
});
📜 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 222a52b and de53087.

📒 Files selected for processing (1)
  • apps/meteor/client/views/room/contextualBar/Info/RoomInfo/ABAC/RoomInfoABACSection.spec.tsx (1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: KevLehman
Repo: RocketChat/Rocket.Chat PR: 37303
File: apps/meteor/tests/end-to-end/api/abac.ts:1125-1137
Timestamp: 2025-10-27T14:38:46.994Z
Learning: In Rocket.Chat ABAC feature, when ABAC is disabled globally (ABAC_Enabled setting is false), room-level ABAC attributes are not evaluated when changing room types. This means converting a private room to public will succeed even if the room has ABAC attributes, as long as the global ABAC setting is disabled.
Learnt from: KevLehman
Repo: RocketChat/Rocket.Chat PR: 37299
File: apps/meteor/ee/server/lib/ldap/Manager.ts:438-454
Timestamp: 2025-10-24T17:32:05.348Z
Learning: In Rocket.Chat, ABAC attributes can only be set on private rooms and teams (type 'p'), not on public rooms (type 'c'). Therefore, when checking for ABAC-protected rooms/teams during LDAP sync or similar operations, it's sufficient to query only private rooms using methods like `findPrivateRoomsByIdsWithAbacAttributes`.
📚 Learning: 2025-10-27T14:38:46.994Z
Learnt from: KevLehman
Repo: RocketChat/Rocket.Chat PR: 37303
File: apps/meteor/tests/end-to-end/api/abac.ts:1125-1137
Timestamp: 2025-10-27T14:38:46.994Z
Learning: In Rocket.Chat ABAC feature, when ABAC is disabled globally (ABAC_Enabled setting is false), room-level ABAC attributes are not evaluated when changing room types. This means converting a private room to public will succeed even if the room has ABAC attributes, as long as the global ABAC setting is disabled.

Applied to files:

  • apps/meteor/client/views/room/contextualBar/Info/RoomInfo/ABAC/RoomInfoABACSection.spec.tsx
🧬 Code graph analysis (1)
apps/meteor/client/views/room/contextualBar/Info/RoomInfo/ABAC/RoomInfoABACSection.spec.tsx (3)
packages/core-typings/src/IRoom.ts (1)
  • IRoom (21-95)
apps/meteor/tests/mocks/data.ts (1)
  • createFakeRoom (46-61)
packages/mock-providers/src/index.ts (1)
  • mockAppRoot (3-3)
⏰ 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). (3)
  • GitHub Check: 📦 Build Packages
  • GitHub Check: CodeQL-Build
  • GitHub Check: CodeQL-Build
🔇 Additional comments (3)
apps/meteor/client/views/room/contextualBar/Info/RoomInfo/ABAC/RoomInfoABACSection.spec.tsx (3)

9-23: LGTM! Clean test setup.

The type definition and helper function are well-structured. The type assertion in the helper is appropriate for the test context.


57-68: Excellent accessibility coverage!

Great to see jest-axe being used to verify accessibility compliance. This helps ensure the ABAC attributes UI is accessible to all users.


69-78: Snapshot test looks good.

The snapshot test will help catch any unintended UI changes in the ABAC section.

@kodiakhq kodiakhq bot merged commit 4ecebe8 into develop Nov 19, 2025
74 of 76 checks passed
@kodiakhq kodiakhq bot deleted the chore/abac-room-info branch November 19, 2025 14: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.

4 participants