]> gitweb.michael.orlitzky.com - mailshears.git/blob - lib/rm/plugins/dovecot.rb
Add more TODO items and remove the one about YARD docs (coming in a second).
[mailshears.git] / lib / rm / plugins / dovecot.rb
1 # Needed for rm_r.
2 require 'fileutils'
3
4 require 'common/dovecot_plugin'
5 require 'rm/rm_plugin'
6
7 class DovecotRm
8
9 include DovecotPlugin
10 include RmPlugin
11
12
13 def delete_domain(domain)
14 domain_path = self.get_domain_path(domain)
15
16 if not File.directory?(domain_path)
17 raise NonexistentDomainError.new(domain.to_s())
18 end
19
20 FileUtils.rm_r(domain_path)
21 end
22
23 def delete_user(user)
24 user_path = self.get_user_path(user)
25
26 if not File.directory?(user_path)
27 raise NonexistentUserError.new(user.to_s())
28 end
29
30 FileUtils.rm_r(user_path)
31 end
32
33 end