department-of-veterans-affairs / va.gov-cms

Editor-centered management for Veteran-centered content.
https://prod.cms.va.gov
GNU General Public License v2.0
99 stars 69 forks source link

"Where should this be listed?" select lists on listing item content types are not filtered by section #12737

Closed laflannery closed 10 months ago

laflannery commented 1 year ago

Describe the defect

Within the CMS, on listing content types (i.e. Event, Story, News Release) there is a dropdown to choose where the story should be listing, which section. However, this dropdown is not filtered according to the section the user has permissions for.

To Reproduce

Steps to reproduce the behavior:

  1. In staging, login as the test user "QA Content Publisher". This user is a Content Publisher and only has access to VA Boston
  2. Create a new node for a story: https://staging.cms.va.gov/node/add/news_story
  3. Click on the "Where should the story be listed?" dropdown.
  4. Note that all VAMCs are displaying, instead of just the one I have access to.

AC / Expected behavior

[ ] Determine if this is intentional behavior or if this should be filtered to only display sections the user has permissions for

Screenshots

image

Additional context

I found this when I was on a meeting with Swirt, he was trying to think of or remember why this may have been architected in this way. He couldn't remember anything off the top of his head but it's definitely something that we maybe want to investigate more and see if there was a reason before changing it.

Team

Please check the team(s) that will do this work.

davidmpickett commented 1 year ago

This definitely seems like a regression. The knowledge base article for stories states:

Using the Where should the story be listed? dropdown, select which site the story should appear on. For example, selecting VA Pittsburgh health care means your story will appear on the VA Pittsburgh’s Stories page. If you only have permission to edit one section, you will only have one option in this dropdown menu.

The training video for adding an event shows this select list being winnowed:

listlist

chri5tia commented 1 year ago

Entity reference (admin/structure/types/manage/news_story/fields/node.news_story.field_listing) to a view content_entity_reference_source (admin/structure/views/view/content_entity_reference_source). May be addressed by changing the view's permissions, which is currently set to published content. I am not sure how/where "the winnower" comes into affect with this, however.

davidmpickett commented 10 months ago

This might be resolved by @omahane's work on #15901

swirtSJW commented 10 months ago

This is closed by https://github.com/department-of-veterans-affairs/va.gov-cms/pull/16663

jilladams commented 10 months ago

Screenshot 2024-01-09 at 4 02 26 PM

Verified.