Changeset View
Changeset View
Standalone View
Standalone View
src/app/Handlers/Groupware.php
<?php | <?php | ||||
namespace App\Handlers; | namespace App\Handlers; | ||||
use App\Sku; | use App\Sku; | ||||
class Groupware | class Groupware extends \App\Handlers\Base | ||||
{ | { | ||||
public static function entitleableClass() | public static function entitleableClass() | ||||
{ | { | ||||
return \App\User::class; | return \App\User::class; | ||||
} | } | ||||
public static function preReq($entitlement, $user) | public static function preReq($entitlement, $user) | ||||
{ | { | ||||
if (!Sku::find($entitlement->sku_id)->active) { | if (!Sku::find($entitlement->sku_id)->active) { | ||||
\Log::error("Sku not active"); | \Log::error("Sku not active"); | ||||
return false; | return false; | ||||
} | } | ||||
return true; | return true; | ||||
} | } | ||||
} | } |