mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Fixes for invitation 404 messaging
This commit is contained in:
parent
1b2972da75
commit
be45998ebe
@ -80,7 +80,10 @@ class InvitationController extends Controller
|
||||
$query->where('is_deleted',0);
|
||||
})
|
||||
->with('contact.client')
|
||||
->firstOrFail();
|
||||
->first();
|
||||
|
||||
if(!$invitation)
|
||||
return abort(404,'The resource is no longer available.');
|
||||
|
||||
/* Return early if we have the correct client_hash embedded */
|
||||
$client_contact = $invitation->contact;
|
||||
|
@ -49,4 +49,12 @@ class HostedMigrationController extends Controller
|
||||
|
||||
}
|
||||
|
||||
public function confirmForwarding(Request $request)
|
||||
{
|
||||
if($request->header('X-API-HOSTED-SECRET') != config('ninja.ninja_hosted_secret'))
|
||||
return;
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -74,7 +74,7 @@ class SetInviteDb
|
||||
if (request()->json) {
|
||||
return response()->json($error, 403);
|
||||
} else {
|
||||
abort(404,'I could not find the database for this object.');
|
||||
abort(404,'I could not find this resource.');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -338,14 +338,14 @@ class CompanyImport implements ShouldQueue
|
||||
|
||||
if($this->account->plan == 'enterprise'){
|
||||
|
||||
$total_import_users = count($backup_users_emails);
|
||||
// $total_import_users = count($backup_users_emails);
|
||||
|
||||
$account_plan_num_user = $this->account->num_users;
|
||||
// $account_plan_num_user = $this->account->num_users;
|
||||
|
||||
if($total_import_users > $account_plan_num_user){
|
||||
$this->message = "Total user count ({$total_import_users}) greater than your plan allows ({$account_plan_num_user})";
|
||||
$this->pre_flight_checks_pass = false;
|
||||
}
|
||||
// if($total_import_users > $account_plan_num_user){
|
||||
// $this->message = "Total user count ({$total_import_users}) greater than your plan allows ({$account_plan_num_user})";
|
||||
// $this->pre_flight_checks_pass = false;
|
||||
// }
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -56,6 +56,10 @@ class ClientPaymentFailureObject
|
||||
|
||||
public function build()
|
||||
{
|
||||
if(!$this->payment_hash){
|
||||
nlog("no payment has for failure notification - ClientPaymentFailureObject");
|
||||
return;
|
||||
}
|
||||
|
||||
App::forgetInstance('translator');
|
||||
/* Init a new copy of the translator*/
|
||||
|
@ -304,7 +304,7 @@ class MolliePaymentDriver extends BaseDriver
|
||||
try {
|
||||
$payment = $this->gateway->payments->get($request->id);
|
||||
|
||||
$record = Payment::where('transaction_reference', $payment->id)->firstOrFail();
|
||||
$record = Payment::withTrashed()->where('transaction_reference', $request->id)->firstOrFail();
|
||||
$record->status_id = $codes[$payment->status];
|
||||
$record->save();
|
||||
|
||||
|
@ -220,5 +220,6 @@ Route::post('api/v1/postmark_webhook', 'PostMarkController@webhook')->middleware
|
||||
Route::get('token_hash_router', 'OneTimeTokenController@router');
|
||||
Route::get('webcron', 'WebCronController@index');
|
||||
Route::post('api/v1/get_migration_account', 'HostedMigrationController@getAccount')->middleware('guest');
|
||||
Route::post('api/v1/confirm_forwarding', 'HostedMigrationController@confirmForwarding')->middleware('guest');
|
||||
|
||||
Route::fallback('BaseController@notFound');
|
||||
|
Loading…
x
Reference in New Issue
Block a user