OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
add a hint why we still do the `reject` and use before_save to ensure extraction
Klaus Zanders16f4338eb082
diff --git a/app/models/enterprise_token.rb b/app/models/enterprise_token.rbindex e92d44607f2..49978f30c96 100644--- a/app/models/enterprise_token.rb+++ b/app/models/enterprise_token.rb@@ -96,6 +96,8 @@ class EnterpriseToken < ApplicationRecordenddef set_active_tokens+ # although we use the `active` scope here, we still need to filter out expired tokens+ # as not all token validity period is extracted into the DBEnterpriseToken.active.order(Arel.sql("created_at DESC"))@@ -122,7 +124,7 @@ class EnterpriseToken < ApplicationRecordvalidate :valid_token_objectvalidate :valid_domain- before_validation :extract_validity_from_token+ before_save :extract_validity_from_tokenbefore_save :clear_current_tokens_cachebefore_destroy :clear_current_tokens_cache