public function canEdit(GroupableInterface $post, TokenInterface $token): bool
    {
        $user = $token->getUser();
        if ($post->getAuthor() == $user->getUsername()) {
            return true;
        }

        foreach ($post->getGroups() as $group) {
            if ($this->decision_manager->decide($token, ['GROUP_ROLE_ADMIN'], $group)) {
                return true;
            }
        }

        return false;
    }