Access no longer allowed unless signed in. Also hid the nav bar unless signed in.

This commit is contained in:
Ben 2024-04-02 14:37:53 -05:00
parent 0c7d31bac0
commit a2a9e1312b
4 changed files with 8 additions and 5 deletions

View File

@ -19,6 +19,10 @@ version:
reset:
git reset --hard
#This opens a secure shell on test.obdev.io (ssh jcarr@test.obdev.io)
#This opens screen (screen -d) disconnect (screen -a -r) connect
#To copy the database info (scp "filename") found in storage
# gem 'devise'
# bundle install
# rails generate devise:install

View File

@ -1,2 +1,3 @@
class ApplicationController < ActionController::Base
before_action :authenticate_user!
end

View File

@ -4,10 +4,6 @@
<%= link_to "Log in", new_session_path(resource_name), class: "btn btn-link" %>
<% end %>
<%- if devise_mapping.registerable? && controller_name != 'registrations' %>
<%= link_to "Sign up", new_registration_path(resource_name), class: "btn btn-link" %>
<% end %>
<%- if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations' %>
<%= link_to "Forgot your password?", new_password_path(resource_name), class: "btn btn-link" %>
<% end %>

View File

@ -14,7 +14,9 @@
<body class="bg-light-grey">
<%= render 'layouts/navbar' %>
<% if user_signed_in? %>
<%= render 'layouts/navbar' %>
<% end %>
<div class="container mt-4">
<%= yield %>