Facts: Fix displaying charts for anonymous users
Summary:
Charts in the Facts prototype application (e.g. as a Burndown chart on a project's Reports page) remained empty for users not logged in: payload response was a login dialog instead of actual data to render. Thus set shouldAllowPublic() (as for many other Controllers).
Closes T15436
Test Plan:
- As an admin, enable the Facts prototype application.
- As an admin, set "Can Use Application" to "Public" for Projects on http://phorge.localhost/applications/view/PhabricatorProjectApplication/
- As an admin, set "Can Use Application" to "Public" for Facts on http://phorge.localhost/applications/view/PhabricatorFactApplication/
- Go to a project with tasks; select "Reports (Prototype)" in the sidebar
- Both as a logged in and as an anonymous user, check if the charts render.
- Click the View Chart option and both as a logged in and as an anonymous user, check if the charts render at an URI like http://phorge.localhost/fact/chart/a1b2c3d4e5f6/
- As an admin, restrict "Can Use Application" to "Users" for Facts on /applications/view/PhabricatorFactApplication/
- As an anonymous user, check that http://phorge.localhost/fact/chart/a1b2c3d4e5f6/ requires a login now.
- As an anonymous user, check that charts on http://phorge.localhost/project/reports/1/ remain empty boxes (which is not ideal but not a big difference to beforehand).
Reviewers: O1 Blessed Committers, avivey
Reviewed By: O1 Blessed Committers, avivey
Subscribers: avivey, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T15436
Differential Revision: https://we.phorge.it/D25608