[horde] Conf or pref?

Chris Hastie lists at oak-wood.co.uk
Sat Feb 14 22:43:02 UTC 2009


When should a setting be set as a configuration parameter and when as a
preference?

My particular query relates to the asterisk dialler I'm looking at,
probably to be called Astral. One setting that needs to be taken care of
is the context within the Asterisk dialplan that a call is begun. The
context dictates, amongst other things, what numbers can be called. As
such it seemed to me to be a system admin, not a user decision, so I
originally dealt with it as a config parameter.

It now occurs to me that this probably makes it global to all users, and
that in some situations you may, for example, want some users to place
calls in a context that can only dial national calls, whilst others are
placed in a context that can dial international calls. The obvious way
to allow this seems to be to move the setting to prefs, where it could
potentially be set with a hook.

But this makes setting the module up more complex. It will almost
certainly require editing prefs.php to set the context, as dialplans are
highly variable. The preference would almost always be locked (it's
difficult to imagine why you would want users to be able to set it).

Or can a config value be changed dynamically depending on the user?
Manipulating $conf from _horde_hook_postauthenticate perhaps? If so, is
this a sensible move?

Thanks

-- 
Chris


More information about the horde mailing list