Check if current user can delete $status

@param StatusInterface $status

@return boolean
434687
protected function isDeleteGranted(StatusInterface $status)
    {
        return $this->isGranted(ContributionActionInterface::DELETE, $status)
            && $this->get('open_orchestra_backoffice.business_rules_manager')->isGranted(BusinessActionInterface::DELETE, $status);
    }
1242580
public function setStatus($status)
    {
        $status = $status ? self::STATUS_ENABLED : self::STATUS_DISABLED;

        $this->setData('status', $status);
        return $this;
    }
869071
public function setStatus( $status )
	{
		if ( $status == $this->getStatus() ) { return; }

		$this->_values['status'] = (int) $status;
		$this->setModified();
	}
1050420
public function delete(UserInterface $currentUser)
    {
        $request = $this->initHttpRequest($this->account->getApiToken(Token::API_SSO));
        $request->setPath(ApiRequest::PATH_ACCOUNT_DELETED);
        $response = $request->post($currentUser);
        return $this->checkResponse($request, $response);
    }
1369694
public function setStatus($status)
    {
        $statusAttribute = $this->statusAttribute;
        return (is_string($statusAttribute) && !empty($statusAttribute)) ? $this->$statusAttribute = $status : null;
    }
826544
public function set_sslverify($status) {
		if ($status === true) {
			if (isset($this->curlopts[CURLOPT_SSL_VERIFYPEER])) {
				unset($this->curlopts[CURLOPT_SSL_VERIFYPEER]);
			}
		} else {
			$this->curlopts[CURLOPT_SSL_VERIFYPEER] = false;
		}
	}
1176922
public function setStatus($status)
    {
        $allowed_values = array('active', 'paused', 'ready', 'delivered', 'cancelled', 'reverted');
        if ((!in_array($status, $allowed_values))) {
            throw new \InvalidArgumentException("Invalid value for 'status', must be one of 'active', 'paused', 'ready', 'delivered', 'cancelled', 'reverted'");
        }
        $this->container['status'] = $status;

        return $this;
    }
810231
protected function check_read_permission( $status ) {
		if ( true === $status->public ) {
			return true;
		}
		if ( false === $status->internal || 'trash' === $status->name ) {
			$types = get_post_types( array( 'show_in_rest' => true ), 'objects' );
			foreach ( $types as $type ) {
				if ( current_user_can( $type->cap->edit_posts ) ) {
					return true;
				}
			}
		}
		return false;
	}
16339
public function setStatus($name = '', $status = self::START) {
        if ($name != '') {
            if (isset($this->_events[$name])) {
                $this->_events[$name]->setStatus($status);

                return true;
            }
            else {
                return false;
            }
        }
        else {
            return false;
        }
    }
32694
public static function isValid($status)
    {
        switch (strtolower($status)) {
        case strtolower(self::SUSPENDED):
        case strtolower(self::RUNNING):
        return true;

        default:
        return false;
        }
    }
160508
public function validateStatus($status)
    {
        if ($status == self::STATUS_INACTIVE) {
            throw new UserAuthenticationException(ErrorMessages::INACTIVE_ACCOUNT);
        }

        if ($status == self::STATUS_DISABLED) {
            throw new UserAuthenticationException(ErrorMessages::DISABLED_ACCOUNT);
        }
    }
1282795
protected function filterStatus($status)
    {
        if (!is_integer($status) ||
            $status<StatusCode::HTTP_CONTINUE ||
            $status>StatusCode::HTTP_NETWORK_CONNECTION_TIMEOUT_ERROR
        ) {
            throw new InvalidArgumentException('Invalid HTTP status code');
        }

        return $status;
    }
1253455
public function setStatus($status)
    {
        if (!in_array($status, $this->statusList)) {
            throw new \InvalidArgumentException(sprintf('Invalid status for %s.', __CLASS__));
        }
        $this->status = $status;

        return $this;
    }
1053103
public function deleteRole($roleId, $status = Role::STATUS_DEFINED)
    {
        try {
            return $this->innerGateway->deleteRole($roleId, $status);
        } catch (DBALException $e) {
            throw new RuntimeException('Database error', 0, $e);
        } catch (PDOException $e) {
            throw new RuntimeException('Database error', 0, $e);
        }
    }
755266
public function status($status = null)
    {
        if (is_null($status)) {
            unset($this->filters['post_status']);
        } else {
            $this->filters['post_status'] = $status;
        }

        return $this;
    }
912428
public function status($status)
    {
        if (!$this->statusIsNullable || $status !== null) {
            Checkers::checkStatus($status, null);
        }
        $this->status = $status;
        return $this;
    }
492252
protected function canDeleteUser()
    {
        return isset($this->data_user['user_id'])
            && $this->access('user_delete')
            && $this->user->canDelete($this->data_user['user_id']);
    }