1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-20 08:21:34 +02:00

Company Gateway endpoint and tests

This commit is contained in:
David Bomba 2019-10-03 21:18:12 +10:00
parent 16cd98980b
commit 3af84f7de7
5 changed files with 4 additions and 7 deletions

View File

@ -131,10 +131,7 @@ class CompanyGatewayController extends BaseController
* @return \Illuminate\Http\Response
*/
public function update(UpdateCompanyGatewayRequest $request, CompanyGateway $company_gateway)
//public function update(CompanyGateway $company_gateway)
{
\Log::error('wooppee');
\Log::error(print_r($company_gateway,1));
$company_gateway->fill($request->all());
$company_gateway->save();

View File

@ -24,7 +24,7 @@ class DestroyCompanyGatewayRequest extends Request
public function authorize()
{
return auth()->user()->can('edit', $this->company_gateway);
return auth()->user()->isAdmin();
}
public function rules()

View File

@ -24,7 +24,7 @@ class EditCompanyGatewayRequest extends Request
public function authorize()
{
return auth()->user()->can('edit', $this->company_gateway);
return auth()->user()->isAdmin();
}
public function rules()

View File

@ -24,7 +24,7 @@ class ShowCompanyGatewayRequest extends Request
public function authorize()
{
return auth()->user()->can('view', $this->company_gateway);
return auth()->user()->isAdmin();
}
public function rules()

View File

@ -24,7 +24,7 @@ class UpdateCompanyGatewayRequest extends Request
public function authorize()
{
return auth()->user()->can('edit', $this->company_gateway);
return auth()->user()->isAdmin();
}
public function rules()