Invitations should be compatible with SSO

@sam What do you think about this idea? Is it something that’s likely to be added?

We just started our community and are rolling out to a number of different audiences in stages. The first audience is general and doesn’t need to be added to any groups, but our next audience will be a specific group that should get special treatment.

Allowing groups to be specified via SSO is fine, my pref would be for 2 keys

groups: [group1,group2,group3]
remove_groups: [remove1]

That should allow you full fidelity here, should be fairly straightforward to add. We can slot it for 1.7

3 إعجابات

Glad to hear this is something you can support.

The only issue I see with having a remove_groups flag is that I will need to know what groups the user is no longer a member of to remove them. What about supporting three keys:

groups: [group1,group2,group3] # ensure user is only in groups1, group2, and group3

or

add_groups: [group4] # ensure user is in group4
remove_groups: [group2] # ensure user is not in group2

This way, my main app can handle all the logic and Discourse will simply be kept in sync.

4 إعجابات

I think the only way that works is the second one, because otherwise the membership of any group you create through the Discourse UI will have its members removed as they re-log.

The remove groups parameter would then be managed_group_list - user.groups (inventing the terminology of a “sso-managed group” for the sake of this post).

We can revisit that design if the managed groups list gets too big.

That’s the desired behavior for me. I don’t want people managing user groups in the discourse admin. I want our main app to have full control of group memberships.

إعجاب واحد (1)

This is now completed per:

https://github.com/discourse/discourse/commit/3d76ce14219a168bdf85769c5474420951c14253

8 إعجابات

Sorry to re-open this, but I’m trying to make sure I understand what was (or wasn’t) done to solve the use cases presented earlier.

I’m also on SSO. With a Discourse hosted site. We want to have a private forum where we can invite people select people, but unfortunately it’s not tied to a parameter we can identify and pass via SSO.

We want to upload a list of email addresses that, if/when a user signs in for the first time they are auto-added to the group. We are using the domain solution for some groups, but that wouldn’t apply in this case.

It looks like this was discussed, but it’s unclear to me which solution was ultimately chosen. I tested with an email address that was registered in our main userbase, but hadn’t logged into our discourse site to initiate the SSO. When we logged in with that ID the account created but he’s not in the group.

إعجاب واحد (1)

هذه هي الطريقة التي وجدتها لإضافة مستخدمين عبر SSO إلى مجموعة مسبقًا بناءً على قائمة عناوين بريد إلكتروني:

  1. إرسال رسالة خاصة، مع لصق عناوين البريد الإلكتروني في حقل المستلمين (مدعوم منذ أغسطس 2017 [Support for sending PMs to email addresses (#4988) · discourse/discourse@bb3a591 · GitHub]) لإنشاء مستخدمين “مؤقتين”. (احذف الرسالة الخاصة ضمن email_time_window_minutes إذا لم تكن ترغب فعليًا في إرسال أي شيء إلى المستخدمين)
  2. أضف المستخدمين المؤقتين إلى المجموعة، إما:
    • واحدًا تلو الآخر، من صفحة إدارة كل مستخدم
    • أو استخدم “إضافة جماعية إلى المجموعة” في صفحة المجموعة، والصق قائمة عناوين البريد الإلكتروني نفسها

هذا مفيد جدًا عند استيراد قوائم البريد الإلكتروني إلى منتدى عند تفعيل SSO.

(عذرًا على إحياء هذا الموضوع القديم :woman_mage::skull: – يبدو أن السؤال لا يزال مفتوحًا بعد عامين، ولم أتمكن من العثور على هذه النصيحة في أي مكان آخر)

سيكون من الجميل لو أن ميزة دعوة المستخدمين العادية تعمل مع SSO، بحيث يمكن إنجاز ذلك في خطوة واحدة (ولتتمكن المشرفات من القيام بذلك، حيث يبدو حاليًا أن فقط المدراء يمكنهم تنفيذ الخطوة 2).

3 إعجابات

@RyanK / @tobiaseigen أنا متأكد من أن هذا جيد للإغلاق، يجب أن تكون الدعوات الآن متوافقة تمامًا مع تسجيل الدخول الأحادي (SSO)، لقد أحرزنا تقدمًا كبيرًا على مدار العامين الماضيين ويجب أن نكون قادرين على التعامل مع حالتك الأصلية.

إعجابَين (2)

نعم، أعتقد أننا مستعدون للإغلاق. من الممكن جدًا دعوة الأشخاص الذين يسجلون الدخول عبر SSO أو أي طريقة تسجيل دخول أخرى يوفرها الموقع. اعتمادًا على كيفية إعداد الدعوة، يمكن إضافة المستخدم المدعو إلى مجموعات ووضعه في موضوع معين عند تسجيل دخوله. رائع جدًا! :ice_cream:

معظم المناقشات هنا تدور في الواقع حول دعم SSO لإضافة وإزالة مستخدم إلى مجموعات والتي لست ملمًا بها كثيرًا ولا أرى الكثير من الوثائق حولها هنا في meta. يمكن لشخص أكثر إلمامًا كتابة قسم الأسئلة الشائعة حولها لتجميع ما هو معروف عنها. يسمح بإضافة المستخدمين أو إزالتهم من المجموعات عند تسجيل دخولهم عبر SSO، وهو ما لا علاقة له بنظام الدعوة في الواقع.

هذا مثال جيد من @simon لكيفية القيام بذلك باستخدام WordPress: Automatically Adding New Users (from WP integration) To A Group - #4 by simon

ومع ذلك، هناك محاذير، لذا ربما لا يستحق الأمر تشجيع الناس على تنفيذ هذه الطريقة. يجب أن تكون مجموعات Discourse موجودة بالفعل لكي يعمل هذا، ويتطلب من المستخدم تسجيل الخروج وتسجيل الدخول مرة أخرى لتطبيق أي تغييرات على جانب مزود المصادقة.

إعجابَين (2)