Inviting staged users on a site with SSO enabled?

I have a handful of staged users who got deleted (don’t ask) and now am seeking to bring them back. I created them originally by addressing new PMs to them, and thought I could bring them back by inviting them to their message again.

As it turns out, this is not possible now - the invite to message modal only allows entering usernames, not email addresses. I could imagine the ability to invite staged users to a message or topic being a very handy feature to add.

Pretty sure that’s incorrect, we added the ability to invite email addresses a while back.

Specify email address in PM to field

is listed in the #releases notes for the 1.9 release.

1 лайк

Thanks, Jeff. Looks like you are right! I guess I just didn’t wait that fraction of a second it takes for that blue select to pop up. The language maybe could be updated to reflect that email addresses can be entered into this field.

6 лайков

Hmm yes perhaps we can change the copy there to add

Enter the username or email of the person you’d like to invite to this topic

But I am not sure under what conditions email can be added, this text might be used elsewhere, or email-as-target-of-PM might be conditional to trust level… I can’t remember … can you add this to your plate @jomaxro?

5 лайков

@tobiaseigen, I’m having some trouble reproducing this. Looking at the client.en.yml inviting a user to a private message should use the following text, not what you shared a screenshot of.

Invitee’s Email or Username

Any chance you customized the invite_private.email_or_username key? Here’s what I see here on Meta:

maybe this has already been fixed on meta and try? on my site it still looks like my screenshot.

What version of Discourse are you running? Can you confirm that the text is the default (not customized) in /admin/customize/site_texts?q=invite_private.email_or_username

it is the default - so far I have never changed the default text of discourse.

this is the version according to the dashboard: v2.0.0.beta10 +5

screenshot:

1 лайк

And you were definitely inviting a user to a PM, not a topic? Does your site use SSO?

yes, our site uses SSO. and we are indeed inviting a user to a PM.

1 лайк

Ah! You cannot invite a user via email with SSO enabled. That would allow the invited user to bypass SSO.

1 лайк

hmm… but I am doing it already. :slight_smile: it works.

Now I’m even more confused…

…when you invite these users to PMs, they can only participate as a staged user, right? They can’t actually log into the site?

1 лайк

Given that, I’m going to have to defer to @gerhard here. We’re getting into the complexities of SSO and staged users, and I don’t have a SSO-enabled site to test with.

2 лайка

I did some more testing here on my own site and see that the message on the screen is actually correct. It is not possible to invite an email address even if it is (incorrectly) offered in the blue select popup.

But given that we have staged users now I think it should be possible to do this even on SSO sites, the same way it is possible to start a new message to a staged user.

1 лайк

I just came across this issue again now, and had a thought. It’s occurring to me that it’s correct that you cannot invite an email address and create a staged user using the “invite to message” modal. It makes more sense to create the staged user by starting a separate PM to the email address. That way you can give the person some context.

Also, by default it doesn’t make sense to then invite staged user to a message or topic because they are not yet users and so can’t click to accept the invitation. So really this is working as expected.

However, as staff, I often miss the ability to simply add users (staged or not) to existing messages. A staff option on this modal to directly add users to the message, bypassing the invite message and acceptance step, would be handy.

1 лайк

Если я могу высказать своё мнение по этому вопросу, который, как я вижу, обсуждался уже несколько лет

В нашей системе у большинства наших участников уже настроены учётные данные SSO благодаря кукам с нашего основного сайта. Поэтому, если ссылка на сообщение будет отправлена по электронной почте участнику нашей группы, который ещё не заходил в сообщество, он сможет успешно пройти аутентификацию через SSO и получить доступ.

Кажется, я могу отправить ссылку на адрес электронной почты, что почти так же хорошо, но в идеальном мире я хотел бы сделать то, что предлагает здесь @tobiaseigen, — отправлять приглашения без предварительного создания учётной записи пользователя, по крайней мере, когда включён SSO.

Тогда уже задача SSO — корректно обработать появление этого пользователя. Думаю, было бы неплохо добавить флажок в настройках, чтобы отключить эту возможность, если SSO не может с этим справиться…

У нас 3000 участников, но за первые две недели в сообщество зашли только около 600 человек… было бы здорово приглашать тех, на кого мы ссылаемся.

Вы можете просто отправить https://forum.example.com/session/sso в качестве вашего URL-адреса для приглашения.

2 лайка

Спасибо за идею! Однако проблема не в получении URL для отправки людям. Основная ссылка отлично работает с SSO — это очень полезная функция. Я пытаюсь использовать функцию «отправить приглашение» для отправки на адрес электронной почты, как показано здесь:

Однако я использую SSO, поэтому эта функция отключена. Поэтому я получаю только это, что позволяет делиться только с именами пользователей, а не с адресами электронной почты:

В моей системе SSO создала бы учётные записи и автоматически выполнила вход без проблем, но инструмент отключает возможность отправки приглашений.

Вместо этого я делаю следующее, что не так уж плохо: делюсь ссылкой, содержащей их адрес электронной почты. Это не приглашение, но оно запускает письмо с включённой ссылкой, вокруг которой я могу построить сообщение. А когда они нажимают на эту ссылку, вход через SSO должен пройти без проблем.

Меня немного интересует параметр ?u=my.userID в конце полученной ссылки… Я надеюсь, что он связан со сбором статистики совместного использования и не пытается выполнить вход как я.

Да, именно так это и работает, так что вам не о чем беспокоиться.