mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Update authorize methods on billing subscription requests
This commit is contained in:
parent
868b6efd8e
commit
83b23956f6
@ -3,6 +3,7 @@
|
|||||||
namespace App\Http\Requests\BillingSubscription;
|
namespace App\Http\Requests\BillingSubscription;
|
||||||
|
|
||||||
use App\Http\Requests\Request;
|
use App\Http\Requests\Request;
|
||||||
|
use App\Models\BillingSubscription;
|
||||||
|
|
||||||
class CreateBillingSubscriptionRequest extends Request
|
class CreateBillingSubscriptionRequest extends Request
|
||||||
{
|
{
|
||||||
@ -13,8 +14,7 @@ class CreateBillingSubscriptionRequest extends Request
|
|||||||
*/
|
*/
|
||||||
public function authorize(): bool
|
public function authorize(): bool
|
||||||
{
|
{
|
||||||
return true;
|
return auth()->user()->can('create', BillingSubscription::class);
|
||||||
// return auth()->user()->can('create', BillingSubscription::class); // TODO
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -14,7 +14,7 @@ class DestroyBillingSubscriptionRequest extends Request
|
|||||||
*/
|
*/
|
||||||
public function authorize()
|
public function authorize()
|
||||||
{
|
{
|
||||||
return true; // TODO
|
return auth()->user()->can('edit', $this->billing_subscription);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -14,9 +14,7 @@ class EditBillingSubscriptionRequest extends Request
|
|||||||
*/
|
*/
|
||||||
public function authorize()
|
public function authorize()
|
||||||
{
|
{
|
||||||
return true;
|
return auth()->user()->can('edit', $this->billing_subscription);
|
||||||
|
|
||||||
// return auth()->user()->can('view', $this->billing_subscription); // TODO
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -14,8 +14,7 @@ class ShowBillingSubscriptionRequest extends Request
|
|||||||
*/
|
*/
|
||||||
public function authorize() : bool
|
public function authorize() : bool
|
||||||
{
|
{
|
||||||
return true;
|
return auth()->user()->can('view', $this->billing_subscription);
|
||||||
// return auth()->user()->can('view', $this->billing_subscription); // TODO
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
namespace App\Http\Requests\BillingSubscription;
|
namespace App\Http\Requests\BillingSubscription;
|
||||||
|
|
||||||
use App\Http\Requests\Request;
|
use App\Http\Requests\Request;
|
||||||
|
use App\Models\BillingSubscription;
|
||||||
|
|
||||||
class StoreBillingSubscriptionRequest extends Request
|
class StoreBillingSubscriptionRequest extends Request
|
||||||
{
|
{
|
||||||
@ -13,7 +14,7 @@ class StoreBillingSubscriptionRequest extends Request
|
|||||||
*/
|
*/
|
||||||
public function authorize()
|
public function authorize()
|
||||||
{
|
{
|
||||||
return true; // TODO
|
return auth()->user()->can('create', BillingSubscription::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -16,7 +16,7 @@ class UpdateBillingSubscriptionRequest extends Request
|
|||||||
*/
|
*/
|
||||||
public function authorize()
|
public function authorize()
|
||||||
{
|
{
|
||||||
return true; // TODO
|
return auth()->user()->can('edit', $this->billing_subscription);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user