public function isAllowed($module, $privilege): bool
    {
        if ($privilege) {
            $user = Auth::getIdentity();
            return $user && $user->hasPrivilege($module, $privilege);
        }
        return true;
    }
public function isAllowed($module, $privilege): bool
    {
        if ($privilege) {
            $user = Auth::getIdentity();
            return $user && $user->hasPrivilege($module, $privilege);
        }
        return true;
    }
public function isAllowed ( $ module , $ privilege ) : bool { if ( $ privilege ) { $ user = Auth :: getIdentity ( ) ; return $ user && $ user -> hasPrivilege ( $ module , $ privilege ) ; } return true ; }
Check user access by pair module-privilege

@param  string $module
@param  string $privilege

@return bool
Check user access by pair module - privilege