Default record agreement
Type
- Bugfix**
- Feature
- Documentation
- Refactoring (e.g. Style updates, Test implementation, etc.)
- Other (please describe):
Checklist
- [x] Code updated to current develop branch head
- [ ] Passes CI checks
- [ ] Is a part of an issue
- [ ] Tests added for the bugfix or newly implemented feature, describe below why if not
- [ ] Changelog is updated
- [ ] Documentation of code and features exists
Changes
- added some profile settings to have default values for this 3 kinds of agreements:
Other information
Summary by CodeRabbit
- New Features
- Added three new user consent options: Record Agreement, Record Video Agreement, and Record Attendance Agreement, available in user settings and profile.
- These consent options are now displayed and editable within the user interface.
- Improvements
- User consent values are now shown in relevant dialogs and initialized from the current user's profile.
- Language support for these options added in both English and German.
- Bug Fixes
- Ensured proper validation and saving of new consent fields when updating user settings.
Walkthrough
Three new boolean user attributes—record_agreement, record_video_agreement, and record_attendance_agreement—were introduced throughout the application. The database schema was updated to include these fields with default values. The backend now validates, stores, and exposes these attributes in API responses. The user interface was extended to allow users and administrators to view and modify these settings, with localization support added for both English and German. Existing user update flows and resource representations were modified to handle these new consent-related fields.
Changes
| Files / Areas | Change Summary |
|---|---|
app/Models/User.php, database/migrations/2025_03_30_213313_add_default-record-agreement.php |
Added record_agreement, record_video_agreement, and record_attendance_agreement as boolean fields to the User model and database, including fillable and cast attributes. Migration adds/removes columns with default false. |
app/Http/Controllers/api/v1/UserController.php, app/Http/Requests/UserRequest.php |
Extended user update logic and validation to handle the three new boolean fields, conditionally updating and validating them if present in requests. |
app/Http/Resources/User.php |
Modified resource output: removed initial_password_set, added the three new consent fields to API responses. |
lang/en/admin.php, lang/de/admin.php |
Added translation keys and text for the new consent fields in both English and German admin language files. |
lang/en/validation.php, lang/de/validation.php |
Added attribute labels for the new fields in validation language files for both English and German. |
resources/js/components/UserTabOtherSettings.vue |
Added three new toggle switches for the consent fields in the user settings form, updated save logic to include them, and refreshed current user data if changed. |
resources/js/components/RoomJoinButton.vue |
Initialized consent checkboxes from the authenticated user's properties, added profile links below checkboxes, and logged the user object for debugging. |
Sequence Diagram(s)
sequenceDiagram
participant User
participant Frontend
participant API
participant DB
User->>Frontend: Toggle consent fields in settings
Frontend->>API: PATCH /users/{id} with consent fields
API->>DB: Update user record with new consent values
DB-->>API: Confirmation
API-->>Frontend: Updated user resource (incl. consent fields)
Frontend->>User: Show updated consent status
sequenceDiagram
participant User
participant Frontend
participant API
User->>Frontend: Opens profile/settings or join modal
Frontend->>API: GET /users/me
API-->>Frontend: User data with consent fields
Frontend->>User: Show consent checkboxes/toggles pre-filled
✨ Finishing Touches
- [ ] 📝 Generate Docstrings
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.
🪧 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
@coderabbitaiin 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
@coderabbitaiin 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 pauseto pause the reviews on a PR.@coderabbitai resumeto resume the paused reviews.@coderabbitai reviewto trigger an incremental review. This is useful when automatic reviews are disabled for the repository.@coderabbitai full reviewto do a full review from scratch and review all the files again.@coderabbitai summaryto regenerate the summary of the PR.@coderabbitai generate docstringsto generate docstrings for this PR.@coderabbitai generate sequence diagramto generate a sequence diagram of the changes in this PR.@coderabbitai resolveresolve all the CodeRabbit review comments.@coderabbitai configurationto show the current CodeRabbit configuration for the repository.@coderabbitai helpto get help.
Other keywords and placeholders
- Add
@coderabbitai ignoreanywhere in the PR description to prevent this PR from being reviewed. - Add
@coderabbitai summaryto generate the high-level summary at a specific location in the PR description. - Add
@coderabbitaianywhere in the PR title to generate the title automatically.
CodeRabbit Configuration File (.coderabbit.yaml)
- You can programmatically configure CodeRabbit by adding a
.coderabbit.yamlfile 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.
@q16marvin Thanks for your PR. However, we are planning to merge #1697, which includes several changes to the join dialog, etc. Just to let you know, there will be some changes required.
@q16marvin Please rebase this PR, due to the changes of #1697 and add software tests. It might make sence to also add the new "streaming" consent