Allow a poll to be unpublished

Created on 2 April 2019, about 5 years ago
Updated 22 April 2024, 2 months ago

Problem/Motivation

Currently you can only set a poll as active or inactive. However, inactive is not the same as unpublished since in many cases, you still want to be able to view the poll results.

Steps to reproduce

Create a poll and watch how the active flag behaves.

Proposed resolution

  • Add an extra state and update the schema/entity. This should be the one from core entity functionality
  • Update all access handler logic.
  • Add & update tests

Remaining tasks

MR with the points above.

User interface changes

An extra checkbox will be added.

API changes

N/A?

Data model changes

Extra definition in the schema

Original issue summary

It appears that when a poll is closed (i.e. 'active' is unchecked), it is still visible to a plebeian (one that doesn't have an administer poll permission).

I have modified the access handler for Polls to check if the Poll is open and only grant access based on that or the fallback - if they have the administer polls permission.

✨ Feature request
Status

Needs work

Version

2.0

Component

Code

Created by

🇺🇸United States johnsicili Phoenix

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024