Error: posible que un administrador asigne MP a un moderador sin acceso a los MP

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 Me gusta

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 Me gusta

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

4 Me gusta

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 Me gusta

Hoy he vuelto a toparme con esto: estamos descubriendo que he asignado muchos mensajes a moderadores que no tienen acceso a ellos y, por lo tanto, no los han estado siguiendo. ¡Ups!

2 Me gusta

Jaja, ¿podemos protegernos contra lo anterior de alguna manera sencilla, @sam?

3 Me gusta

Esto ha ocurrido ahora; quizás @Roman pueda darle seguimiento.

5 Me gusta

He abierto un PR para hacer cumplir reglas adicionales al intentar asignar un tema:

  • El usuario al que vamos a asignar debe tener permisos para asignar.
  • El usuario al que vamos a asignar debe tener acceso al tema.

Intentar asignar a uno de estos usuarios generará un error:

Creo que también deberíamos eliminar del modal de asignación los resultados de usuarios sin acceso. Para lograr esto, tendré que ampliar ligeramente la API de búsqueda de usuarios del núcleo.

Aquí está el PR:

Encontraré a alguien para revisarlo antes de fusionarlo.

6 Me gusta