Skip to content

feat(recording): adds custom userdata recording permission - #21497

Merged
ramonlsouza merged 5 commits into
bigbluebutton:v3.0.x-releasefrom
germanocaumo:custom-record-permission
Oct 23, 2024
Merged

ramonlsouza merged 5 commits into
bigbluebutton:v3.0.x-releasefrom
germanocaumo:custom-record-permission

Conversation

@germanocaumo

Copy link
Copy Markdown
Contributor

What does this PR do?

Adds two new userdata parameters:

  • bbb_record_permission: if true, bypass the moderator/viewer role permission check and allows the user to start/stop the recording. Also, if set to false will deny the user to record even if he is a moderator
  • bbb_record_permission_tooltip: a string to show in the tooltip when the user don't have permission, useful to explain why the user can't start recording

Motivation

This enables integrations to have custom rules for specific users to have or not permission to record a meeting

How to test

Set userdata-bbb_record_permission and userdata-bbb_record_permission_tooltip in custom parameters before joining and see the effect in meeting.

For example. setting

userdata-bbb_record_permission=false
userdata-bbb_record_permission_tooltip=You have used all your recording quota

and joining as moderator, the user will not be enabled to record and the tooltip will show the message:
image

Adds two new userdata parameters:
 - bbb_record_permission: if true, bypass the moderator/viewer role permission and allows the user to start/stop the recording
 - bbb_record_permission_tooltip: a string to show in the tooltip when the user don't have permission, useful to explain why the user can't start recording

This enables integrations to have custom rules for specific users to have or not permission to record a meeting
@coderabbitai

coderabbitai Bot commented Oct 22, 2024 •

Copy link
Copy Markdown
Contributor

Walkthrough

The pull request introduces several modifications across multiple files related to recording management and user permissions in the BigBlueButton application. Key changes include the enhancement of permission validation logic in the SetRecordingStatusCmdMsgHdlr to allow for custom recording permissions based on user metadata. The meetingRecordingSetStatus.ts file removes the moderator check, enabling broader access to recording functionalities. The RecordingIndicator component is updated to utilize a new Service module for determining recording permissions and displaying tooltips. Additionally, a new service.tsx file is introduced, encapsulating functions for checking recording permissions and retrieving custom tooltips. The RecordingComponent is modified to render without requiring moderator status, while the RecordingContainer integrates new logic for handling recording policies. A new interface for recording policies is added in queries.ts. Lastly, the documentation for server customization is significantly updated to provide clearer instructions and new configuration options.

Possibly related PRs

Suggested reviewers

  • antobinary

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 2725a2c and 0631898.

📒 Files selected for processing (1)
  • docs/docs/administration/customize.md (1 hunks)
🧰 Additional context used
🔇 Additional comments (1)
docs/docs/administration/customize.md (1)

1403-1404: LGTM! Documentation for new recording permission parameters is clear and complete.

The new parameters are well-documented with:

  • Clear version information (BigBlueButton 3.0)
  • Detailed descriptions of functionality
  • Default values

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Outside diff range and nitpick comments (13)
bigbluebutton-html5/imports/ui/components/recording/queries.ts (1)

8-12: LGTM! Consider adding a property for the custom tooltip.

The new GetRecordingPoliciesResponse interface is well-structured and aligns with the PR objectives for custom recording permissions. However, it might be beneficial to include a property for the custom tooltip message (bbb_record_permission_tooltip) mentioned in the PR objectives.

Consider adding a property for the custom tooltip message:

 export interface GetRecordingPoliciesResponse {
   meeting_recordingPolicies: {
     allowStartStopRecording: boolean;
+    customTooltip?: string;
   }[]
 }
bigbluebutton-html5/imports/ui/components/nav-bar/nav-bar-graphql/recording-indicator/service.tsx (2)

3-10: LGTM: Function implements custom recording permissions as intended.

The mayIRecord function correctly implements the logic for custom recording permissions as described in the PR objectives. It properly checks the allowStartStopRecording flag, custom permissions, and moderator status in the correct order.

A minor suggestion for improvement:

Consider adding a type annotation for the return value of the function for better clarity:

const mayIRecord = (amIModerator: boolean, allowStartStopRecording: boolean): boolean => {
  // ... existing implementation ...
};

12-15: LGTM: Export includes necessary functions for recording permissions and tooltips.

The default export correctly includes the mayIRecord function and a getCustomRecordTooltip function, which aligns with the PR objectives.

A minor suggestion for improvement:

Consider adding type annotations for the exported object and the getCustomRecordTooltip function for better type safety:

export default {
  mayIRecord,
  getCustomRecordTooltip: (value: string): string => getFromUserSettings('bbb_record_permission_tooltip', value),
} as const;

This change adds a return type for getCustomRecordTooltip and uses as const to make the object properties readonly, which can help prevent accidental modifications.

bigbluebutton-html5/imports/ui/components/nav-bar/nav-bar-graphql/recording-indicator/component.tsx (2)

238-239: LGTM: Implemented custom recording tooltip

The introduction of customRecordTooltip using Service.getCustomRecordTooltip implements the custom tooltip feature described in the PR objectives. This allows for dynamic tooltip content based on user permissions.

Consider renaming defaultRecordTooltip to defaultRecordingTooltip for consistency with other variable names in the file.


255-262: LGTM: Updated tooltip rendering with custom content

The tooltip rendering logic has been correctly updated to use the new customRecordTooltip. This change ensures that the appropriate message is shown for both recording and non-recording states, and the aria-label is updated to match the tooltip content, improving accessibility.

Consider refactoring the repeated ternary operation into a single variable for improved readability:

+ const tooltipContent = recording
+   ? `${intl.formatMessage(intlMessages.notificationRecordingStart)}`
+   : customRecordTooltip;

  <Tooltip
-   title={recording
-     ? `${intl.formatMessage(intlMessages.notificationRecordingStart)}`
-     : customRecordTooltip}
+   title={tooltipContent}
  >
    <Styled.RecordingStatusViewOnly
-     aria-label={recording
-       ? `${intl.formatMessage(intlMessages.notificationRecordingStart)}`
-       : customRecordTooltip}
+     aria-label={tooltipContent}
      recording={recording}
    >
docs/docs/administration/customize.md (8)

Line range hint 16-18: Consider adding a brief introduction.

While the file jumps straight into the content, it might be helpful to add a brief introduction explaining the purpose of this document and what readers can expect to learn.

🧰 Tools
🪛 Markdownlint

1400-1400: Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe
Table pipe style

(MD055, table-pipe-style)


1400-1400: Expected: 3; Actual: 2; Too few cells, row will be missing data
Table column count

(MD056, table-column-count)


Line range hint 20-67: Emphasize best practices for configuration management.

The section provides valuable information about preserving configuration changes. Consider the following improvements:

  1. Add a note emphasizing the importance of documenting all custom changes made to the configuration.
  2. Highlight the recommendation for BigBlueButton 2.6 more prominently, perhaps in a callout box or with bold text.
  3. Provide an example of a well-structured apply-config.sh file to illustrate best practices.

These additions would help users better understand and implement proper configuration management.

🧰 Tools
🪛 Markdownlint

1400-1400: Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe
Table pipe style

(MD055, table-pipe-style)


1400-1400: Expected: 3; Actual: 2; Too few cells, row will be missing data
Table column count

(MD056, table-column-count)


Line range hint 69-71: Add a warning about potential impacts of changing recording retention.

In the "Delete raw data from published recordings" subsection, consider adding a warning about the potential impacts of changing the retention period. For example:

"Warning: Reducing the retention period may result in the permanent loss of raw recording data. Ensure you understand the implications before making changes."

This would help users make informed decisions about modifying these settings.

Also applies to: 73-89

🧰 Tools
🪛 Markdownlint

1400-1400: Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe
Table pipe style

(MD055, table-pipe-style)


1400-1400: Expected: 3; Actual: 2; Too few cells, row will be missing data
Table column count

(MD056, table-column-count)


Line range hint 280-307: Clarify the process for enabling iOS playback.

In the "Enable playback of recordings on iOS" subsection, the instructions are clear, but it might be helpful to add:

  1. An explanation of why this change is necessary (iOS limitations on video formats).
  2. A note about the increased processing time and storage requirements when generating both WebM and MP4 formats.
  3. Instructions on how to test the iOS playback after making the change.

These additions would provide users with a more complete understanding of the modification and its implications.

🧰 Tools
🪛 Markdownlint

1400-1400: Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe
Table pipe style

(MD055, table-pipe-style)


1400-1400: Expected: 3; Actual: 2; Too few cells, row will be missing data
Table column count

(MD056, table-column-count)


Line range hint 1036-1054: Provide more context for HTML5 client customization.

In the "Change favicon" subsection, consider adding:

  1. A brief explanation of what a favicon is and why someone might want to change it.
  2. An example of the recommended favicon size and format.
  3. A note about potential caching issues when changing the favicon and how to address them.

These additions would make the instructions more comprehensive and user-friendly.

🧰 Tools
🪛 Markdownlint

1400-1400: Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe
Table pipe style

(MD055, table-pipe-style)


1400-1400: Expected: 3; Actual: 2; Too few cells, row will be missing data
Table column count

(MD056, table-column-count)


Line range hint 1056-1082: Add examples for custom CSS modifications.

In the "Change title in the HTML5 client" subsection, it would be helpful to provide a few more examples of common CSS modifications users might want to make. For instance:

  1. Changing the color scheme of the interface.
  2. Modifying the size or appearance of specific UI elements.
  3. Adding custom branding elements.

These examples would give users a better starting point for their own customizations.

🧰 Tools
🪛 Markdownlint

1400-1400: Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe
Table pipe style

(MD055, table-pipe-style)


1400-1400: Expected: 3; Actual: 2; Too few cells, row will be missing data
Table column count

(MD056, table-column-count)


Line range hint 1387-1407: Add security best practices for shared secret management.

In the "Change the shared secret" subsection, consider adding the following security recommendations:

  1. Use a cryptographically secure random number generator for creating the new secret, rather than relying on online UUID generators.
  2. Emphasize the importance of keeping the shared secret confidential and not sharing it in unsecured communications.
  3. Recommend periodically rotating the shared secret as a security best practice.

These additions would help users implement more secure practices when managing the shared secret.

🧰 Tools
🪛 Markdownlint

1400-1400: Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe
Table pipe style

(MD055, table-pipe-style)


1400-1400: Expected: 3; Actual: 2; Too few cells, row will be missing data
Table column count

(MD056, table-column-count)


Line range hint 1409-1421: Provide more information about webhooks security.

In the "Install callback for events (webhooks)" subsection, consider adding:

  1. A brief explanation of the security implications of using webhooks.
  2. Recommendations for securing the webhook endpoints, such as using HTTPS and implementing authentication.
  3. A note about monitoring and rate limiting webhook requests to prevent potential abuse.

These additions would help users understand and mitigate potential security risks when using webhooks.

🧰 Tools
🪛 Markdownlint

1400-1400: Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe
Table pipe style

(MD055, table-pipe-style)


1400-1400: Expected: 3; Actual: 2; Too few cells, row will be missing data
Table column count

(MD056, table-column-count)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 5788731 and 06f6851.

📒 Files selected for processing (8)
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/users/SetRecordingStatusCmdMsgHdlr.scala (2 hunks)
  • bbb-graphql-actions/src/actions/meetingRecordingSetStatus.ts (1 hunks)
  • bigbluebutton-html5/imports/ui/components/nav-bar/nav-bar-graphql/recording-indicator/component.tsx (4 hunks)
  • bigbluebutton-html5/imports/ui/components/nav-bar/nav-bar-graphql/recording-indicator/service.tsx (1 hunks)
  • bigbluebutton-html5/imports/ui/components/recording/component.tsx (0 hunks)
  • bigbluebutton-html5/imports/ui/components/recording/container.tsx (3 hunks)
  • bigbluebutton-html5/imports/ui/components/recording/queries.ts (1 hunks)
  • docs/docs/administration/customize.md (1 hunks)
💤 Files with no reviewable changes (1)
  • bigbluebutton-html5/imports/ui/components/recording/component.tsx
🧰 Additional context used
🔇 Additional comments (18)
bigbluebutton-html5/imports/ui/components/recording/queries.ts (1)

8-12: Verify the usage of the new interface across the codebase.

The introduction of GetRecordingPoliciesResponse interface suggests a shift towards more granular control over recording permissions. Ensure that all relevant components and services are updated to use this new interface correctly.

Run the following script to check the usage of the new interface:

✅ Verification successful

Usage of GetRecordingPoliciesResponse is properly implemented throughout the codebase.
All relevant components and services have been updated to utilize the new interface correctly.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check the usage of GetRecordingPoliciesResponse interface

# Test 1: Find all occurrences of GetRecordingPoliciesResponse
echo "Occurrences of GetRecordingPoliciesResponse:"
rg -n "GetRecordingPoliciesResponse"

# Test 2: Check for potential places where the interface should be used
echo "\nPotential places where GetRecordingPoliciesResponse should be used:"
rg -n "recording.*(policies|permissions)"

Length of output: 918

bigbluebutton-html5/imports/ui/components/nav-bar/nav-bar-graphql/recording-indicator/service.tsx (2)

1-1: LGTM: Import statement is correct and necessary.

The import of getFromUserSettings is properly done and is used in the code.


1-15: Overall assessment: Well-implemented custom recording permissions and tooltip functionality.

This new file successfully implements the custom recording permissions and tooltip functionality as described in the PR objectives. The code is well-structured, follows TypeScript conventions, and efficiently handles the new requirements.

Key points:

  1. The mayIRecord function correctly implements the logic for determining recording permissions based on moderator status, global settings, and custom user settings.
  2. The getCustomRecordTooltip function provides a way to retrieve custom tooltips as required.
  3. The implementation is concise and easy to understand.

Minor suggestions for improvement have been made regarding type annotations, but these are not critical issues. Overall, the implementation looks good and ready for integration.

bbb-graphql-actions/src/actions/meetingRecordingSetStatus.ts (2)

6-8: LGTM: Improved formatting for input validation.

The formatting changes in the input validation array enhance code readability while maintaining the same functionality.


1-5: Verify the impact of removing the moderator check.

The removal of throwErrorIfNotModerator(sessionVariables); aligns with the PR objective of introducing custom recording permissions. This change allows for more flexible permission handling based on the new bbb_record_permission parameter.

However, please ensure that:

  1. The permission check is properly implemented in the SetRecordingStatusCmdMsgHdlr as mentioned in the PR summary.
  2. There are no security implications from removing this check at this level.

To verify the implementation of the new permission check, please run the following script:

This will help confirm that the new permission logic is correctly implemented in the Scala handler.

✅ Verification successful

Removal of the moderator check verified.

The bbb_record_permission is properly implemented in SetRecordingStatusCmdMsgHdlr.scala, ensuring that permission checks are enforced with the new custom recording permissions. No security implications were identified from removing the moderator check at this level.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the implementation of the new permission check in SetRecordingStatusCmdMsgHdlr

# Test: Search for the implementation of the new permission check
rg -A 10 "bbb_record_permission" --type scala

Length of output: 1612

bigbluebutton-html5/imports/ui/components/nav-bar/nav-bar-graphql/recording-indicator/component.tsx (3)

31-31: LGTM: New Service module import added

The addition of the Service import aligns with the PR objectives to introduce custom userdata recording permissions. This module likely encapsulates the new logic for permission checks and tooltip retrieval.


Line range hint 1-430: Overall assessment: Changes successfully implement PR objectives

The modifications to the RecordingIndicator component successfully implement the custom userdata recording permissions and tooltips as described in the PR objectives. The code is well-structured, follows React best practices, and improves the flexibility of recording permissions and user feedback.

Key improvements:

  1. Introduction of Service.mayIRecord for custom permission checks.
  2. Implementation of Service.getCustomRecordTooltip for dynamic tooltip content.
  3. Updated rendering logic to utilize the new custom permissions and tooltips.

These changes enhance the recording functionality by allowing for more granular control over user permissions and providing clearer feedback to users about their recording capabilities.


237-237: LGTM: Implemented custom recording permission check

The use of Service.mayIRecord implements the new custom permission logic as described in the PR objectives. This change allows for more flexible permission handling based on user metadata.

Consider adding error handling for the mayIRecord function call. You can verify its implementation with:

docs/docs/administration/customize.md (2)

Line range hint 1-14: LGTM: File structure and metadata look good.

The file starts with appropriate metadata for a documentation page, including id, slug, title, and keywords. This helps with proper organization and searchability of the documentation.

🧰 Tools
🪛 Markdownlint

1400-1400: Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe
Table pipe style

(MD055, table-pipe-style)


1400-1400: Expected: 3; Actual: 2; Too few cells, row will be missing data
Table column count

(MD056, table-column-count)


Line range hint 1-1421: Excellent comprehensive guide for BigBlueButton customization.

This document provides a wealth of information on customizing various aspects of BigBlueButton. It covers a wide range of topics, from basic configuration changes to advanced customizations of the HTML5 client. The step-by-step instructions and code examples are particularly helpful.

Some suggestions for further improvement:

  1. Consider adding a table of contents at the beginning for easier navigation.
  2. Standardize the format of warning messages and best practice recommendations throughout the document.
  3. Include version information where specific features or configurations are version-dependent.

Overall, this is an invaluable resource for BigBlueButton administrators and developers looking to tailor their installations.

🧰 Tools
🪛 Markdownlint

1400-1400: Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe
Table pipe style

(MD055, table-pipe-style)


1400-1400: Expected: 3; Actual: 2; Too few cells, row will be missing data
Table column count

(MD056, table-column-count)

bigbluebutton-html5/imports/ui/components/recording/container.tsx (5)

5-5: Import statement is correct and consistent.

The addition of GetRecordingPoliciesResponse from ./queries is appropriate and follows existing import patterns.


8-9: New imports are appropriate and correctly used.

The inclusion of GET_MEETING_RECORDING_DATA, GET_MEETING_RECORDING_POLICIES, and Service imports is correct and necessary for the component's functionality.


28-30: Subscription to recording policies is correctly implemented.

The useDeduplicatedSubscription hook is properly used to subscribe to GET_MEETING_RECORDING_POLICIES, ensuring that recording policies are fetched efficiently.


34-34: Recording policy is correctly extracted with safety checks.

The allowStartStopRecording variable is safely retrieved using optional chaining and a default value, preventing potential errors if the data is undefined.


45-48: Permission check correctly implemented to conditionally render the component.

The component will not render if the user does not have recording permissions (!mayIRecord), which aligns with the intended functionality and enhances security.

akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/users/SetRecordingStatusCmdMsgHdlr.scala (3)

12-12: Appropriate import for Users2x model

The import of Users2x is necessary for accessing user metadata and implementing custom recording permissions.


38-42: Permission logic correctly integrates custom recording permissions

The hasPermission variable effectively incorporates the custom recording permissions, defaulting to the standard permission checks when not specified by user metadata.


45-45: Updated error message provides clearer context

The revised error message "No permission to set recording status in meeting." clearly communicates the reason for permission denial when a user lacks the necessary permissions.

Comment on lines +34 to +35
val customRecordPermission: Option[Boolean] = Users2x.findWithIntId(liveMeeting.users2x, msg.header.userId).flatMap { user =>
user.userMetadata.get("bbb_record_permission").map(_.toBoolean)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Handle potential exceptions when converting user metadata to Boolean

Using .toBoolean can throw an exception if the metadata value is not exactly "true" or "false". To prevent runtime exceptions, consider using a safer conversion method that handles invalid or unexpected values gracefully.

Apply this diff to handle invalid Boolean values:

 val customRecordPermission: Option[Boolean] = Users2x.findWithIntId(liveMeeting.users2x, msg.header.userId).flatMap { user =>
-    user.userMetadata.get("bbb_record_permission").map(_.toBoolean)
+    user.userMetadata.get("bbb_record_permission").map {
+      case value if value.equalsIgnoreCase("true") => true
+      case value if value.equalsIgnoreCase("false") => false
+      case _ => false
+    }
 }

Alternatively, if you're using Scala 2.13 or later, you can use .toBooleanOption which returns an Option[Boolean]:

 val customRecordPermission: Option[Boolean] = Users2x.findWithIntId(liveMeeting.users2x, msg.header.userId).flatMap { user =>
-    user.userMetadata.get("bbb_record_permission").map(_.toBoolean)
+    user.userMetadata.get("bbb_record_permission").flatMap(_.toBooleanOption)
 }

Let me know if you need assistance with implementing this change.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
val customRecordPermission: Option[Boolean] = Users2x.findWithIntId(liveMeeting.users2x, msg.header.userId).flatMap { user =>
user.userMetadata.get("bbb_record_permission").map(_.toBoolean)
val customRecordPermission: Option[Boolean] = Users2x.findWithIntId(liveMeeting.users2x, msg.header.userId).flatMap { user =>
user.userMetadata.get("bbb_record_permission").map {
case value if value.equalsIgnoreCase("true") => true
case value if value.equalsIgnoreCase("false") => false
case _ => false
}

@antobinary antobinary added this to the Release 3.0 milestone Oct 22, 2024
Comment thread docs/docs/administration/customize.md Resolved
@github-actions

Copy link
Copy Markdown

This pull request has conflicts ☹
Please resolve those so we can review the pull request.
Thanks.

@sonarqubecloud

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown

Automated tests Summary

✅ All the CI tests have passed!

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.

3 participants