Bug - possible for admin to assign PM to moderator who does not have access to the PM

I opened a PR to enforce additional rules when trying to assign a topic:

  • The user we’re going to assign to must be able to assign.
  • The user we’re going to assign must have access to the topic.

Trying to assign to one of these users will raise an error:

I think we should also remove users without access from the assign modal results. To achieve this, I’ll have to extend the core’s user search API a little bit.

Here’s the PR:

https://github.com/discourse/discourse-assign/pull/46

I’ll find someone to review it before merging.

6 לייקים