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)
|
function isEmailEnabled($notifiable)
|
||||||
{
|
{
|
||||||
return data_get($notifiable, 'smtp_enabled') || data_get($notifiable, 'resend_enabled') || data_get($notifiable, 'use_instance_email_settings');
|
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
|
// The release version of your application
|
||||||
// Example with dynamic git hash: trim(exec('git --git-dir ' . base_path('.git') . ' log --pretty="%h" -n1 HEAD'))
|
// 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
|
// When left empty or `null` the Laravel environment will be used
|
||||||
'environment' => config('app.env'),
|
'environment' => config('app.env'),
|
||||||
|
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
<?php
|
<?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>
|
</x-forms.button>
|
||||||
@endif
|
@endif
|
||||||
@if (isEmailEnabled($team) &&
|
@if (isEmailEnabled($team) &&
|
||||||
auth()->user()->isAdminFromSession())
|
auth()->user()->isAdminFromSession() &&
|
||||||
|
isTestEmailEnabled($team))
|
||||||
<x-forms.button onclick="sendTestEmail.showModal()"
|
<x-forms.button onclick="sendTestEmail.showModal()"
|
||||||
class="text-white normal-case btn btn-xs no-animation btn-primary">
|
class="text-white normal-case btn btn-xs no-animation btn-primary">
|
||||||
Send Test Email
|
Send Test Email
|
||||||
@ -31,15 +32,22 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
@if ($this->sharedEmailEnabled)
|
@if (isCloud())
|
||||||
<div class="w-64 pb-4">
|
@if ($this->sharedEmailEnabled)
|
||||||
<x-forms.checkbox instantSave="instantSaveInstance" id="team.use_instance_email_settings"
|
<div class="w-64 pb-4">
|
||||||
label="Use hosted email service" />
|
<x-forms.checkbox instantSave="instantSaveInstance" id="team.use_instance_email_settings"
|
||||||
</div>
|
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
|
@else
|
||||||
<div class="pb-4 w-96">
|
<div class="pb-4 w-96">
|
||||||
<x-forms.checkbox disabled id="team.use_instance_email_settings"
|
<x-forms.checkbox instantSave="instantSaveInstance" id="team.use_instance_email_settings"
|
||||||
label="Use hosted email service (Pro+ subscription required)" />
|
label="Use system wide (transactional) email settings" />
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
@if (!$team->use_instance_email_settings)
|
@if (!$team->use_instance_email_settings)
|
||||||
|
@ -22,7 +22,9 @@
|
|||||||
<x-forms.button type="submit">
|
<x-forms.button type="submit">
|
||||||
Save
|
Save
|
||||||
</x-forms.button>
|
</x-forms.button>
|
||||||
@if (isEmailEnabled($settings))
|
@if (isEmailEnabled($settings) &&
|
||||||
|
auth()->user()->isAdminFromSession() &&
|
||||||
|
isTestEmailEnabled($settings))
|
||||||
<x-forms.button onclick="sendTestEmail.showModal()"
|
<x-forms.button onclick="sendTestEmail.showModal()"
|
||||||
class="text-white normal-case btn btn-xs no-animation btn-primary">
|
class="text-white normal-case btn btn-xs no-animation btn-primary">
|
||||||
Send Test Email
|
Send Test Email
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
"version": "3.12.36"
|
"version": "3.12.36"
|
||||||
},
|
},
|
||||||
"v4": {
|
"v4": {
|
||||||
"version": "4.0.0-beta.67"
|
"version": "4.0.0-beta.68"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user