]> gitweb.michael.orlitzky.com - mailshears.git/blob - lib/rm/rm_plugin.rb
Remove mv_domain() from MvPlugin.
[mailshears.git] / lib / rm / rm_plugin.rb
1 require 'common/plugin.rb'
2
3 module RmPlugin
4 #
5 # Plugins for the removal of users.
6 #
7
8 extend Plugin::Run
9
10 def self.runner()
11 return RmRunner
12 end
13
14 def self.dummy_runner()
15 return RmDummyRunner
16 end
17
18 def delete_domain(domain)
19 # Delete the given domain. Some plugins don't have a concept of
20 # domains, so just delete all users with a username that looks
21 # like it's in the given domain.
22 usernames = list_domains_users([domain])
23
24 raise NonexistentDomainError.new(domain) if usernames.empty?
25
26 usernames.each do |u|
27 delete_user(u)
28 end
29 end
30
31 def delete_user(user)
32 # Delete the given user.
33 raise NotImplementedError
34 end
35
36 end