Skip to content
Merged
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
4 changes: 2 additions & 2 deletions app/Access/EmailConfirmationService.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace BookStack\Access;

use BookStack\Access\Notifications\ConfirmEmailNotification;
use BookStack\Exceptions\ConfirmationEmailException;
use BookStack\Notifications\ConfirmEmail;
use BookStack\Users\Models\User;

class EmailConfirmationService extends UserTokenService
Expand All @@ -26,7 +26,7 @@ public function sendConfirmation(User $user)
$this->deleteByUser($user);
$token = $this->createTokenForUser($user);

$user->notify(new ConfirmEmail($token));
$user->notify(new ConfirmEmailNotification($token));
}

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<?php

namespace BookStack\Notifications;
namespace BookStack\Access\Notifications;

use BookStack\App\MailNotification;
use BookStack\Users\Models\User;
use Illuminate\Notifications\Messages\MailMessage;

class ConfirmEmail extends MailNotification
class ConfirmEmailNotification extends MailNotification
{
public function __construct(
public string $token
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<?php

namespace BookStack\Notifications;
namespace BookStack\Access\Notifications;

use BookStack\App\MailNotification;
use BookStack\Users\Models\User;
use Illuminate\Notifications\Messages\MailMessage;

class ResetPassword extends MailNotification
class ResetPasswordNotification extends MailNotification
{
public function __construct(
public string $token
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<?php

namespace BookStack\Notifications;
namespace BookStack\Access\Notifications;

use BookStack\App\MailNotification;
use BookStack\Users\Models\User;
use Illuminate\Notifications\Messages\MailMessage;

class UserInvite extends MailNotification
class UserInviteNotification extends MailNotification
{
public function __construct(
public string $token
Expand Down
4 changes: 2 additions & 2 deletions app/Access/UserInviteService.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace BookStack\Access;

use BookStack\Notifications\UserInvite;
use BookStack\Access\Notifications\UserInviteNotification;
use BookStack\Users\Models\User;

class UserInviteService extends UserTokenService
Expand All @@ -18,6 +18,6 @@ public function sendInvitation(User $user)
{
$this->deleteByUser($user);
$token = $this->createTokenForUser($user);
$user->notify(new UserInvite($token));
$user->notify(new UserInviteNotification($token));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use BookStack\Activity\Models\Loggable;
use BookStack\Activity\Notifications\MessageParts\LinkedMailMessageLine;
use BookStack\Notifications\MailNotification;
use BookStack\App\MailNotification;
use BookStack\Users\Models\User;
use Illuminate\Bus\Queueable;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace BookStack\Notifications;
namespace BookStack\App;

use BookStack\Users\Models\User;
use Illuminate\Bus\Queueable;
Expand Down
16 changes: 10 additions & 6 deletions app/App/Providers/EventServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@
namespace BookStack\App\Providers;

use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
use SocialiteProviders\Azure\AzureExtendSocialite;
use SocialiteProviders\Discord\DiscordExtendSocialite;
use SocialiteProviders\GitLab\GitLabExtendSocialite;
use SocialiteProviders\Manager\SocialiteWasCalled;
use SocialiteProviders\Okta\OktaExtendSocialite;
use SocialiteProviders\Twitch\TwitchExtendSocialite;

class EventServiceProvider extends ServiceProvider
{
Expand All @@ -14,12 +19,11 @@ class EventServiceProvider extends ServiceProvider
*/
protected $listen = [
SocialiteWasCalled::class => [
'SocialiteProviders\Slack\SlackExtendSocialite@handle',
'SocialiteProviders\Azure\AzureExtendSocialite@handle',
'SocialiteProviders\Okta\OktaExtendSocialite@handle',
'SocialiteProviders\GitLab\GitLabExtendSocialite@handle',
'SocialiteProviders\Twitch\TwitchExtendSocialite@handle',
'SocialiteProviders\Discord\DiscordExtendSocialite@handle',
AzureExtendSocialite::class . '@handle',
OktaExtendSocialite::class . '@handle',
GitLabExtendSocialite::class . '@handle',
TwitchExtendSocialite::class . '@handle',
DiscordExtendSocialite::class . '@handle',
],
];

Expand Down
3 changes: 1 addition & 2 deletions app/Settings/MaintenanceController.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
use BookStack\Activity\ActivityType;
use BookStack\Entities\Tools\TrashCan;
use BookStack\Http\Controller;
use BookStack\Notifications\TestEmail;
use BookStack\References\ReferenceStore;
use BookStack\Uploads\ImageService;
use Illuminate\Http\Request;
Expand Down Expand Up @@ -69,7 +68,7 @@ public function sendTestEmail()
$this->logActivity(ActivityType::MAINTENANCE_ACTION_RUN, 'send-test-email');

try {
user()->notifyNow(new TestEmail());
user()->notifyNow(new TestEmailNotification());
$this->showSuccessNotification(trans('settings.maint_send_test_email_success', ['address' => user()->email]));
} catch (\Exception $exception) {
$errorMessage = trans('errors.maintenance_test_email_failure') . "\n" . $exception->getMessage();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<?php

namespace BookStack\Notifications;
namespace BookStack\Settings;

use BookStack\App\MailNotification;
use BookStack\Users\Models\User;
use Illuminate\Notifications\Messages\MailMessage;

class TestEmail extends MailNotification
class TestEmailNotification extends MailNotification
{
public function toMail(User $notifiable): MailMessage
{
Expand Down
4 changes: 2 additions & 2 deletions app/Users/Models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace BookStack\Users\Models;

use BookStack\Access\Mfa\MfaValue;
use BookStack\Access\Notifications\ResetPasswordNotification;
use BookStack\Access\SocialAccount;
use BookStack\Activity\Models\Favourite;
use BookStack\Activity\Models\Loggable;
Expand All @@ -11,7 +12,6 @@
use BookStack\App\Model;
use BookStack\App\Sluggable;
use BookStack\Entities\Tools\SlugGenerator;
use BookStack\Notifications\ResetPassword;
use BookStack\Translation\LanguageManager;
use BookStack\Uploads\Image;
use Carbon\Carbon;
Expand Down Expand Up @@ -365,7 +365,7 @@ public function getLanguage(): string
*/
public function sendPasswordResetNotification($token)
{
$this->notify(new ResetPassword($token));
$this->notify(new ResetPasswordNotification($token));
}

/**
Expand Down
3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"guzzlehttp/guzzle": "^7.4",
"intervention/image": "^2.7",
"laravel/framework": "^9.0",
"laravel/socialite": "^5.2",
"laravel/socialite": "^5.8",
"laravel/tinker": "^2.6",
"league/commonmark": "^2.3",
"league/flysystem-aws-s3-v3": "^3.0",
Expand All @@ -37,7 +37,6 @@
"socialiteproviders/gitlab": "^4.1",
"socialiteproviders/microsoft-azure": "^5.1",
"socialiteproviders/okta": "^4.2",
"socialiteproviders/slack": "^4.1",
"socialiteproviders/twitch": "^5.3",
"ssddanbrown/htmldiff": "^1.0.2"
},
Expand Down
Loading