ash_authentication_live_session dups
After implementing
Ash.Scope
, it occurred to me that I'm sort of duplicating assignments with current_user
as it's also set via ash_authentication_live_session
. Is this generally just how folks do things for convenient access in the view or should I be deduplicating somehow? I feel like I shouldn't care but it bothers me on some level lol. Thanks!1 Reply
The AA plug helpers predate the existence of Phoenix’s scopes and thus Ash scopes, so we still do it the “old way”. That said, I think I like the idea of tracking both the scope and the current user - for example your scope could be a support user and the current user be a regular user that the support user is helping.