anchor.diff:  set_settings(Settings) ->
       ns_config:set(saslauthd_auth_settings, Settings).
   
  +authenticate(User, Password) ->
  +    Enabled = ns_config:search_prop(ns_config:latest(), saslauthd_auth_settings, enabled, false),
  +    case Enabled of
  +        false ->
  +            false;
  +        true ->
  +            verify_creds(User, Password)
  +    end.
  +
  +get_role_pre_watson(User) ->
  +    case ns_config:search(saslauthd_auth_settings) of
  +        {value, LDAPCfg} ->
  +            get_role_pre_watson(LDAPCfg, User);
  +        false ->
  +            false
  +    end.
  +
  +get_role_pre_watson(LDAPCfg, User) ->
  +    {_, Admins} = lists:keyfind(admins, 1, LDAPCfg),
  +    {_, RoAdmins} = lists:keyfind(roAdmins, 1, LDAPCfg),
  +    UserB = list_to_binary(User),
  +    IsAdmin = is_list(Admins) andalso lists:member(UserB, Admins),
  +    IsRoAdmin = is_list(RoAdmins) andalso lists:member(UserB, RoAdmins),
  +    if
  +        IsAdmin ->
  +            admin;
  +        IsRoAdmin ->
  +            ro_admin;
  +        Admins =:= asterisk ->
  +            admin;
  +        RoAdmins =:= asterisk ->
  +            ro_admin;
  +        true ->
  +            false
  +    end.
  +
   check(User, Password) ->
       LDAPCfg = build_settings(),
       Enabled = ({enabled, true} =:= lists:keyfind(enabled, 1, LDAPCfg)),
  
positive.code: 
  -export([build_settings/0,
           set_settings/1,
           check/2
          ]).
  
  verify_creds(Username, Password) ->
  
negative.code:         true ->
              case verify_creds(User, Password) of
                  true ->
                      get_role_pre_watson(LDAPCfg, User);
                  Other ->
                      Other
              end
  