[Zope-CMF] More FS Questions...

Kent Polk kent@goathill.org
6 Sep 2001 20:55:20 GMT


On 6 Sep 2001 03:10:01 -0500, Chris Withers wrote:
>> Chris Withers writes:
>>  > On a seperate FS-related question, how do I set permissions on FS-based
> objects?
>>  > Ideally, setting role-permission mappings, local roles and proxy roles
> would be
>>  > ideal.
>>  >
>>  > Is this possible? If not, what would it take to make it possible?
>> External Method's do it....
> 
> Yes, but their state is half-fs and half-odb, I want the role-permission
> mappings, local roles and proxy roles to be CVS-able, which for me means
> they need to be stored on the file system...
> 
> How are other people solving this problem?

I've done it a couple of different ways, which both involve interface
skins.  Still thinking about this one for a better way. Thinking that
another type of sql method needs to be written to really do this.
And if it ever happened, maybe that would be a good time to take
another swipe at another fairly generic datamining product.

I think that something like a dataminer probably shouldn't use ZSQL
methods though, but call the connection directly and this could be
managed by skins.  I did write a test product which established a
subset of connection item possibilities (allowing a single one)
which was established in a fs skin, but could be overridden as a
property for each instance.  It basically iterated over SQLConnectionIDs
and used the appropriate objects referenced by the skinned property
if they existed. I now use that in my proxy client skins to
automatically select a sub-type of proxy -  <dtml-in
"TableProxyIDs('PedSets')">.  If one proxy exists that fits the
bill, it is automatically used.  If not, the proxy client simply
doesn't perform the proxy call. The proxy can still be changed
after the client document is instantiated, and the skins then use
that.

Basically I've embedded sql-method calls into my new document types
as a subclassed CMF Document and the skins set up the default way
to access the sql methods, but through a standardized/filtered
interface.