Access no longer allowed unless signed in. Also hid the nav bar unless signed in.
This commit is contained in:
parent
0c7d31bac0
commit
a2a9e1312b
4
Makefile
4
Makefile
|
@ -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
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
class ApplicationController < ActionController::Base
|
||||
before_action :authenticate_user!
|
||||
end
|
||||
|
|
|
@ -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 %>
|
||||
|
|
|
@ -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 %>
|
||||
|
|
Loading…
Reference in New Issue