mirror of
https://github.com/discourse/discourse.git
synced 2026-08-03 09:53:24 -05:00
When a tag group is restricted to "admin only" (admins group has `full` permission, everyone has `readonly`), moderators could still see and use these tags. This happens because several routes use `is_staff?` to bypass all permission filtering, treating moderators identically to admins. This commit changes `is_staff?` to `is_admin?`, so that the group permission checks work as intended, and moderators will not be able to see or use tags from "admin"-only tag groups. This affects these locations - Tag picker when creating/editing topics - Tag search and autocomplete - Tag listing pages - Tag group listings