jocosocial / swiftarr

The V3 Twitarr server and templated web interface.
MIT License
17 stars 9 forks source link

Privileged seamail broken in site UI #324

Closed cohoe closed 1 week ago

cohoe commented 1 week ago

Definitely used to work. Probably broke in https://github.com/jocosocial/swiftarr/commit/de60bdae3d1244df92a35689f37711553cf94967. Likely missing passing a parameter somewhere.

Following the links to the TwitarrTeam and Moderator seamail pages returns the list of your personal seamails, not for the foruser.

hendricksond commented 1 week ago

I think I found it. https://github.com/jocosocial/swiftarr/blob/0a39f7e89e13808404109a3747173efb6d3cb98f/Sources/swiftarr/Site/SiteSeamailController.swift#L105

We're calling the API with passThroughQuery: false. The foruser param used for impersonation is a passThrough parameter.

I'm not sure why passThroughQuery: false was added, @challf is there a reason?

challfry commented 1 week ago

There doesn't seem to be any reason for it; removing passthrough would also mess up pagination on that page. Anyway, it's fixed now.