* 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> |
||
|---|---|---|
| .. | ||
| feeds | ||
| attributes_spec.rb | ||
| builder_spec.rb | ||
| creator_spec.rb | ||
| destroyer_spec.rb | ||
| enrich_image_attributes_spec.rb | ||
| feeds_spec.rb | ||
| page_view_updater_spec.rb | ||
| suggest_spec.rb | ||
| suggest_stickies_spec.rb | ||
| updater_spec.rb | ||