require 'prune/prune_plugin'
require 'rm/plugins/davical'
+# Handle the pruning of DAViCal users from its database. This class
+# doesn't need to do anything; by inheriting from {DavicalRm}, we get
+# its {DavicalRm#remove_user} method and that's all we need to prune.
+#
class DavicalPrune < DavicalRm
- #
- # DAViCal only supports Postgres, so even if we ever are
- # database-agnostic, this plugin can't be.
- #
+ # Needed for the magic includers <tt>run()</tt> method.
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 accounts will be pruned anyway.
- return []
- end
-
-
- def get_leftover_accounts(db_accounts)
- # Get a list of all users who have logged in to DAViCal.
- davical_accounts = self.list_users()
- return davical_accounts - db_accounts
- end
-
-
end