Commit 82348847 authored by ZeMKI's avatar ZeMKI

Js Optimization + New Notification on user registration

parent d5ccd97d
......@@ -30,3 +30,4 @@ package.json
.idea/
/resources/lang/
composer.lock
......@@ -9,6 +9,7 @@ use App\User;
use Helper;
use Illuminate\Foundation\Auth\RegistersUsers;
use Illuminate\Support\Facades\Validator;
use Spatie\WebhookServer\WebhookCall;
class RegisterController extends Controller
{
......@@ -83,9 +84,12 @@ class RegisterController extends Controller
$user->attachPermissions([$createStudyPermission]);
$user->attachRole($role);
// send welcome email - no action required
// Mail::to($user->email)->send(new VerificationEmail($user, config('utilities.emailDefaultText')));
// a "verify mail" email is sent out now
WebhookCall::create()
->url('https://chat.zemki.uni-bremen.de/hooks/Jj3dDY2KzSFDS2kxZ/SvbmjdswXTASAXxC2GfgfTpFooK5Eo4kFBGPyDRrtsWmgED3')
->payload(['text' => 'User '.$data['email'].' has registered on Mesort. We have a total of '.User::all()->count().' users!'])
->useSecret('Jj3dDY2KzSFDS2kxZ/SvbmjdswXTASAXxC2GfgfTpFooK5Eo4kFBGPyDRrtsWmgED3')
->dispatch();
$user->save();
return $user;
......
......@@ -9,6 +9,7 @@
"type": "project",
"require": {
"php": "^7.2",
"arietimmerman/laravel-url-shortener": "^0.1.3",
"barryvdh/laravel-dompdf": "^0.8.4",
"barryvdh/laravel-translation-manager": "^0.5.8",
"facade/ignition": "^1.4",
......@@ -22,6 +23,7 @@
"maatwebsite/excel": "^3.1",
"parsedown/laravel": "^1.2",
"santigarcor/laratrust": "^5.1",
"spatie/laravel-webhook-server": "^1.4",
"symfony/process": "^4.2"
},
"require-dev": {
......
<?php
return [
/*
* The default queue that should be used to send webhook requests.
*/
'queue' => 'default',
/*
* The default http verb to use.
*/
'http_verb' => 'post',
/*
* This class is responsible for calculating the signature that will be added to
* the headers of the webhook request. A webhook client can use the signature
* to verify the request hasn't been tampered with.
*/
'signer' => \Spatie\WebhookServer\Signer\DefaultSigner::class,
/*
* This is the name of the header where the signature will be added.
*/
'signature_header_name' => 'Signature',
/*
* These are the headers that will be added to all webhook requests.
*/
'headers' => [
'Content-Type' => 'application/json',
],
/*
* If a call to a webhook takes longer that this amount of seconds
* the attempt will be considered failed.
*/
'timeout_in_seconds' => 3,
/*
* The amount of times the webhook should be called before we give up.
*/
'tries' => 3,
/*
* This class determines how many seconds there should be between attempts.
*/
'backoff_strategy' => \Spatie\WebhookServer\BackoffStrategy\ExponentialBackoffStrategy::class,
/*
* By default we will verify that the ssl certificate of the destination
* of the webhook is valid.
*/
'verify_ssl' => true,
/*
* When using Laravel Horizon you can specify tags that should be used on the
* underlying job that performs the webhook request.
*/
'tags' => [],
];
......@@ -172,7 +172,7 @@ window.app = new Vue({
newstudy: {},
users: {},
newuser: {
showmodal: false,
showModal: false,
edituser: 0,
study: 0,
activeTab: 0
......@@ -377,8 +377,8 @@ window.app = new Vue({
document.getElementById(id).classList.toggle("hidden");
}
,
showmodal: function (id = null, study) {
this.newuser.showmodal = !this.newuser.showmodal;
ShowModalFunction: function (id = null, study) {
this.newuser.showModal = !this.newuser.showModal;
this.newuser.edituser = id;
this.newuser.study = study;
......
......@@ -35,8 +35,6 @@
</a>
</p>
</div>
@endpermission
@permission('update-studies',$study->id)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment