mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Company Gateway endpoint and tests
This commit is contained in:
parent
16cd98980b
commit
3af84f7de7
@ -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();
|
||||
|
@ -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()
|
||||
|
@ -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()
|
||||
|
@ -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()
|
||||
|
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user