]> gitweb.michael.orlitzky.com - mailshears.git/blob - lib/prune/plugins/davical.rb
Add a TODO item.
[mailshears.git] / lib / prune / plugins / davical.rb
1 require 'pg'
2
3 require 'prune/prune_plugin'
4 require 'rm/plugins/davical'
5
6 class DavicalPrune < DavicalRm
7 #
8 # DAViCal only supports Postgres, so even if we ever are
9 # database-agnostic, this plugin can't be.
10 #
11 include PrunePlugin
12
13
14 def get_leftover_domains(db_domains)
15 # DAViCal doesn't have a concept of domains. We could parse the
16 # usernames to see what domains are present, but the point is
17 # moot: all leftover accounts will be pruned anyway.
18 return []
19 end
20
21
22 def get_leftover_accounts(db_accounts)
23 # Get a list of all users who have logged in to DAViCal.
24 davical_accounts = self.list_users()
25 return davical_accounts - db_accounts
26 end
27
28
29 end