-
Notifications
You must be signed in to change notification settings - Fork 30
admin setting to hide room owner on join of unauthenticated users #2844
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -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 | ||||||||||||||||||
|
|
||||||||||||||||||
|
Comment on lines
8
to
+11
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Missing All other version sections follow the Keep a Changelog format with category headers. This entry should be placed under Proposed fix ## [Unreleased]
+### Added
+
- Add admin setting to hide room owner on join of unauthenticated users📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||
| ## [v4.12.0] - 2026-02-09 | ||||||||||||||||||
|
|
||||||||||||||||||
| ### Added | ||||||||||||||||||
|
|
||||||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -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'); | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use Every other boolean field in this method uses 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
Suggested change
🤖 Prompt for AI Agents
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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'); | ||||||
|
|
||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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; | ||
|
|
@@ -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
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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, | ||
|
|
||
| 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'); | ||
| } | ||
| }; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,7 +4,7 @@ | |
| :class="{ 'md:flex-row': props.inline }" | ||
| > | ||
| <!--owner name--> | ||
| <div class="flex"> | ||
| <div v-if="props.room.owner" class="flex"> | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -113,4 +113,5 @@ const props = defineProps({ | |
| }); | ||
|
|
||
| const emit = defineEmits(["joinedMembership", "reload", "invalidCode"]); | ||
|
|
||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove empty new line |
||
| </script> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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') | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Field 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')"> | ||
|
|
||
There was a problem hiding this comment.
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