mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2026-11-17 18:20:36 -05:00
Restore AuthHelper#require_user for plugins that still use it
redmine_qbo_vehicles calls before_action :require_user; removing it in the security fixes would break every vehicles page. It now simply requires a logged-in user. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BiwYMjhoQvL7XsKKfRz4pM
This commit is contained in:
1 file changed
+8
@@ -31,6 +31,14 @@ module AuthHelper
|
||||
require_login
|
||||
end
|
||||
|
||||
# Kept for plugins that still call it (e.g. redmine_qbo_vehicles): requires a logged-in user.
|
||||
# The old version effectively never ran; share-link customers use require_login_or_customer_token.
|
||||
def require_user
|
||||
return true if User.current.logged?
|
||||
|
||||
require_login
|
||||
end
|
||||
|
||||
def allowed_to?(action)
|
||||
return false if User.current.nil?
|
||||
project = Project.find_by(id: params[:project_id])
|
||||
|
||||
Reference in new issue
Block a user