Skip to content

A voter can enter the voting booth even if the election isn't setup #317

@andreslucena

Description

@andreslucena

Describe the bug

Given that I'm a registered user and there is an Election created and this election is configured with an start_date of yesterday and an end_date of tomorrow, then I can enter to the voting booth even though this Election isn't setup (sent to the BB). It should check if the Election is at least blocked.

The same happens if the election is configured with an end_date of yesterday.

To Reproduce

  1. Sign in as admin
  2. Configure an Election with an start_date of yesterday and an end_date of tomorrow
  3. Go to the frontend view
  4. Click on the "Start voting" button

See that there's a somewhat cryptic modal error that it couldn't find the election

Expected behavior

It should not show the button
It should not allow entering by the URL

Screenshots

Selection_614

Stacktrace

In the console there's this error:

TypeError: (intermediate value).data.election is null

Extra data

  • Decidim Version: 0.28.0.dev

Additional context

No response

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions