Files
discourse/lib/auth
Martin Brennan 8125ffa60a FIX: Stop impersonation session not working with group-based upcoming change (#37655)
Followup 42da6860fd

When the upcoming change for "Impersonate without logout" was added, we
didn't take into account that the "stop impersonation" action would not
work if the Staff enabled option for the upcoming change was used.

This was happening because in the ImpersonateController#destroy action
we werecheckingif  the current user had `impersonate_without_logout`
enabled, but we should be checking if the acting user had that
permission instead (i.e. the original admin not the user they are
impersonating)

c.f.
https://meta.discourse.org/t/new-bug-with-experimental-impersonation-interface/395621
2026-02-10 16:24:31 +10:00
..