Inviter des utilisateurs mis en scène sur un site avec SSO activé ?

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 « J'aime »

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 « J'aime »

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 « J'aime »

@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 « J'aime »

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 « J'aime »

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

1 « J'aime »

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 « J'aime »

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 « J'aime »

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 « J'aime »

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 « J'aime »

Si je peux partager mon point de vue sur ce sujet, qui semble traîner depuis des années

Dans notre système, la plupart de nos membres disposent déjà de leurs identifiants SSO via les cookies de notre site principal. Ainsi, si un lien vers un message est envoyé par e-mail à un membre de notre groupe qui n’a pas encore rejoint la communauté, l’authentification SSO fonctionnera parfaitement et lui permettra d’accéder à la communauté.

Il semble que je puisse envoyer un lien à une adresse e-mail, ce qui est presque aussi efficace, mais dans un monde idéal, je pourrais faire ce que @tobiaseigen suggère ici : envoyer l’invitation sans créer préalablement un utilisateur, du moins lorsque le SSO est activé.

Ensuite, ce serait au SSO de gérer correctement l’arrivée de cet utilisateur. Je suppose qu’il pourrait être utile d’avoir une case à cocher dans la configuration pour désactiver cette fonctionnalité au cas où le SSO ne pourrait pas la gérer correctement…

Nous avons 3000 membres, mais seulement environ 600 ont exploré la communauté au cours des deux premières semaines… Il serait agréable d’inviter les personnes que nous mentionnons.

Vous pouvez simplement envoyer https://forum.example.com/session/sso en tant que votre URL d’invitation.

2 « J'aime »

Merci pour votre réflexion ! Cependant, le problème ne réside pas dans l’obtention d’une URL à envoyer aux personnes. L’URL principale fonctionne très bien avec SSO… une fonctionnalité très appréciable. Ce que j’essaie de faire, c’est utiliser la fonctionnalité « envoyer une invitation » pour envoyer à une adresse e-mail, comme illustré ici :

Cependant, comme j’utilise SSO, cette fonctionnalité est désactivée. Ainsi, tout ce que j’obtiens est ceci, qui me permet uniquement de partager avec des noms d’utilisateur, et non des adresses e-mail :

Dans mon système, SSO les créerait et les connecterait sans problème, mais l’outil désactive la possibilité d’envoyer l’invitation.

Ce que je fais à la place, ce qui n’est pas trop mal, c’est de partager un lien avec leur adresse e-mail. Ce n’est pas une invitation, mais cela permet au moins de lancer un e-mail avec le lien inclus, autour duquel je peux construire un message. Et lorsqu’ils cliquent sur ce lien, ils devraient se connecter via SSO sans problème.

Je suis un peu curieux à propos du ?u=my.userID à la fin du lien généré… J’espère qu’il est lié à la création de statistiques de partage et qu’il ne tente pas de les connecter en tant que moi.

Oui, c’est exactement ce qu’il fait, donc vous n’avez pas à vous en soucier.