[horde] hook for locking a preference

Ben Chavet ben at horde.org
Tue Apr 3 22:31:12 UTC 2007


If it's trivial to determine who is a "science" user, you could add a check
to the prefs.php file.  Something like:

$locked = true;
if (is_science_user()) {
    $locked = false;
}
$_prefs['from_addr'] = array(
    'value' => '',
    'locked' => $locked,
    'shared' => true,
    'type' => 'text',
    'desc' =>  _("Your From: address:")
);


On 4/2/07, Andrew Morgan <morgan at orst.edu> wrote:
>
> I have a simple problem without a simple solution.  I run
> https://webmail.oregonstate.edu which provides webmail services for
> several different IMAP servers on campus.  The major one is our ONID email
> which every person on campus can use.  The other servers belong to various
> departments.
>
> One department has several different email domains that it is
> consolidating onto one IMAP server.  However, I am keeping multiple
> webmail server entries for them in order to "set" the domain.  For
> example, they use "physics.oregonstate.edu", "geo.oregonstate.edu", and
> "math.oregonstate.edu".  All of these email addresses are aliases to
> "science.oregonstate.edu".  Of course, the faculty want to keep their
> "math", "geo", and "physics" email addresses, so we can't just change them
> all over to "user at science.oregonstate.edu".
>
> I have locked the from_addr preference so that our users cannot set their
> own email address, to prevent abuse by students mainly.  It would be great
> if I could allow any of the "science" users to set their from_addr.  Then
> I could consolidate the list of webmail servers as well.
>
> The simple idea is to have a "hook" of some kind that controls whether a
> preference is actually locked.
>
> Is there a way to do this in Horde 3.x?  Have I overlooked another
> solution to this?
>
> Thanks,
>         Andy
> --
> Horde mailing list - Join the hunt: http://horde.org/bounties/#horde
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: horde-unsubscribe at lists.horde.org
>


More information about the horde mailing list