commit
26048339d6
@ -343,6 +343,15 @@ function send_user_an_email(MailMessage $mail, string $email, ?string $cc = null
|
||||
);
|
||||
}
|
||||
}
|
||||
function isTestEmailEnabled($notifiable)
|
||||
{
|
||||
if (data_get($notifiable, 'use_instance_email_settings') && isInstanceAdmin()) {
|
||||
return true;
|
||||
} else if (data_get($notifiable, 'smtp_enabled') || data_get($notifiable, 'resend_enabled') && auth()->user()->isAdminFromSession()) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
function isEmailEnabled($notifiable)
|
||||
{
|
||||
return data_get($notifiable, 'smtp_enabled') || data_get($notifiable, 'resend_enabled') || data_get($notifiable, 'use_instance_email_settings');
|
||||
|
@ -7,7 +7,7 @@ return [
|
||||
|
||||
// The release version of your application
|
||||
// Example with dynamic git hash: trim(exec('git --git-dir ' . base_path('.git') . ' log --pretty="%h" -n1 HEAD'))
|
||||
'release' => '4.0.0-beta.67',
|
||||
'release' => '4.0.0-beta.68',
|
||||
// When left empty or `null` the Laravel environment will be used
|
||||
'environment' => config('app.env'),
|
||||
|
||||
|
@ -1,3 +1,3 @@
|
||||
<?php
|
||||
|
||||
return '4.0.0-beta.67';
|
||||
return '4.0.0-beta.68';
|
||||
|
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('teams', function (Blueprint $table) {
|
||||
$table->boolean('use_instance_email_settings')->default(true)->change();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('teams', function (Blueprint $table) {
|
||||
$table->boolean('use_instance_email_settings')->default(false)->change();
|
||||
});
|
||||
}
|
||||
};
|
@ -22,7 +22,8 @@
|
||||
</x-forms.button>
|
||||
@endif
|
||||
@if (isEmailEnabled($team) &&
|
||||
auth()->user()->isAdminFromSession())
|
||||
auth()->user()->isAdminFromSession() &&
|
||||
isTestEmailEnabled($team))
|
||||
<x-forms.button onclick="sendTestEmail.showModal()"
|
||||
class="text-white normal-case btn btn-xs no-animation btn-primary">
|
||||
Send Test Email
|
||||
@ -31,15 +32,22 @@
|
||||
|
||||
</div>
|
||||
</form>
|
||||
@if ($this->sharedEmailEnabled)
|
||||
<div class="w-64 pb-4">
|
||||
<x-forms.checkbox instantSave="instantSaveInstance" id="team.use_instance_email_settings"
|
||||
label="Use hosted email service" />
|
||||
</div>
|
||||
@if (isCloud())
|
||||
@if ($this->sharedEmailEnabled)
|
||||
<div class="w-64 pb-4">
|
||||
<x-forms.checkbox instantSave="instantSaveInstance" id="team.use_instance_email_settings"
|
||||
label="Use Hosted Email Service" />
|
||||
</div>
|
||||
@else
|
||||
<div class="pb-4 w-96">
|
||||
<x-forms.checkbox disabled id="team.use_instance_email_settings"
|
||||
label="Use Hosted Email Service (Pro+ subscription required)" />
|
||||
</div>
|
||||
@endif
|
||||
@else
|
||||
<div class="pb-4 w-96">
|
||||
<x-forms.checkbox disabled id="team.use_instance_email_settings"
|
||||
label="Use hosted email service (Pro+ subscription required)" />
|
||||
<x-forms.checkbox instantSave="instantSaveInstance" id="team.use_instance_email_settings"
|
||||
label="Use system wide (transactional) email settings" />
|
||||
</div>
|
||||
@endif
|
||||
@if (!$team->use_instance_email_settings)
|
||||
|
@ -22,7 +22,9 @@
|
||||
<x-forms.button type="submit">
|
||||
Save
|
||||
</x-forms.button>
|
||||
@if (isEmailEnabled($settings))
|
||||
@if (isEmailEnabled($settings) &&
|
||||
auth()->user()->isAdminFromSession() &&
|
||||
isTestEmailEnabled($settings))
|
||||
<x-forms.button onclick="sendTestEmail.showModal()"
|
||||
class="text-white normal-case btn btn-xs no-animation btn-primary">
|
||||
Send Test Email
|
||||
|
@ -4,7 +4,7 @@
|
||||
"version": "3.12.36"
|
||||
},
|
||||
"v4": {
|
||||
"version": "4.0.0-beta.67"
|
||||
"version": "4.0.0-beta.68"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user