diff --git a/app/Models/Account.php b/app/Models/Account.php index a3c2b2497503..74611c2d657c 100644 --- a/app/Models/Account.php +++ b/app/Models/Account.php @@ -967,6 +967,14 @@ class Account extends Eloquent return strpos($this->account_key, 'zg4ylmzDkdkPOT8yoKQw9LTWaoZJx7') === 0; } + /** + * @return bool + */ + public function isNinjaOrLicenseAccount() + { + return $this->isNinjaAccount() || $this->account_key == NINJA_LICENSE_ACCOUNT_KEY; + } + /** * @param $plan */ diff --git a/resources/views/accounts/management.blade.php b/resources/views/accounts/management.blade.php index 4b1914023fae..3056cc6a6833 100644 --- a/resources/views/accounts/management.blade.php +++ b/resources/views/accounts/management.blade.php @@ -226,84 +226,86 @@ {!! Former::close() !!} -
-
-

{!! trans('texts.delete_data') !!}

-
-
- {!! Former::open('settings/purge_data')->addClass('purge-data') !!} - {!! Former::actions( - Button::danger(trans('texts.purge_data')) - ->withAttributes(['onclick' => 'showPurgeConfirm()']) - ->appendIcon(Icon::create('trash')) - ->large() - ) !!} -
-
- {{ trans('texts.purge_data_help')}} -
+ @if (! Auth::user()->account->isNinjaOrLicenseAccount()) +
+
+

{!! trans('texts.delete_data') !!}

-
-