docbrown/spec/services/articles
Jeremy Friesen cf53758476
Removing Articles::Builder making policy decision (#16536)
* Removing Articles::Builder making policy decision

This change is a refactoring through triangulation.  Given that
`ArticlePolicy#new?` returned true, I'm prepared to assume that calling
`authorize(Article)` in all cases is acceptable.

So to narrow the Builder making a policy decision I renamed the returned
value to reflect what it was actually doing in the logic.  And in
renaming, flipped the polarity of the boolean.  Why the flip?  Because
`needs_authorization == !store_location`.

In consultation with Allison and Jennie, I'm proceeding with a short-cut
to get me unstuck.  That unstuck is namely "I need to ensure that the
articles#new action can go through authorization."

Given that I'll be spending time in the authorization layer, I hope
these noted short-cuts and comments will be useful in future spelunking
efforts regarding authorization.

Closes #16529

* Update app/policies/article_policy.rb

Co-authored-by: Michael Kohl <me@citizen428.net>

* Disabling spec

* Update app/policies/article_policy.rb

Co-authored-by: Dwight Scott <dwight@forem.com>

* Update app/policies/article_policy.rb

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

Co-authored-by: Michael Kohl <me@citizen428.net>
Co-authored-by: Dwight Scott <dwight@forem.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2022-02-14 11:39:22 -05:00
..
feeds Refactoring cached_followed_tags (#16175) 2022-01-24 19:53:48 -05:00
attributes_spec.rb Articles update refactoring (#12913) 2021-03-10 13:08:36 +03:00
builder_spec.rb Removing Articles::Builder making policy decision (#16536) 2022-02-14 11:39:22 -05:00
creator_spec.rb Remove webhooks and related code (#15827) 2021-12-28 10:56:37 +07:00
destroyer_spec.rb Remove webhooks and related code (#15827) 2021-12-28 10:56:37 +07:00
enrich_image_attributes_spec.rb [Quick Fix] Fixed a couple of warnings in specs (#15288) 2021-11-07 22:07:05 +03:00
feeds_spec.rb Fixing blank home page for anonymous/visitor (#15665) 2021-12-03 08:32:02 -05:00
page_view_updater_spec.rb Ensuring we don't track views of author or unpublished (#16143) 2022-01-18 11:23:18 -05:00
suggest_spec.rb Fix app/services' ruby 2.7 kwargs warnings (#13177) 2021-04-01 18:40:50 -04:00
suggest_stickies_spec.rb Refactoring and documenting class (#15849) 2022-01-03 09:30:41 -05:00
updater_spec.rb Remove webhooks and related code (#15827) 2021-12-28 10:56:37 +07:00