Skip to content

Commit

Permalink
chore: rename RENEWABLE_CERT_TYPES to RENEWABLE_CERT_TYPES_VIA_API
Browse files Browse the repository at this point in the history
  • Loading branch information
nekrich committed Dec 13, 2023
1 parent eb0db7b commit 5758fa2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions match/lib/match/runner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def update_optional_values_depending_on_storage_type(params)
end
end

RENEWABLE_CERT_TYPES = [:mac_installer_distribution, :development, :distribution, :enterprise]
RENEWABLE_CERT_TYPES_VIA_API = [:mac_installer_distribution, :development, :distribution, :enterprise]

def fetch_certificate(params: nil, renew_expired_certs: false, specific_cert_type: nil)
cert_type = Match.cert_type_sym(specific_cert_type || params[:type])
Expand All @@ -149,7 +149,7 @@ def fetch_certificate(params: nil, renew_expired_certs: false, specific_cert_typ
# Determine if cert is renewable.
# Can't renew developer_id certs with Connect API token. Account holder access is required.
is_authenticated_with_login = Spaceship::ConnectAPI.token.nil?
is_cert_renewable_via_api = RENEWABLE_CERT_TYPES.include?(cert_type)
is_cert_renewable_via_api = RENEWABLE_CERT_TYPES_VIA_API.include?(cert_type)
is_cert_renewable = is_authenticated_with_login || is_cert_renewable_via_api

# Validate existing certificate first.
Expand Down

0 comments on commit 5758fa2

Please sign in to comment.