Filtering by 'no tags' doesn't work for staff accounts

While experimenting with tags, I noticed that filtering by the no tags option didn’t work as it was not showing any topics when there were topics without any tags.

After some poking, this seems to happen only for admin/moderator accounts (for users it always works fine), and if allow staff to tag pms = true. I know the option seems to be unrelated, but I reproduced this multiple times in both latest stable and in tests-passed. When the option is off (the default), the filtering by no tags works fine. But with it on, it seems to break it somehow.


Can we repro this @tshenry?


Yep, we can repro right here on Meta:

The above link will have 0 results when viewing as an admin, and a full set of results when viewing incognito as an anon user.

I toggled the allow staff to tag pms setting on Try and confirmed that enabling that setting has something to do with it. With that said, I didn’t find any “ah-ha” moments when doing an initial scan for a connection in the code.


This should fix it.