Skip to content

Commit 898254c

Browse files
Update verify_permissins method
1 parent 946e705 commit 898254c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

app/controllers/tracky_controller.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ class TrackyController < ApplicationController
77
helper_method :offset_for_time_zone
88

99
def verify_permission!
10-
return unless User.current
11-
return if User.current.allowed_to_globally?(action: action_name.to_sym, controller: controller_name.to_s)
10+
return if User.current&.allowed_to_globally?(action: action_name.to_sym, controller: controller_name.to_s)
1211

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

0 commit comments

Comments
 (0)