mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-31 21:14:35 -04:00
Add permissions for view_dashboard
This commit is contained in:
parent
f186422741
commit
c0bd70454e
@ -250,8 +250,8 @@ class Rule extends BaseRule implements RuleInterface
|
|||||||
// $this->reduced_tax_rate = $this->client->company->tax_data->regions->EU->subregions->{$this->client->company->country()->iso_3166_2}->reduced_tax_rate;
|
// $this->reduced_tax_rate = $this->client->company->tax_data->regions->EU->subregions->{$this->client->company->country()->iso_3166_2}->reduced_tax_rate;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
$this->tax_rate = $this->client->company->tax_data->regions->AU->subregions->{$this->client->company->country()->iso_3166_2}->tax_rate;
|
$this->tax_rate = $this->client->company->tax_data->regions->AU->subregions->{$this->client->company->country()->iso_3166_2}->tax_rate ?? 0;
|
||||||
$this->reduced_tax_rate = $this->client->company->tax_data->regions->AU->subregions->{$this->client->company->country()->iso_3166_2}->tax_rate;
|
$this->reduced_tax_rate = $this->client->company->tax_data->regions->AU->subregions->{$this->client->company->country()->iso_3166_2}->tax_rate ?? 0;
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ class ShowChartRequest extends Request
|
|||||||
/**@var \App\Models\User auth()->user */
|
/**@var \App\Models\User auth()->user */
|
||||||
$user = auth()->user();
|
$user = auth()->user();
|
||||||
|
|
||||||
return $user->isAdmin();
|
return $user->isAdmin() || $user->hasPermission('view_dashboard');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function rules()
|
public function rules()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user