public function hasAccess($accessKey, User $user = null)
    {
        if ($user === null) {
            $user = $this->currentUser();
        }

        if (is_array($accessKey)) {
            return $user->hasAnyAccess($accessKey);
        } else {
            return $user->hasAccess($accessKey);
        }
    }
public function hasAccess($accessKey, User $user = null)
    {
        if ($user === null) {
            $user = $this->currentUser();
        }

        if (is_array($accessKey)) {
            return $user->hasAnyAccess($accessKey);
        } else {
            return $user->hasAccess($accessKey);
        }
    }
public function hasAccess ( $ accessKey , User $ user = null ) { if ( $ user === null ) { $ user = $ this -> currentUser ( ) ; } if ( is_array ( $ accessKey ) ) { return $ user -> hasAnyAccess ( $ accessKey ) ; } else { return $ user -> hasAccess ( $ accessKey ) ; } }
Check to see if a user has the access.

@param string|array       $accessKey One or array of permission keys
@param \Subbly\Model\User $user      The User scope (if null, current user is used)

@return bool

@api
Check to see if a user has the access .