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:
|
reset:
|
||||||
git reset --hard
|
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'
|
# gem 'devise'
|
||||||
# bundle install
|
# bundle install
|
||||||
# rails generate devise:install
|
# rails generate devise:install
|
||||||
|
|
|
@ -1,2 +1,3 @@
|
||||||
class ApplicationController < ActionController::Base
|
class ApplicationController < ActionController::Base
|
||||||
|
before_action :authenticate_user!
|
||||||
end
|
end
|
||||||
|
|
|
@ -4,10 +4,6 @@
|
||||||
<%= link_to "Log in", new_session_path(resource_name), class: "btn btn-link" %>
|
<%= link_to "Log in", new_session_path(resource_name), class: "btn btn-link" %>
|
||||||
<% end %>
|
<% 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' %>
|
<%- if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations' %>
|
||||||
<%= link_to "Forgot your password?", new_password_path(resource_name), class: "btn btn-link" %>
|
<%= link_to "Forgot your password?", new_password_path(resource_name), class: "btn btn-link" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -14,7 +14,9 @@
|
||||||
|
|
||||||
<body class="bg-light-grey">
|
<body class="bg-light-grey">
|
||||||
|
|
||||||
|
<% if user_signed_in? %>
|
||||||
<%= render 'layouts/navbar' %>
|
<%= render 'layouts/navbar' %>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
<div class="container mt-4">
|
<div class="container mt-4">
|
||||||
<%= yield %>
|
<%= yield %>
|
||||||
|
|
Loading…
Reference in New Issue