diff --git a/app/views/shared/_restricted_message.html.erb b/app/views/shared/_restricted_message.html.erb index be1125a..af44fb3 100644 --- a/app/views/shared/_restricted_message.html.erb +++ b/app/views/shared/_restricted_message.html.erb @@ -1,6 +1,8 @@ +<% if current_user.nil? || current_user.guest %> +<% end %> diff --git a/spec/views/data_files/index.html.erb_spec.rb b/spec/views/data_files/index.html.erb_spec.rb index 1ccb31d..6d9aab5 100644 --- a/spec/views/data_files/index.html.erb_spec.rb +++ b/spec/views/data_files/index.html.erb_spec.rb @@ -47,6 +47,11 @@ ]) end + it 'does not show alert banner when logged in' do + render + assert_select 'p', count: 0, text: 'Access to these data files is restricted to currently enrolled/employed members of Princeton University' + end + it 'renders a list of data_files' do render