[horde] Locking preferences to a default after Preferences have been written once

Gunnar Wrobel wrobel at horde.org
Wed Jun 29 11:03:20 UTC 2011


Quoting Ralf Lang <lang at b1-systems.de>:

> Am Mittwoch, 29. Juni 2011, 10:30:10 schrieb Gunnar Wrobel:
>> Hi!
>>
>> Is it possible to restore a preferences value on a Horde installation
>> back to a default value for all users even if some users already
>> logged in and modified that preference so that it got stored in the
>> backend? My impression is that this is not possible and the value from
>> the backend will always supersede the locked default. Is that correct
>> or am I doing something wrong?
>>
>> Thanks!
>>
>> Gunnar
>
> The hard way is modifying it directly in the backend
> or running a batch over all users (requires auth driver with listing
> capability ).
>
> Other things spooking around my mind:
>
> - I think pref_hooks are now executed regardless of existing backend values
>   ( How long should the hook be in place, when will user be allowed to
> configure things again?)
>
> - Adding a LoginTask.
>   ( Only changes on user login)
>
> I cannot check this before friday though.

At the moment I just wanted to ensure that it really works as I  
described it and that it is indeed not totally trivial to reset  
preferences to a default which I just didn't see.

I think I would go for a batch operation based on the horde-prefs  
helper I recently added to the Horde_Prefs package. It would need a  
"delete" operation for that. That would allow to avoid hacking the  
backend directly and should ensure a consistent operation.

I didn't tie horde-prefs with the Auth package so far. Might be useful  
as well. Currently the user to operate on needs to be specified as  
command line argument.

Cheers,

Gunnar

>
> --
> Ralf Lang
> Linux Consultant / Developer
>
> B1 Systems GmbH
> Osterfeldstraße 7 / 85088 Vohburg / http://www.b1-systems.de
> GF: Ralph Dehner / Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537
> --
> Horde mailing list
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: horde-unsubscribe at lists.horde.org

-- 
Core Developer
The Horde Project

e: wrobel at horde.org
t: +49 700 6245 0000
w: http://www.horde.org

pgp: 9703 43BE
tweets: http://twitter.com/pardus_de
blog: http://log.pardus.de



More information about the horde mailing list