Registrar: Allow to view other contacts of domain

This commit is contained in:
Karl Erik Õunapuu 2020-02-12 15:33:22 +02:00
parent bd9c9cd585
commit e50cf7d200
3 changed files with 11 additions and 5 deletions

View file

@ -5,7 +5,8 @@ class Registrant::ContactsController < RegistrantController
skip_authorization_check only: %i[edit update]
def show
@contact = current_user_contacts.find(params[:id])
@contact = domain.contacts.find(params[:id])
@requester_contact = domain.contacts.find_by(ident: current_registrant_user.ident).id
authorize! :read, @contact
end