Story #105846070 - ensure that show can also see all the users domains

This commit is contained in:
Matt Farnsworth 2015-12-14 16:02:45 +02:00
parent c8a1ec24dd
commit 13f50dec8c

View file

@ -12,7 +12,7 @@ class Registrant::DomainsController < RegistrantController
def show def show
@domain = Domain.find(params[:id]) @domain = Domain.find(params[:id])
if !(current_user.domains.include?(@domain) || @domain.valid?) if !(domains.include?(@domain) || @domain.valid?)
redirect_to registrant_domains_path redirect_to registrant_domains_path
end end
authorize! :read, @domain authorize! :read, @domain