You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In addressing issue #5669, it seemed that this endpoint should only be
called for in inactive case_assignment. If that premise holds, then we
no longer need the `else` conditional that attempts to `render :edit`,
which would actually result in an error since this controller doesn't
support an edit action or view.
That error was surfacing in a spec that had been skipped.
If my hypothesis holds, then we can:
* Disallow access to this endpoint via policy if the case_assignment is
inactive
* Remove the conditional and always toggle :hide_old_contacts if
authorized
* Change policy and request specs accordingly
…nding skipped spec (#5812)
* show_or_hide_contacts endpoint doesn't need to render :edit
In addressing issue #5669, it seemed that this endpoint should only be
called for in inactive case_assignment. If that premise holds, then we
no longer need the `else` conditional that attempts to `render :edit`,
which would actually result in an error since this controller doesn't
support an edit action or view.
That error was surfacing in a spec that had been skipped.
If my hypothesis holds, then we can:
* Disallow access to this endpoint via policy if the case_assignment is
inactive
* Remove the conditional and always toggle :hide_old_contacts if
authorized
* Change policy and request specs accordingly
* Remove unnecessary and confusing CaseAssignmentPolicy#hide_contacts?
H/T @elasticspoon:
#5812 (comment)
* Add CaseAssignment#inactive? helper
Because assignment.inactive? is easier to grok than !assignment.active?
H/T @elasticspoon:
#5812 (comment)
* Amend and use same_org method from ApplicationPolicy
* Use admin_or_supervisor_same_org? from ApplicationPolicy
Fix or remove xit-ignored test in spec/requests/case_assignments_spec.rb:353 'does not toggle contacts visibility'
The text was updated successfully, but these errors were encountered: