mirror of
https://github.com/Retrospring/retrospring.git
synced 2024-11-20 18:29:52 +01:00
added User#can_export?
This commit is contained in:
parent
a13d2443bd
commit
bf64a59649
1 changed files with 4 additions and 0 deletions
|
@ -251,4 +251,8 @@ class User < ActiveRecord::Base
|
||||||
self.update(permanently_banned: false, banned_until: buntil, ban_reason: reason)
|
self.update(permanently_banned: false, banned_until: buntil, ban_reason: reason)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def can_export?
|
||||||
|
!self.export_processing? && !self.export_created_at.nil? && Time.now > self.export_created_at.in(1.week)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue