Looking for changes on website content https://projet-alice-demo.herokuapp.com/diffs/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
352B

  1. class SiteController < ApplicationController
  2. def login
  3. end
  4. def auth
  5. if params[:username] == ENV["username"] && params[:password] == ENV["password"]
  6. session[:authenticated] = true
  7. redirect_to session[:redirect_to] || diffs_path
  8. else
  9. render :login
  10. end
  11. end
  12. def logout
  13. session[:authenticated] = false
  14. redirect_to :login
  15. end
  16. end