Skip to content

Commit

Permalink
Update verify_permissins method
Browse files Browse the repository at this point in the history
  • Loading branch information
CuddlyBunion341 committed Oct 9, 2024
1 parent 946e705 commit 898254c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions app/controllers/tracky_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ class TrackyController < ApplicationController
helper_method :offset_for_time_zone

def verify_permission!
return unless User.current
return if User.current.allowed_to_globally?(action: action_name.to_sym, controller: controller_name.to_s)
return if User.current&.allowed_to_globally?(action: action_name.to_sym, controller: controller_name.to_s)

render_403(flash: { error: t('timer_sessions.messages.errors.permission.no_access') })
end
Expand Down

0 comments on commit 898254c

Please sign in to comment.