Fixed that Token.destroy_expired destroys API tokens.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9420 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2012-04-15 15:44:51 +00:00
parent 24c361eb0a
commit c7149f4184
2 changed files with 24 additions and 1 deletions
+1 -1
View File
@@ -34,7 +34,7 @@ class Token < ActiveRecord::Base
# Delete all expired tokens
def self.destroy_expired
Token.delete_all ["action <> 'feeds' AND created_on < ?", Time.now - @@validity_time]
Token.delete_all ["action NOT IN (?) AND created_on < ?", ['feeds', 'api'], Time.now - @@validity_time]
end
private