jointakahe / takahe

An ActivityPub/Fediverse server
BSD 3-Clause "New" or "Revised" License
1.1k stars 83 forks source link

Allow anonymous access to reading public statuses #704

Open pmakholm opened 3 months ago

pmakholm commented 3 months ago

Fixes #702

This allows anonymous access to API methods marked with @scope_required("read:statuses") if Public Timeline is enabled in the configuration.

AstraLuma commented 1 month ago

To work through the design process:

This is the only place that uses has_scope(), but not the only place that uses the token.

The alternative I can think of is introducing a Faux Token for when the user doesn't have one. But I'm worried that'll break other things.

How easy is it to add a test for this situation?