]> gitweb.michael.orlitzky.com - mailshears.git/blob - lib/prune/plugins/agendav.rb
083a3e42731c6aeb59391b2d96a8387885a77cd6
[mailshears.git] / lib / prune / plugins / agendav.rb
1 require 'pg'
2
3 require 'prune/prune_plugin'
4 require 'rm/plugins/agendav'
5
6 class AgendavPrune < AgendavRm
7
8 include PrunePlugin
9
10 def get_leftover_domains(db_domains)
11 # AgenDAV doesn't have a concept of domains. We could parse the
12 # usernames to see what domains are present, but the point is
13 # moot: all leftover accounts will be pruned anyway.
14 return []
15 end
16
17
18 def get_leftover_accounts(db_accounts)
19 # Get a list of all users who have logged in to AgenDAV.
20 ad_accounts = self.list_users()
21 return ad_accounts - db_accounts
22 end
23
24 end