mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 05:02:36 +01:00
Vendor Contact key login
This commit is contained in:
parent
92c236e788
commit
b9c198f38e
@ -12,6 +12,7 @@
|
||||
namespace App\Factory;
|
||||
|
||||
use App\Models\VendorContact;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
class VendorContactFactory
|
||||
{
|
||||
@ -21,6 +22,7 @@ class VendorContactFactory
|
||||
$vendor_contact->first_name = '';
|
||||
$vendor_contact->user_id = $user_id;
|
||||
$vendor_contact->company_id = $company_id;
|
||||
$vendor_contact->contact_key = Str::random(40);
|
||||
$vendor_contact->id = 0;
|
||||
|
||||
return $vendor_contact;
|
||||
|
@ -149,7 +149,7 @@ class VendorContactKeyLogin
|
||||
private function setRedirectPath()
|
||||
{
|
||||
|
||||
return 'vendors/purchase_orders';
|
||||
|
||||
return 'vendor/purchase_orders';
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -160,7 +160,7 @@ class VendorContact extends Authenticatable implements HasLocalePreference
|
||||
|
||||
$domain = isset($this->company->portal_domain) ? $this->company->portal_domain : $this->company->domain();
|
||||
|
||||
return $domain.'/vendors/key_login/'.$this->contact_key;
|
||||
return $domain.'/vendor/key_login/'.$this->contact_key;
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ use App\Http\Controllers\VendorPortal\VendorContactHashLoginController;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
Route::get('vendors', [VendorContactLoginController::class, 'catch'])->name('vendor.catchall')->middleware(['domain_db', 'contact_account','vendor_locale']); //catch all
|
||||
Route::get('vendor/key_login/{contact_key}', [VendorContactHashLoginController::class, 'login'])->name('contact_login')->middleware(['domain_db','contact_key_login']);
|
||||
Route::get('vendor/key_login/{contact_key}', [VendorContactHashLoginController::class, 'login'])->name('contact_login')->middleware(['domain_db','vendor_contact_key_login']);
|
||||
|
||||
Route::group(['middleware' => ['invite_db'], 'prefix' => 'vendor', 'as' => 'vendor.'], function () {
|
||||
/*Invitation catches*/
|
||||
|
Loading…
Reference in New Issue
Block a user