- Added titles for preference pages.
- Added extra check for non-guest for notifications on preferences page.
$shortcuts = UserShortcutMap::fromUserPreferences();
$enabled = setting()->getForCurrentUser('ui-shortcuts-enabled', false);
+ $this->setPageTitle(trans('preferences.shortcuts_interface'));
+
return view('users.preferences.shortcuts', [
'shortcuts' => $shortcuts,
'enabled' => $enabled,
$query = $permissions->restrictEntityRelationQuery($query, 'watches', 'watchable_id', 'watchable_type');
$watches = $query->with('watchable')->paginate(20);
+ $this->setPageTitle(trans('preferences.notifications'));
return view('users.preferences.notifications', [
'preferences' => $preferences,
'watches' => $watches,
</div>
</section>
- @if(userCan('receive-notifications'))
+ @if(signedInUser() && userCan('receive-notifications'))
<section class="card content-wrap auto-height items-center justify-space-between gap-m flex-container-row">
<div>
<h2 class="list-heading">{{ trans('preferences.notifications') }}</h2>
$resp->assertSee('Edit Profile');
}
- public function test_index_view_accessible_but_without_profile_for_guest_user()
+ public function test_index_view_accessible_but_without_profile_and_notifications_for_guest_user()
{
$this->setSettings(['app-public' => 'true']);
+ $this->permissions->grantUserRolePermissions($this->users->guest(), ['receive-notifications']);
$resp = $this->get('/preferences');
$resp->assertOk();
$resp->assertSee('Interface Keyboard Shortcuts');
$resp->assertDontSee('Edit Profile');
+ $resp->assertDontSee('Notification');
}
public function test_interface_shortcuts_updating()
{