[gollem] Read-only access for backends

Vijay Mahrra vijay.mahrra at es.easynet.net
Tue Jun 21 09:39:05 PDT 2005


Hi,

I'm looking to create and submit a patch for Gollem such that a user 
can login, but has just read-only access (no file modification/upload 
features - just downloads) and am unsure as to the best way to tackle 
this problem.

As an example, to add/edit/modify files for vhosts using a file 
backend, the standard backend could be something like this.

    $backends['vhost'] = array(
        'name' => $_SERVER['SERVER_NAME'],
        'driver' => 'file',
        'preferred' => '',
        'params' => array(
            'vfsroot' => '/usr/local/www/vhosts/' . 
$_SERVER['SERVER_NAME'] . '/www-data',
        ),
        'loginparams' => array(),
        'attributes' => array('type', 'name', 'download', 'modified', 
'size', 'permission', 'owner', 'group')
    );

To enable read only access there's a number of options that could be 
implemented, ones that immediately come to mind are:

1) Applying Horde permissions for certain users and checking if they 
have edit/delete when they try to perform certain operations
2) Adding an extra value in the backend (attributes/loginparams) which 
states that the backend is READ_ONLY
3) A combination of the 1 and 2

Obviously we would want to not display widgets/options that don't work 
when rendering the forms on-screen.  Please send any suggestions so I 
can formalise what needs to be done for this to work.

Regards

Vijay




More information about the gollem mailing list