On 13.05.09 19:10, cvielma wrote: > Hi people! > > Well i think my problem it's very stupid, but i have been more than a week > in it :S > > I want to make a very specialized product, that creates a form view where > the user put some search criteria and then another view that show the > results of a table in a relational database that match the criteria. It's > pretty simple. > > So far, i went through the ZMI and created a database connection (MySQL), > and the ZSQL Method corresponding to the query. Also, i created the > standalone views in the product. > > But i'm really stuck in creating a Zope Database Connection and ZSQL Method. > I followed this: > http://plone.org/documentation/how-to/add-file-system-zsql-method and > http://plone.org/documentation/how-to/move-your-zsql-methods-to-the-filesystem. > > > Of course, also checked: > http://docs.zope.org/zope2/zope2book/source/RelationalDatabases.html. > > Also, i can't create a custom permission to the views (i want that only some > role or group of users to view the form and query results). I have donde > this: > http://plone.org/documentation/how-to/adding-a-custom-permission-to-a-plone-2-5-product
You want to redefine the permissions needed to execute ZSQL methods or something like that? That does not make much sense to me. If you need something different, wrap the original API calls within your own view. setDefaultRoles() can be used to introduce new permissions. Zope 2 permissions must be mapped to a Z3-ish permission within a permissions.zcml file. Look at existing code for examples. -aj
begin:vcard fn:Andreas Jung n:Jung;Andreas org:ZOPYX Ltd. & Co. KG adr;quoted-printable:;;Charlottenstr. 37/1;T=C3=BCbingen;;72070;Germany email;internet:[email protected] title:CEO tel;work:+49-7071-793376 tel;fax:+49-7071-7936840 tel;home:+49-7071-793257 x-mozilla-html:FALSE url:www.zopyx.com version:2.1 end:vcard
_______________________________________________ Product-Developers mailing list [email protected] http://lists.plone.org/mailman/listinfo/product-developers
