Non-admin proposal flow uses Ability, not AdminAbility, so organizers and CFP users could edit proposals but could not create event commercials.
Closes#3143.
Signed-off-by: Mridankan Mandal <xerontitan90@gmail.com>
The home and splash page render a link to the schedule based purely on
the `schedule_public` flag, even when an admin has not yet selected a
schedule or scheduled any events. Following that link rendered the
schedule view, which then failed inside `_carousel.html.haml` because
`@rooms` (and the selected schedule) had no data — a 500 error instead
of a graceful response.
Treat `schedule_public` as an allowance rather than an unchecked
control: introduce `Program#any_published_schedule?` (true only when
the flag is on *and* there is at least one event in a selected
schedule) and use it to decide whether to render the link from the
home and splash pages. The schedule controller now returns 404 when no
event has been scheduled, so bookmarked URLs surface as "not found"
instead of an internal server error.
I think it's a bit overkill to test this line from Admin::VersionsController 30 times.
```
PaperTrail::Version.where(conference_id: @conference.id).accessible_by(current_ability)
```
Let's do it once...
Fails with:
1) Event as an conference organizer create a proposal
Failure/Error: raise ActionController::MissingExactTemplate, message
ActionController::MissingExactTemplate:
Admin::EventsController#new is missing a template for request formats: text/html
re #2975
Fails with:
1) User admin behaves like admin ability edits a user
Failure/Error: raise ActionController::MissingExactTemplate, message
ActionController::MissingExactTemplate:
Admin::UsersController#edit is missing a template for request formats: text/html
re #2975
Setting the default host resolves:
Missing host to link to! Please provide the :host parameter, set
default_url_options[:host], or set :only_path to true
Configuring RSpec to use the default host resolves:
Expected response to be a redirect to <http://test.host/…>
but was a redirect to <http://localhost/…>.
Effective API changes:
- nil serializes to null, not empty string
- dates serialize to IETF RFC 3339 with millisecond precision, not
second precision surrounded by spaces