[dev] IMP permissions (maybe?) question

Chuck Hagenbuch chuck at horde.org
Thu Nov 15 15:43:57 UTC 2007


Quoting Michael M Slusarz <slusarz at horde.org>:

> I am currently working on a project that requires the following:
>    * Depending on server status, certain features need to be disabled.
> i.e. the server may fallback into a "read-only" mode, in which a  
> user should only be allowed to read messages - no sending, deleting,  
> moving, copying, etc.

This doesn't sound like a Permissions task to me - the closest thing  
we have to it is the fallback code in some apps and drivers, like the  
Prefs system, for when connecting to the main backend (say a database)  
fails. Having a driver architecture for our IMAP read code would be  
awfully nice for a lot of reasons, and you could put the fallback  
there - perhaps with a hook to force fallback based on something other  
than connection failure.

>    * Also, certain mailbox/messages need to be read-only, but this  
> determination is made dynamically at the time of viewing.  If  
> read-only, the corresponding actions need to not be displayed (I am  
> using Jan's recent 'fixed_folders' addition to lock down these  
> read-only folders from having any folder actions being done to them).

This sounds more like a Permissions task, but permissions would assume  
that the dynamic check is based on data that some user sets explicitly  
- if the determination needs to be on truly dynamic info, then  
something like a hook sounds more appropriate to me.

-chuck


More information about the dev mailing list