[Zope3-dev] View permissions

Marius Gedminas mgedmin at b4net.lt
Wed Jan 24 17:57:07 EST 2007


On Mon, Jan 22, 2007 at 05:46:48PM -0500, Jim Fulton wrote:
> I might even hack the TextWidget so I could just do:
> 
>    <adapter
>        factory=".TextWidget"
>        permission="zope.Public"
>        />

+1

> I'd be happy to deprecate the view directive.

+1

Caveats: won't it seem strange to newcomers?  Maybe there is a place for
some sort of a <view> directive that is basically an alias for
<adapter>, and maybe allows you to register a menu item as well?

Also, I'd like a way to specify the adapter name in the adapter class.
Something like

    from zope.interface import implements
    from zope.component import adapts, named

    class MyNamedAdapter(object):
        adapts(IFoo)
        implements(IBar)
        named('myname')

        def __init__(self, context):
            self.context

Also I'd like to have a zope.component.Adapter class that defines

        def __init__(self, context):
            self.context

and does nothing else.  It seems to me that 95% of all adapters have an
__init__ like this.  It is tiring to keep repeating it.

Also, I want a pony.  Ok, not really.

Marius Gedminas
-- 
"I may not understand what I'm installing, but that's not my job. I
just need to click Next, Next, Finish here so I can walk to the next
system and repeat the process"
                -- Anonymous NT Admin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mail.zope.org/pipermail/zope3-dev/attachments/20070125/fb1fbdde/attachment.bin


More information about the Zope3-dev mailing list