From e458cda14b039a8a26d560b63dceb9f5d8b116b8 Mon Sep 17 00:00:00 2001 From: Kristin Merbach Date: Thu, 28 Oct 2021 09:12:37 -0400 Subject: [PATCH] specify authentication --- app/assets/stylesheets/application.scss | 11 +++++++++++ .../aces/inbound_transfers_controller.rb | 1 + app/controllers/aces/transfers_controller.rb | 1 + app/controllers/application_controller.rb | 1 - app/controllers/reports_controller.rb | 1 + app/views/devise/sessions/new.html.erb | 4 ++-- app/views/layouts/application.html.erb | 16 +++++++--------- app/views/reports/_date_range.html.erb | 4 +++- 8 files changed, 26 insertions(+), 13 deletions(-) diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index d133e83a..5e2f4290 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -1,3 +1,5 @@ +$primary: #215d91; +$half: lighten( $primary, 60% ); @import "bootstrap"; kbd { @@ -24,3 +26,12 @@ kbd { width: 100%; word-wrap: break-word; } + +main { + margin-bottom: 5em; +} + +footer { + background: $half; +} + diff --git a/app/controllers/aces/inbound_transfers_controller.rb b/app/controllers/aces/inbound_transfers_controller.rb index 6a1fd129..b7b68442 100644 --- a/app/controllers/aces/inbound_transfers_controller.rb +++ b/app/controllers/aces/inbound_transfers_controller.rb @@ -3,6 +3,7 @@ module Aces # Transfers from an outside source coming into Enroll class InboundTransfersController < ActionController::Base + before_action :authenticate_user! def show @transfer = Aces::InboundTransfer.find(params[:id]) @failure_status = @transfer.failure.nil? diff --git a/app/controllers/aces/transfers_controller.rb b/app/controllers/aces/transfers_controller.rb index 204a8416..d37bb76f 100644 --- a/app/controllers/aces/transfers_controller.rb +++ b/app/controllers/aces/transfers_controller.rb @@ -3,6 +3,7 @@ module Aces # Transfers from Enroll to outside agency class TransfersController < ActionController::Base + before_action :authenticate_user! def show @transfer = Aces::Transfer.find(params[:id]) @failure_status = @transfer.failure.nil? diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 499cd476..7944f9f9 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -1,5 +1,4 @@ # frozen_string_literal: true class ApplicationController < ActionController::Base - before_action :authenticate_user! end diff --git a/app/controllers/reports_controller.rb b/app/controllers/reports_controller.rb index 91f74813..641e4458 100644 --- a/app/controllers/reports_controller.rb +++ b/app/controllers/reports_controller.rb @@ -2,6 +2,7 @@ # ReportsController provides API access to reports class ReportsController < ApplicationController + before_action :authenticate_user! def events @start_on = start_on || session[:start] || Date.today diff --git a/app/views/devise/sessions/new.html.erb b/app/views/devise/sessions/new.html.erb index 5ede9648..8a458ade 100644 --- a/app/views/devise/sessions/new.html.erb +++ b/app/views/devise/sessions/new.html.erb @@ -18,8 +18,8 @@ <% end %> -
- <%= f.submit "Log in" %> +
+ <%= f.submit "Log in", class: 'btn btn-primary mt-3' %>
<% end %> diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 68ccbc41..e41bda7f 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -11,7 +11,7 @@ -