Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

- Add admin setting to hide room owner on join of unauthenticated users
Copy link
Collaborator

Choose a reason for hiding this comment

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

Add subheading according to keepachangelog and add links to issue and PR


Comment on lines 8 to +11
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Missing ### Added category header under [Unreleased].

All other version sections follow the Keep a Changelog format with category headers. This entry should be placed under ### Added.

Proposed fix
 ## [Unreleased]
 
+### Added
+
 - Add admin setting to hide room owner on join of unauthenticated users
📝 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
## [Unreleased]
- Add admin setting to hide room owner on join of unauthenticated users
## [Unreleased]
### Added
- Add admin setting to hide room owner on join of unauthenticated users
🤖 Prompt for AI Agents
In `@CHANGELOG.md` around lines 8 - 11, The entry "Add admin setting to hide room
owner on join of unauthenticated users" under the "[Unreleased]" section is
missing a category header; add a "### Added" header directly beneath "##
[Unreleased]" and place that bullet under it so the changelog follows the Keep a
Changelog format (locate the "[Unreleased]" section and the line containing the
bullet to move it).

## [v4.12.0] - 2026-02-09

### Added
Expand Down
1 change: 1 addition & 0 deletions app/Http/Controllers/api/v1/SettingsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ public function update(UpdateSettings $request)
$roomSettings->auto_delete_never_used_period = $request->enum('room_auto_delete_never_used_period', TimePeriod::class);
$roomSettings->auto_delete_deadline_period = $request->enum('room_auto_delete_deadline_period', TimePeriod::class);
$roomSettings->file_terms_of_use = $request->input('room_file_terms_of_use');
$roomSettings->hide_owner_for_guests = $request->input('room_hide_owner_for_guests');
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Use $request->boolean() instead of $request->input() for a boolean setting.

Every other boolean field in this method uses $request->boolean() (e.g., Lines 171, 178, 188, 190). Using $request->input() returns the raw value (e.g., "1", "true", "0"), which may not properly cast to a PHP bool for the typed RoomSettings::$hide_owner_for_guests property.

Proposed fix
-        $roomSettings->hide_owner_for_guests = $request->input('room_hide_owner_for_guests');
+        $roomSettings->hide_owner_for_guests = $request->boolean('room_hide_owner_for_guests');
📝 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
$roomSettings->hide_owner_for_guests = $request->input('room_hide_owner_for_guests');
$roomSettings->hide_owner_for_guests = $request->boolean('room_hide_owner_for_guests');
🤖 Prompt for AI Agents
In `@app/Http/Controllers/api/v1/SettingsController.php` at line 186, The
assignment to RoomSettings::$hide_owner_for_guests uses $request->input(), which
can return raw strings and not reliably cast to a PHP bool; replace the call
with $request->boolean('room_hide_owner_for_guests') in the SettingsController
where $roomSettings->hide_owner_for_guests is set so the value is properly
converted to a boolean consistent with the other boolean fields.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Add backend tests


$userSettings->password_change_allowed = $request->boolean('user_password_change_allowed');

Expand Down
1 change: 1 addition & 0 deletions app/Http/Requests/UpdateSettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ public function rules()
'room_auto_delete_never_used_period' => ['required', 'numeric', Rule::enum(TimePeriod::class)],
'room_auto_delete_deadline_period' => ['required', 'numeric', Rule::enum(TimePeriod::class)->only([TimePeriod::ONE_WEEK, TimePeriod::TWO_WEEKS, TimePeriod::ONE_MONTH])],
'room_file_terms_of_use' => ['nullable', 'string', 'max:65000'],
'room_hide_owner_for_guests' => ['required', 'boolean'],

'user_password_change_allowed' => ['required', 'boolean'],

Expand Down
10 changes: 8 additions & 2 deletions app/Http/Resources/Room.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use App\Http\Resources\User as UserResource;
use App\Models\RoomToken;
use App\Services\RoomAuthService;
use App\Settings\RoomSettings;
use Auth;
use Illuminate\Http\Resources\Json\JsonResource;
use Illuminate\Support\Facades\Gate;
Expand Down Expand Up @@ -82,13 +83,18 @@ public function toArray($request)
$latestMeeting->setRelation('room', $this->resource);
}

$roomSettings = app(RoomSettings::class);

// Check if user is authenticated or room owner should be shown to everyone
$showOwner = Auth::check() || !$roomSettings->hide_owner_for_guests;

return [
'id' => $this->id,
'name' => $this->name,
'owner' => [
'owner' => $this->when($showOwner, [
Comment on lines +86 to +94
Copy link
Collaborator

Choose a reason for hiding this comment

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

Add backend tests

'id' => $this->owner->id,
'name' => $this->owner->fullname,
],
]),
'last_meeting' => new LastMeeting($latestMeeting),
'type' => new RoomType($this->roomType)->withFeatures(),
'model_name' => $this->model_name,
Expand Down
1 change: 1 addition & 0 deletions app/Http/Resources/Settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ public function toArray($request)
'room_auto_delete_deadline_period' => $roomSettings->auto_delete_deadline_period,
'room_token_expiration' => $roomSettings->token_expiration,
'room_file_terms_of_use' => $roomSettings->file_terms_of_use,
'room_hide_owner_for_guests' => $roomSettings->hide_owner_for_guests,
'user_password_change_allowed' => $userSettings->password_change_allowed,
'recording_server_usage_enabled' => $recordingSettings->server_usage_enabled,
'recording_server_usage_retention_period' => $recordingSettings->server_usage_retention_period,
Expand Down
2 changes: 2 additions & 0 deletions app/Settings/RoomSettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ class RoomSettings extends Settings

public ?string $file_terms_of_use;

public bool $hide_owner_for_guests;

public static function group(): string
{
return 'room';
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

use Spatie\LaravelSettings\Migrations\SettingsMigration;

return new class extends SettingsMigration
{
public function up(): void
{
$this->migrator->add('room.hide_owner_for_guests', false);
}

public function down(): void
{
$this->migrator->delete('room.hide_owner_for_guests');
}
};
1 change: 1 addition & 0 deletions lang/en/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,7 @@
'description' => 'Time period since last usage, after which personalized room links gets automatically removed.',
'title' => 'Expiration time for personalized room links',
],
'room_hide_owner_for_guests' => 'Hide the room owner from unauthenticated users',
'six_month' => '6 Months (180 Days)',
'statistics' => [
'meetings' => [
Expand Down
2 changes: 1 addition & 1 deletion resources/js/components/RoomDetailsList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
:class="{ 'md:flex-row': props.inline }"
>
<!--owner name-->
<div class="flex">
<div v-if="props.room.owner" class="flex">
Copy link
Collaborator

Choose a reason for hiding this comment

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

Add frontend test

<div class="room-details__icon">
<i class="fa-solid fa-user" />
</div>
Expand Down
1 change: 1 addition & 0 deletions resources/js/components/RoomHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -113,4 +113,5 @@ const props = defineProps({
});

const emit = defineEmits(["joinedMembership", "reload", "invalidCode"]);

Copy link
Collaborator

Choose a reason for hiding this comment

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

Remove empty new line

</script>
29 changes: 29 additions & 0 deletions resources/js/views/AdminSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1018,6 +1018,35 @@
/>
</div>
</div>
<fieldset
class="grid grid-cols-12 gap-4"
data-test="room-hide-owner-field"
>
<legend class="col-span-12 md:col-span-4 md:mb-0">
{{ $t("admin.settings.room_hide_owner_for_guests") }}
</legend>
<div class="col-span-12 flex flex-col gap-1 md:col-span-8">
<div class="flex items-center gap-2">
<ToggleSwitch
v-model="settings.room_hide_owner_for_guests"
input-id="room-hide-owner"
binary
:disabled="disabled"
:invalid="
formErrors.fieldInvalid('room_hide_owner_for_guests')
Copy link
Collaborator

Choose a reason for hiding this comment

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

Field room_hide_owner_for_guests should be added to lang/en/validation.php

Please also add this to the frontend cypress tests

"
/>
<label for="room-hide-owner">{{
$t("app.enable")
}}</label>
</div>
<FormError
:errors="
formErrors.fieldError('room_hide_owner_for_guests')
"
/>
</div>
</fieldset>
</AdminPanel>

<AdminPanel :title="$t('app.users')">
Expand Down
Loading