mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-05 23:44:35 -04:00
Merge pull request #5198 from turbo124/v5-develop
Fixes for task policy
This commit is contained in:
commit
ae8942b187
@ -1 +1 @@
|
||||
5.1.28
|
||||
5.1.29
|
@ -241,7 +241,7 @@ class BaseDriver extends AbstractPaymentDriver
|
||||
|
||||
event(new PaymentWasCreated($payment, $payment->company, Ninja::eventVars()));
|
||||
|
||||
(new BillingSubscriptionService)->completePurchase($this->payment_hash);
|
||||
//(new BillingSubscriptionService)->completePurchase($this->payment_hash);
|
||||
|
||||
return $payment->service()->applyNumber()->save();
|
||||
}
|
||||
|
@ -11,6 +11,6 @@ class CreditPolicy extends EntityPolicy
|
||||
|
||||
public function create(User $user) : bool
|
||||
{
|
||||
return $user->isAdmin() || $user->hasPermission('create_quote') || $user->hasPermission('create_all');
|
||||
return $user->isAdmin() || $user->hasPermission('create_credit') || $user->hasPermission('create_all');
|
||||
}
|
||||
}
|
||||
|
@ -20,6 +20,6 @@ class TaskPolicy extends EntityPolicy
|
||||
{
|
||||
public function create(User $user) : bool
|
||||
{
|
||||
return $user->isAdmin();
|
||||
return $user->isAdmin() || $user->hasPermission('create_task') || $user->hasPermission('create_all');
|
||||
}
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ trait UserNotifies
|
||||
array_push($required_permissions, 'all_user_notifications');
|
||||
}
|
||||
|
||||
if (count(array_intersect($required_permissions, $notifications->email)) >= 1 || count(array_intersect($required_permissions, ['all_user_notifications'])) >= 1 || count(array_intersect($required_permissions, 'all_notifications')) >= 1) {
|
||||
if (count(array_intersect($required_permissions, $notifications->email)) >= 1 || count(array_intersect($required_permissions, ['all_user_notifications'])) >= 1 || count(array_intersect($required_permissions, ['all_notifications'])) >= 1) {
|
||||
array_push($notifiable_methods, 'mail');
|
||||
}
|
||||
|
||||
|
@ -13,7 +13,7 @@ return [
|
||||
'require_https' => env('REQUIRE_HTTPS', true),
|
||||
'app_url' => rtrim(env('APP_URL', ''), '/'),
|
||||
'app_domain' => env('APP_DOMAIN', ''),
|
||||
'app_version' => '5.1.28',
|
||||
'app_version' => '5.1.29',
|
||||
'minimum_client_version' => '5.0.16',
|
||||
'terms_version' => '1.0.1',
|
||||
'api_secret' => env('API_SECRET', false),
|
||||
|
@ -15,7 +15,7 @@ class AddInvoiceIdToClientSubscriptionsTable extends Migration
|
||||
{
|
||||
Schema::table('client_subscriptions', function (Blueprint $table) {
|
||||
$table->unsignedInteger('invoice_id')->nullable();
|
||||
|
||||
$table->unsignedInteger('quantity')->default(1);
|
||||
$table->foreign('invoice_id')->references('id')->on('invoices')->onDelete('cascade')->onUpdate('cascade');
|
||||
});
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user