Steve Howell
36fd76dc20
refactor: Extract can_view_subscribers().
...
We also remove some needless uses of the calculated
field in the node tests.
2021-04-05 09:52:19 -07:00
Steve Howell
ea972569a3
refactor: Extract stream_data.can_change_permissions().
2021-04-05 09:52:19 -07:00
Steve Howell
b27ff978c7
minor: Extract can_preview() helper.
2021-04-05 09:52:19 -07:00
Steve Howell
93471ed3e4
refactor: Extract can_toggle_subscription(sub).
...
We don't want to rely so much on calculated fields,
and the `should_display_subscription_button` name
is a bit misleading in certain contexts.
2021-04-05 09:52:19 -07:00
Steve Howell
4380fe4eaf
refactor: Extract stream_settings_data.
...
This is mostly a pure code move.
In passing I remove an unneeded call to
update_calculated_fields in the dispatch code,
plus some tests that don't need them.
2021-04-05 09:52:19 -07:00