Remove orphaned code

* customers#filter_estimates_by_customer and #filter_invoices_by_customer,
  their routes, permission entries and template: they filled an estimate
  dropdown on the old issue form, which is gone.
* Routes with no action: accounts new/create/show/edit/update/destroy
  (only index, Set default and Sync exist) and customers#destroy.
* Unused methods: AuthHelper#require_user, #allowed_to?, #check_permission;
  CustomersController#address_to_s; CustomerToken#expired? and
  .remove_expired_tokens; QboBaseModel#skip_qbo_push?;
  QboDraft.writable_document?; SyncServiceBase#extract_value.
* CustomersController's before_action helpers are private.
* The unused .autocomplete-meta style and 28 unused translation keys.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
rickyandClaude Opus 5.5 committed 2026-11-17 19:48:17 -05:00
1 parent 92f9eb1bc7
commit 0d143e6eb1
11 files changed
+38 -161

No files matched your search

-22
View File
@@ -31,28 +31,6 @@ 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])
return false if project.nil?
User.current.allowed_to?(action, project)
end
def check_permission(permission)
if !allowed_to?(permission)
flash[:error] = t :notice_forbidden
render_403
end
end
def global_check_permission(permission)
if !globaly_allowed_to?(permission)
flash[:error] = t :notice_forbidden