We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 946e705 commit 898254cCopy full SHA for 898254c
app/controllers/tracky_controller.rb
@@ -7,8 +7,7 @@ class TrackyController < ApplicationController
7
helper_method :offset_for_time_zone
8
9
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)
+ return if User.current&.allowed_to_globally?(action: action_name.to_sym, controller: controller_name.to_s)
12
13
render_403(flash: { error: t('timer_sessions.messages.errors.permission.no_access') })
14
end
0 commit comments