Skip to main content.
home | support | download

Back to List Archive

Re: Swish-e and authorisation-based document access

From: William M Conlon <bill(at)not-real.tothept.com>
Date: Thu Oct 19 2006 - 23:12:48 GMT
I've been wanting to implement this kind of thing for some time, so  
this got me to at least crack open the perl modules and take a look.

To get properties into the index, one needs to inject a metatag into  
the <head> section fed to swish-e.  Easy enough to do for dynamically  
generated html, but a little trickier with filtered content.  I guess  
we would use

$doc_object->user_data to pass the role/right into a filter, and in  
Pdf2HTML.pm add something like

     my $role = $user_data->{pdf}{role} if ref $user_data eq 'HASH';

And then later:

	$headers = "<meta name=\"role\" content=\"$role\">"

Maybe this could/should be more general, so you could just add a  
metatag for each hash key/value combination.  But you would want to  
be careful about collisions with metadata in the actual document.


On Oct 19, 2006, at 11:26 AM, Peter Karman wrote:

>
>
> Oebe Rombout scribbled on 10/19/06 10:40 AM:
>> Hey,
>>
>> I'm trying to find out if Swish-e is compatible with the rights-based
>> document access that I use in a website.
>>
>> The website works as following:
>> A user can login at the website. Depending on his role/rights he  
>> sees a
>> large list of documents.
>> This list is generated from the database, where the document  
>> filename,
>> -location and content-type is stored. When you want to download a
>> document, you click a link like /download.php?id=3002. This file
>> (download.php) checks if the user is authorised to see/downlaod the
>> document, reads its data from a location higher than the webdir and
>> outputs it with the necessary headers.
>>
>> The location of the documents is NOT direct reachable via http:// and
>> the files are renamed to i.e. 3002.dat. When outputted by
>> download-document it get it's original filename back.
>>
>
> You could certainly do this kind of thing with Swish-e. You'd have  
> to write
> something for -S prog that knows how to flag each document with the  
> appropriate
> roles/rights, and then construct your searches to add the  
> appropriate 'and
> role=foo' stuff to each query.
>
> Swish-e just indexes and retrieves documents. With MetaNames you  
> can add some
> intelligence about word context, but you'd have to construct all  
> the business
> intelligence around the index yourself.
>
> -- 
> Peter Karman  .  http://peknet.com/  .  peter(at)not-real.peknet.com

Bill

William M. Conlon, P.E., Ph.D.
To the Point
345 California Avenue Suite 2
Palo Alto, CA 94306
    vox:  650.327.2175 (direct)
    fax:  650.329.8335
mobile:  650.906.9929
e-mail:  mailto:bill@tothept.com
    web:  http://www.tothept.com
Received on Thu Oct 19 16:12:53 2006