Skip to content

Commit

Permalink
remove extra private method
Browse files Browse the repository at this point in the history
  • Loading branch information
suprjinx committed Sep 6, 2024
1 parent 5d414de commit 49c2eda
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions app/lib/services/domain_ownership_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,13 @@ module Services
class DomainOwnershipService
def authorize!(identity, cert_req)
cert_req.fqdns.each do |fqdn|
domain = get_domain_name(fqdn)
domain = Domain.where(fqdn: fqdn).first
raise AuthError unless domain.present? &&
(domain.owner == identity.subject ||
(domain.group_delegation &&
(domain.groups & identity.groups).any?))
end
nil
end

private

def get_domain_name(fqdn)
Domain.where(fqdn: fqdn).first
end
end
end

0 comments on commit 49c2eda

Please sign in to comment.