Commit 857d75a5 authored by Corinna Wiesner's avatar Corinna Wiesner Committed by Douglas Barbosa Alexandre

Exclude guests for trial ultimate licenses too

When a trial ultimate license was the current license, the billable user
count did not exclude guest users. This change will also exclude them if
the ultimate license is for a trial.
parent e20a2ad3
......@@ -157,10 +157,7 @@ module EE
def billable
scope = active.without_bots
License.with_valid_license do |license|
scope = scope.excluding_guests if license.exclude_guests_from_active_count?
end
scope = scope.excluding_guests if License.current&.exclude_guests_from_active_count?
scope
end
......
---
title: Exclude guests for trial ultimate licenses too
merge_request: 54952
author:
type: fixed
......@@ -642,7 +642,7 @@ RSpec.describe User do
context 'without guests' do
before do
license = double('License', exclude_guests_from_active_count?: true, trial?: false)
license = double('License', exclude_guests_from_active_count?: true)
allow(License).to receive(:current) { license }
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment