include Plugin
- def initialize()
- cfg = Configuration.new()
+ def initialize(cfg)
@db_host = cfg.agendav_dbhost
@db_port = cfg.agendav_dbport
@db_opts = cfg.agendav_dbopts
def describe_domain(domain)
# AgenDAV doesn't have a concept of domains.
- return 'N/A'
+ return domain
end
- def describe_account(account)
- if self.user_exists(account)
- return "Username: #{account}"
+ def describe_user(user)
+ if self.user_exists(user)
+ return "Username: #{user}"
else
return 'User not found'
end
end
- protected;
-
- def user_exists(account)
- ad_users = get_agendav_usernames()
- return ad_users.include?(account)
- end
-
- def get_agendav_usernames()
+ def list_users()
+ #
+ # Produce a list of AgenDAV users. This is public because it's
+ # useful in testing.
+ #
usernames = []
# Just assume PostgreSQL for now.