require 'pg' require 'prune/prune_plugin' require 'rm/plugins/davical' class DavicalPrune < DavicalRm # # DAViCal only supports Postgres, so even if we ever are # database-agnostic, this plugin can't be. # include PrunePlugin def get_leftover_domains(db_domains) # DAViCal doesn't have a concept of domains. We could parse the # usernames to see what domains are present, but the point is # moot: all leftover users will be pruned anyway. return [] end def get_leftover_users(db_users) # Get a list of all users who have logged in to DAViCal. davical_users = self.list_users() return davical_users - db_users end end