خطأ: إمكانية تعيين المدير رسالة خاصة لمُعدِّل لا يملك صلاحية الوصول إليها

I have noticed what I think is a bug with the Discourse Assign - #117 plugin. It is possible for an admin to assign a PM to a moderator who does not have access to the PM. They are notified, but when they click through to see the PM they cannot see it and get an error.

The answer, it seems to me, should be to add the assignee to the message at the same time, or to display an error to the assigner to let them know the assignee is not in the message and cannot be assigned the message.

This obviously does not affect admins who can see all PMs.

5 إعجابات

I can repro this. An assign notification is generated despite the user not having access to the PM assigned. Same issue occurs in categories with security that mods can’t access.

5 إعجابات

Oh yeah interesting edge case what can we do here @sam?

4 إعجابات

I think a minimum change here is to pop up an error saying moderator has no access to the PM when the admin / mod tries to assign.

This particular edge case will become much less of an edge case when we unlock “assign” to designated groups that are not mods.

4 إعجابات

لقد صادفت هذا مجددًا اليوم - لقد وجدنا أنني قد خصصت العديد من الرسائل لمعدّلي محتوى لا يملكون صلاحية الوصول إليها، وبالتالي لم يتابعوها. أوه، عذرًا.

إعجابَين (2)

يا له من ضحك، هل يمكننا حماية أنفسنا من الأمر أعلاه يا سام بطريقة بسيطة؟

3 إعجابات

حدث هذا الآن، ربما يمكن لـ @Roman متابعة الأمر.

5 إعجابات

لقد فتحت طلب دمج (PR) لفرض قواعد إضافية عند محاولة تعيين موضوع:

  • يجب أن يكون المستخدم الذي سنعيّنه قادرًا على إجراء التعيين.
  • يجب أن يكون لدى المستخدم الذي سنعيّنه حق الوصول إلى الموضوع.

محاولة التعيين إلى أحد هؤلاء المستخدمين ستؤدي إلى رفع خطأ:

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

إليك طلب الدمج:

سأبحث عن شخص لمراجعته قبل دمجه.

6 إعجابات