Merge branch 'master' of github.com:akaunting/akaunting
This commit is contained in:
commit
311139df10
@ -89,6 +89,13 @@ class UpdateCompany extends Job
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
// Can't disable active company
|
||||
if (($this->request->get('enabled', 1) == 0) && ($this->company->id == session('company_id'))) {
|
||||
$message = trans('companies.error.disable_active');
|
||||
|
||||
throw new \Exception($message);
|
||||
}
|
||||
|
||||
// Check if user can access company
|
||||
if (!$this->isUserCompany($this->company->id)) {
|
||||
$message = trans('companies.error.not_user_company');
|
||||
|
@ -8,6 +8,7 @@ return [
|
||||
'error' => [
|
||||
'not_user_company' => 'Error: You are not allowed to change this company!',
|
||||
'delete_active' => 'Error: Can not delete the active company. Please, switch to another first!',
|
||||
'disable_active' => 'Error: Can not disable the active company. Please, switch to another first!',
|
||||
],
|
||||
|
||||
];
|
||||
|
@ -128,7 +128,6 @@ return [
|
||||
'disable' => 'Disable',
|
||||
'select_all' => 'Select All',
|
||||
'unselect_all' => 'Unselect All',
|
||||
'go_to' => 'Go to :name',
|
||||
'created_date' => 'Created Date',
|
||||
'period' => 'Period',
|
||||
'frequency' => 'Frequency',
|
||||
@ -152,6 +151,7 @@ return [
|
||||
'no_data' => 'No data',
|
||||
'no_matching_data' => 'No matching data',
|
||||
'clear_cache' => 'Clear Cache',
|
||||
'go_to_dashboard' => 'Go to dashboard',
|
||||
|
||||
'card' => [
|
||||
'name' => 'Name on Card',
|
||||
|
@ -12,7 +12,7 @@
|
||||
|
||||
@php $landing_page = user() ? route(user()->landing_page) : route('login'); @endphp
|
||||
|
||||
<a href="{{ $landing_page }}" class="btn btn-success header-button-top"><span class="fa fa-tachometer-alt"></span> {{ trans('general.go_to', ['name' => trans_choice('general.dashboards', 1)]) }}</a>
|
||||
<a href="{{ $landing_page }}" class="btn btn-success header-button-top"><span class="fa fa-tachometer-alt"></span> {{ trans('general.go_to_dashboard') }}</a>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
@ -12,7 +12,7 @@
|
||||
|
||||
@php $landing_page = user() ? route(user()->landing_page) : route('login'); @endphp
|
||||
|
||||
<a href="{{ $landing_page }}" class="btn btn-success header-button-top"><span class="fa fa-tachometer-alt"></span> {{ trans('general.go_to', ['name' => trans_choice('general.dashboards', 1)]) }}</a>
|
||||
<a href="{{ $landing_page }}" class="btn btn-success header-button-top"><span class="fa fa-tachometer-alt"></span> {{ trans('general.go_to_dashboard') }}</a>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
@ -12,7 +12,7 @@
|
||||
|
||||
@php $landing_page = user() ? route(user()->landing_page) : route('login'); @endphp
|
||||
|
||||
<a href="{{ $landing_page }}" class="btn btn-success header-button-top"><span class="fa fa-tachometer-alt"></span> {{ trans('general.go_to', ['name' => trans_choice('general.dashboards', 1)]) }}</a>
|
||||
<a href="{{ $landing_page }}" class="btn btn-success header-button-top"><span class="fa fa-tachometer-alt"></span> {{ trans('general.go_to_dashboard') }}</a>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
@ -58,7 +58,7 @@
|
||||
<div class="col-sm-6 text-right">
|
||||
<a href="{{ url('/') }}" id="wizard-skip" class="btn btn-icon btn-success header-button-top">
|
||||
<span class="btn-inner--icon"><i class="fa fa-tachometer-alt"></i></span>
|
||||
<span class="btn-inner--text">{{ trans('general.go_to', ['name' => trans_choice('general.dashboards', 1)]) }}</span>
|
||||
<span class="btn-inner--text">{{ trans('general.go_to_dashboard') }}</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user