Commit Graph
23 Commits
Author SHA1 Message Date
rickyandClaude Opus 5.5 30c1f5181e Clear out expired customer share links
CustomerToken.purge_expired deletes share links that have expired or
whose issue was deleted. It runs whenever a new link is made, so they
don't pile up, and from rake redmine_qbo:purge_customer_tokens for a
manual or scheduled run. Expired links were only ignored before.

Also drops Issue's belongs_to :customer_token: issues have no such
column, so the association could only raise.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 19:51:25 -05:00
rickyandClaude Opus 5.5 0d143e6eb1 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>
2026-11-17 19:48:17 -05:00
ricky 5a31c194a5 Added comments 2026-02-27 23:15:37 -05:00
ricky 208e839e6a Refactor CustomerToken model for improved token management; streamline token generation and expiration handling, and enhance association with issues 2026-02-26 21:05:02 -05:00
ricky b80e1d4e28 loose the hash rocket, use symbol keys 2026-01-29 22:30:59 -05:00
ricky 2aeb3fa028 Updated copyright dates 2026-01-21 20:40:06 -05:00
ricky dac9a7c756 Started Support for Redmine 6 2024-12-12 06:00:36 -05:00
ricky f97d5bc731 Moving fat into CustomerToken 2022-03-12 16:01:13 -05:00
ricky 5d928c486f Getter convenience method for tokens 2022-03-12 00:01:40 -05:00
ricky 24f8be6e80 Drop the Qbo prefix 2022-03-09 21:31:56 -05:00
ricky 30b704c90f Don't generate new customer view token every time 2022-03-07 07:52:17 -05:00
ricky 7cc8a946fd Inital update for redmine 4.0+ compatibility 2022-02-01 20:53:20 -05:00
ricky 5a6b679099 Copyright Update 2017-04-03 22:47:49 -04:00
RageLtMan fcf55bb504 Do not permit OAUTH_CONSUMER_SECRET to be nil
When QBO plugin is not configured, OAUTH_CONSUMER_SECRET can be
nil, and any codepath hitting the model raises a stack trace.

Set a "safe-ish" value here to allow execution in conditions where
QBO plugin is installed, but not yet configured.
2017-01-19 04:02:59 -05:00
ricky 126f4abe0a Update customer_token.rb 2016-09-02 10:52:19 -04:00
ricky 5ec76737b3 Update customer_token.rb 2016-09-02 10:50:32 -04:00
ricky 76a6fce406 Update customer_token.rb 2016-09-02 10:43:50 -04:00
ricky 76bd0d4e08 Update customer_token.rb 2016-09-02 00:04:33 -04:00
ricky b31c3ad550 Update customer_token.rb 2016-09-02 00:02:39 -04:00
ricky af7c1b0130 Update customer_token.rb 2016-09-02 00:00:48 -04:00
ricky e6fee6bd97 Update customer_token.rb 2016-09-01 23:52:39 -04:00
ricky 731b811cfe Update customer_token.rb 2016-09-01 23:48:48 -04:00
ricky 63d969c844 Added Customer Token Model 2016-09-01 23:45:51 -04:00