Filter soft-deleted organizations in OrganizationsFinder
## What
Soft-deleted organizations (`deletion_scheduled` or `deletion_in_progress`) must be invisible to non-admins.
## Implementation plan
Add a `by_active_state` filter step to `app/finders/organizations/organizations_finder.rb`.
```ruby
def filter_organizations(organizations)
organizations
.then { |o| by_user_access(o) }
.then { |o| by_active_state(o) }
.then { |o| by_search(o) }
end
private
def by_active_state(organizations)
# Admins can opt in to see deleted orgs via params[:include_deleted]
return organizations if current_user&.can_admin_all_resources? && params[:include_deleted]
organizations.active
end
```
## Tests
`spec/finders/organizations/organizations_finder_spec.rb`
- `deletion_scheduled` orgs excluded for regular users
- `deletion_scheduled` orgs excluded for admins by default
- `deletion_scheduled` orgs included when `include_deleted: true` for admins
issue