diff --git a/app/Models/LicenseSeat.php b/app/Models/LicenseSeat.php index ab514c0a58..e86959f152 100755 --- a/app/Models/LicenseSeat.php +++ b/app/Models/LicenseSeat.php @@ -29,6 +29,18 @@ class LicenseSeat extends SnipeModel implements ICompanyableChild return ['asset', 'license']; } + /** + * Determine whether the user should be required to accept the license + * + * @author A. Gianotto + * @since [v4.0] + * @return boolean + */ + public function requireAcceptance() + { + return $this->license->category->require_acceptance; + } + public function getEula() { return $this->license->getEula(); } diff --git a/resources/views/notifications/markdown/checkout-license.blade.php b/resources/views/notifications/markdown/checkout-license.blade.php index f267816be5..f838751125 100644 --- a/resources/views/notifications/markdown/checkout-license.blade.php +++ b/resources/views/notifications/markdown/checkout-license.blade.php @@ -16,7 +16,7 @@ @if (isset($item->category)) | **{{ trans('general.category') }}** | {{ $item->category->name }} | @endif -@if ($target->can('update', $item)) +@if ($target->can('view', $item)) | **Key** | {{ $item->serial }} | @endif @if ($note) diff --git a/resources/views/vendor/mail/html/button.blade.php b/resources/views/vendor/mail/html/button.blade.php index c7aae1b885..bf35c79183 100644 --- a/resources/views/vendor/mail/html/button.blade.php +++ b/resources/views/vendor/mail/html/button.blade.php @@ -7,7 +7,7 @@
- {{ $slot }} + {{ $slot }}