Changed authorize to authorize_user!
Some checks failed
CI / scan_ruby (push) Has been cancelled
CI / scan_js (push) Has been cancelled
CI / lint (push) Has been cancelled
CI / test (push) Has been cancelled

This commit is contained in:
2024-08-25 21:26:35 +02:00
parent abe9267893
commit 0919a26686
7 changed files with 8 additions and 11 deletions

View File

@@ -1,6 +1,6 @@
class ApplicationController < ActionController::Base
before_action :set_current_request_details
before_action :authenticate
before_action :authenticate_user!
private
def current_user
@@ -19,7 +19,7 @@ class ApplicationController < ActionController::Base
end
helper_method :user_signed_in?
def authenticate
def authenticate_user!
unless user_signed_in?
redirect_to sign_in_path
end

View File

@@ -1,5 +1,5 @@
class HomeController < ApplicationController
skip_before_action :authenticate
skip_before_action :authenticate_user!
def index
end
end

View File

@@ -1,6 +1,5 @@
class Identity::EmailVerificationsController < ApplicationController
skip_before_action :authenticate, only: :show
skip_before_action :authenticate_user!, only: :show
before_action :set_user, only: :show
def show

View File

@@ -1,6 +1,5 @@
class Identity::PasswordResetsController < ApplicationController
skip_before_action :authenticate
skip_before_action :authenticate_user!
before_action :set_user, only: %i[ edit update ]
def new

View File

@@ -1,5 +1,5 @@
class RegistrationsController < ApplicationController
skip_before_action :authenticate
skip_before_action :authenticate_user!
def new
@user = User.new

View File

@@ -1,6 +1,5 @@
class SessionsController < ApplicationController
skip_before_action :authenticate, only: %i[ new create ]
skip_before_action :authenticate_user!, only: %i[ new create ]
before_action :set_session, only: :destroy
def index

View File

@@ -1,6 +1,6 @@
class VehiclesController < ApplicationController
before_action :set_vehicle, only: %i[ show edit update destroy ]
skip_before_action :authenticate
skip_before_action :authenticate_user!
# has_many_attached :images