Scalr_UI_Request::hasPermissions PHP Method

hasPermissions() public method

Check whether the user has access permissions to the specified object
public hasPermissions ( object $object, boolean | string $modify = null ) : boolean
$object object
$modify boolean | string
return boolean Returns TRUE if the authenticated user has access or FALSE otherwise
    public function hasPermissions($object, $modify = null)
    {
        if (!$object instanceof AccessPermissionsInterface) {
            throw new Scalr_Exception_Core('Object is not an instance of AccessPermissionsInterface');
        }
        return $object->hasAccessPermissions($this->getUser(), $this->getEnvironment(), $modify);
    }