*** redir has quit IRC | 00:03 | |
*** torkel_ has quit IRC | 00:04 | |
*** redir has joined #zope3-dev | 00:13 | |
*** instantfoo has joined #zope3-dev | 00:13 | |
*** ignas has quit IRC | 00:14 | |
*** benji has quit IRC | 00:22 | |
*** redir has quit IRC | 00:23 | |
*** natea_ has joined #zope3-dev | 00:35 | |
*** Ariel_Calzada has quit IRC | 00:42 | |
*** ksmith99 has joined #zope3-dev | 00:42 | |
*** timte has quit IRC | 00:45 | |
*** malthe has joined #zope3-dev | 00:55 | |
*** norro has quit IRC | 01:00 | |
*** dobee has joined #zope3-dev | 01:10 | |
*** dobee has quit IRC | 01:12 | |
*** schwendinger has joined #zope3-dev | 01:15 | |
*** somethink has quit IRC | 01:20 | |
*** Ariel_Calzada has joined #zope3-dev | 01:29 | |
*** dunny_ has joined #zope3-dev | 01:35 | |
*** schwendinger has quit IRC | 01:37 | |
*** redir has joined #zope3-dev | 01:40 | |
*** redir has quit IRC | 01:41 | |
*** redir has joined #zope3-dev | 01:42 | |
*** redir has joined #zope3-dev | 01:43 | |
*** redir has quit IRC | 01:45 | |
*** redir has joined #zope3-dev | 01:45 | |
*** dunny has quit IRC | 01:46 | |
*** redir has quit IRC | 01:46 | |
*** redir has joined #zope3-dev | 01:46 | |
*** redir has quit IRC | 01:58 | |
*** projekt01 has joined #zope3-dev | 02:01 | |
*** rocky has joined #zope3-dev | 02:04 | |
malthe | is there a way to fall back from an expression in a page template that throws an Unauthorized exception? | 02:04 |
---|---|---|
malthe | I can't seem to avoid getting redirected to the login page | 02:05 |
philiKON | tal:on-error ? | 02:05 |
* malthe googles | 02:05 | |
malthe | philiKON: it's funny, because I'm trying to use the contentratings package by alec mitchell and I wonder how his example template would ever work. | 02:05 |
malthe | as I can see it would never correctly fall back for anonymous users. | 02:06 |
*** ksmith99 has left #zope3-dev | 02:07 | |
malthe | tal:on-error works; I'll write him and ask if he ever tried out his code :-) | 02:10 |
malthe | thanks | 02:10 |
philiKON | np | 02:13 |
*** malthe_ has joined #zope3-dev | 02:33 | |
*** malthe has quit IRC | 02:33 | |
*** pcardune has joined #zope3-dev | 02:36 | |
projekt01 | srichter, ayt? | 02:36 |
projekt01 | can anybody fix the linux tests in zope3recipe and make an egg. I implemented the missing windows support | 02:38 |
*** malthe_ has quit IRC | 02:59 | |
*** projekt01 has quit IRC | 03:10 | |
*** natea_ has quit IRC | 03:15 | |
*** torkel_ has joined #zope3-dev | 03:19 | |
*** jsadjohnson has joined #zope3-dev | 03:29 | |
*** ksmith99 has joined #zope3-dev | 03:40 | |
*** lmiller has joined #zope3-dev | 04:06 | |
*** torkel_ has quit IRC | 04:20 | |
*** natea_ has joined #zope3-dev | 04:25 | |
*** redir has joined #zope3-dev | 04:27 | |
*** redir has quit IRC | 04:28 | |
*** redir has joined #zope3-dev | 04:28 | |
*** redir has quit IRC | 04:37 | |
*** redir has joined #zope3-dev | 04:38 | |
*** redir has quit IRC | 04:39 | |
*** redir has joined #zope3-dev | 04:57 | |
*** ksmith99 has left #zope3-dev | 05:00 | |
*** johnlr1 has joined #zope3-dev | 05:04 | |
*** johnlr has quit IRC | 05:04 | |
*** redir has quit IRC | 05:04 | |
*** natea_ has quit IRC | 05:18 | |
*** philiKON_ has joined #zope3-dev | 06:21 | |
*** pcardune has quit IRC | 06:33 | |
*** philiKON has quit IRC | 06:39 | |
*** natea_ has joined #zope3-dev | 07:09 | |
*** chacha_chaudhry has joined #zope3-dev | 07:13 | |
*** natea_ has quit IRC | 07:33 | |
*** natea_ has joined #zope3-dev | 07:40 | |
*** tarek has quit IRC | 07:41 | |
*** baijum has joined #zope3-dev | 07:43 | |
*** torkel_ has joined #zope3-dev | 08:01 | |
*** deo has joined #zope3-dev | 08:08 | |
*** johnlr1 has quit IRC | 08:14 | |
*** johnlr1 has joined #zope3-dev | 08:14 | |
*** greenman has quit IRC | 08:23 | |
*** natea_ has quit IRC | 08:28 | |
*** d2m has joined #zope3-dev | 08:34 | |
*** natea_ has joined #zope3-dev | 08:36 | |
*** zagy has joined #zope3-dev | 08:45 | |
*** sorin has joined #zope3-dev | 08:49 | |
*** sorin is now known as sorindregan | 08:49 | |
*** torkel_ has quit IRC | 09:00 | |
*** cursor has joined #zope3-dev | 09:01 | |
*** zagy_ has joined #zope3-dev | 09:24 | |
*** zagy has quit IRC | 09:24 | |
*** romanofski has joined #zope3-dev | 09:41 | |
*** schwendinger has joined #zope3-dev | 09:41 | |
romanofski | moin :) | 09:41 |
zagy_ | wiki.zope.org is down? | 09:42 |
*** zagy_ is now known as zagy | 09:42 | |
d2m | zagy: yes, still searching a person with sysadmin rights | 09:52 |
zagy | :/ | 09:52 |
d2m | its a pitty | 09:53 |
markusleist | srichter: Hi, do you know any recipe for z3c.form and (some kind of) references to objects? | 09:54 |
baijum | d2m, is wiki.zope.org hosted by Amaze.nl people ? | 09:55 |
d2m | yes | 09:55 |
d2m | i've already posted to zope-web mailing list | 09:55 |
baijum | did you contacted their admin, I have noted this contact address before: "Bas van der Linden, bas@amaze.nl" | 09:56 |
d2m | no, i've no contact there at all, will send him a message, thanks | 09:56 |
baijum | d2m, thanks | 09:57 |
d2m | hth | 09:59 |
*** sorindregan has quit IRC | 09:59 | |
*** sorin has joined #zope3-dev | 10:00 | |
*** sorin is now known as sorindregan | 10:01 | |
*** pelle_ has joined #zope3-dev | 10:05 | |
*** projekt01 has joined #zope3-dev | 10:13 | |
markusleist | projekt01: moin | 10:15 |
*** pelle_ has quit IRC | 10:23 | |
*** pelle_ has joined #zope3-dev | 10:23 | |
*** Jell-O-Fishi has joined #zope3-dev | 10:24 | |
markusleist | does anyone know a recipe for z3c.form and (some kind of) references to objects? | 10:27 |
*** kleist has joined #zope3-dev | 10:39 | |
*** jfroche has joined #zope3-dev | 10:39 | |
*** jfroche has joined #zope3-dev | 10:39 | |
*** jinty has joined #zope3-dev | 10:39 | |
*** kleist is now known as kleist^lurking | 10:40 | |
*** timte has joined #zope3-dev | 10:51 | |
*** bigkevmcd has joined #zope3-dev | 10:57 | |
bigkevmcd | in' all | 10:57 |
d2m | baijum: bas from amaze.nl restarted the server hosting the wiki, seems like thinks work again now | 10:58 |
baijum | d2m, ok | 10:59 |
projekt01 | Hm, http://download.zope.org/distribution is down. | 11:15 |
d2m | not from here | 11:16 |
baijum | not from here also (India) | 11:17 |
projekt01 | Hm, you are right, periodocly I receive some bytes | 11:18 |
projekt01 | but only two or three bytes per minute | 11:19 |
baijum | projekt01, does your svn access to svn.zope.org woks fine ? | 11:20 |
projekt01 | no there is no response from the svn server | 11:21 |
bigkevmcd | it works fine for me | 11:23 |
projekt01 | probably a WLAN problem here? I'll restart my network things. | 11:24 |
*** projet01_ has joined #zope3-dev | 11:25 | |
*** tarek has joined #zope3-dev | 11:43 | |
*** baijum has quit IRC | 11:43 | |
*** projekt01_ has joined #zope3-dev | 11:43 | |
*** projekt01 has quit IRC | 11:44 | |
*** baijum has joined #zope3-dev | 11:47 | |
*** projekt01 has joined #zope3-dev | 11:48 | |
projekt01 | baijum, that was my WLAN which was slow | 11:58 |
*** projet01_ has quit IRC | 11:59 | |
baijum | projekt01, ah, ok (I asked for svn access because both download.zope.org and svn.zop.org are same machines) | 12:00 |
d2m | mail server is on it too, its name is cvs.zope.org | 12:01 |
baijum | buildobot is also in that machine, I think | 12:01 |
*** projekt01_ has quit IRC | 12:04 | |
*** cursor has quit IRC | 12:06 | |
*** richardkan has joined #zope3-dev | 12:08 | |
*** greenman has joined #zope3-dev | 12:08 | |
*** cursor has joined #zope3-dev | 12:10 | |
*** mkerrin has joined #zope3-dev | 12:13 | |
*** MJ has joined #zope3-dev | 12:15 | |
*** jodok has quit IRC | 12:20 | |
*** mgedmin has joined #zope3-dev | 12:23 | |
*** ignas has joined #zope3-dev | 12:26 | |
*** malthe has joined #zope3-dev | 12:30 | |
projekt01 | baijum, thanks for the info | 12:37 |
baijum | np | 12:43 |
markusleist | projekt01: 2 minutes for an advice? | 13:00 |
*** dunny_ has quit IRC | 13:04 | |
*** chacha_chaudhry has quit IRC | 13:06 | |
*** chacha_chaudhry_ has joined #zope3-dev | 13:06 | |
*** goschtl has joined #zope3-dev | 13:09 | |
*** goschtl has quit IRC | 13:14 | |
*** jodok has joined #zope3-dev | 13:20 | |
*** Aiste has joined #zope3-dev | 13:30 | |
*** junkafarian has joined #zope3-dev | 13:33 | |
*** jodok has quit IRC | 13:33 | |
junkafarian | hi * | 13:35 |
junkafarian | is there a way to restrict permissions to the creator of an object | 13:36 |
junkafarian | ? | 13:36 |
projekt01 | markusleist, yes | 13:36 |
junkafarian | or do i have to write a checker | 13:36 |
markusleist | projekt01: do you know any recipe/docu for z3c.form and (some kind of) references to objects? (some kind of "Select Widget of Object-Ref-Vocab.") | 13:37 |
projekt01 | junkafarian, you can define own permissions and register a view with this permission | 13:37 |
projekt01 | markusleist, I don't understand: reference of objects? | 13:38 |
junkafarian | projekt01: but doesnt that apply to all objects created with that permission by any user | 13:38 |
junkafarian | is there a way to restrict a user from only editing their own objects? | 13:39 |
projekt01 | Ah, yes, then you need to set a local permission, you can deny a principal for a permission on a instance. | 13:39 |
junkafarian | how would i do that? | 13:39 |
projekt01 | There is a adapter ;-) | 13:40 |
* junkafarian loves adapters :D | 13:40 | |
junkafarian | where may i find this adapter? :P | 13:40 |
projekt01 | just found it, IPrincipalPermissionManager | 13:41 |
projekt01 | in zope.app.securitypolicy.interfaces | 13:41 |
junkafarian | cool | 13:41 |
* junkafarian looks into it | 13:41 | |
markusleist | What will be the best method to store a list of (references to) n objects in an other objects attributes and edit this list via z3c.forms? | 13:41 |
markusleist | my usecase: i've implemented an "event-crossbar" which will emit signals to a list of other objects configured in ZODB. | 13:43 |
projekt01 | markusleist, aha, I was thinking you are looking for a buildout recipe. I probably was looking to deep into the eggs. | 13:43 |
projekt01 | markusleist, you need to implement a sequence widget for your list field. | 13:44 |
markusleist | ok | 13:44 |
projekt01 | there is allready a bsic sequence widget implementation, but there is no add and edit view for the sequence widget. | 13:45 |
projekt01 | The zope.app.form does haqave one. I guess we need to implement the same for z3c.form. | 13:45 |
markusleist | there are some implementations of reference storages out there. any recipe for such a list in e.g. formdemo? | 13:45 |
projekt01 | don't use the word recipe for concepts, because we use the name recipe for the builout process ;-) | 13:47 |
markusleist | sorry, my mistake | 13:48 |
projekt01 | Hm, are you looking for a data storage in a form or a field widget? | 13:48 |
projekt01 | There is a dict storage for form data and a field storage, if you asking for that. | 13:49 |
markusleist | no, no data storage: | 13:49 |
markusleist | a list of references to other objects: the browser widget must offer a "chooser for Objects" in form of a list with 'add obj' and 'del obj'-button or a multiple selection box of (titles) of my object list. | 13:52 |
markusleist | ok, refs are data, too - but the referenced objekts will be changed in an own dialog. precise my central object does'n have a list, but a set of refs. to other objs. | 13:55 |
junkafarian | projekt01: so basically i have to create a custom permission per user and attribute that to each object they create? | 13:57 |
junkafarian | sorry for the naivity | 13:58 |
junkafarian | :P | 13:58 |
markusleist | Or should i use a z3c.form-Select-Widget with object-uid in the vocabulary? | 14:01 |
*** tarek has quit IRC | 14:03 | |
markusleist | hmm, should i implement a list of object-uids or a list of "reference to object"? any example or other hint in z3c.form? | 14:05 |
*** malthe has quit IRC | 14:05 | |
*** malthe has joined #zope3-dev | 14:06 | |
*** Newfie2007 has joined #zope3-dev | 14:08 | |
*** jodok has joined #zope3-dev | 14:15 | |
junkafarian | isn't there a more pythonic way to restrict editing an object to the object's creator? | 14:15 |
junkafarian | or does the object only store creation info in the Dublin Core annotations => leading to it not being implemented as base functionality? | 14:17 |
junkafarian | meh i suppose i can just write a condition into the editing methods | 14:18 |
*** jodok has quit IRC | 14:18 | |
*** baijum has quit IRC | 14:20 | |
*** xbeanx has joined #zope3-dev | 14:24 | |
*** baijum has joined #zope3-dev | 14:25 | |
*** ktwilight has quit IRC | 14:29 | |
*** ktwilight has joined #zope3-dev | 14:31 | |
*** cursor has quit IRC | 14:32 | |
markusleist | projekt01: i will try to adapt the DateSelectWidget-example from z3c.formdemo.addressbook to my set of object-uids - thnx. | 14:34 |
*** b52laptop has quit IRC | 14:35 | |
*** b52laptop has joined #zope3-dev | 14:36 | |
*** cursor has joined #zope3-dev | 14:38 | |
*** foxmjay has joined #zope3-dev | 14:39 | |
*** Ariel_Calzada has joined #zope3-dev | 14:41 | |
*** salfield has joined #zope3-dev | 14:46 | |
projekt01 | junkafarian, restrict a method access is Ok, but be aware not forget doing this everywhere you need to. Deny permissions will be a better choice if you need to make sure the user don't have access to the object/attribute at all. | 14:49 |
CrippsFX | first time I've ever seen the NotYet(object) exception ... what does it mean? | 14:54 |
*** tarek has joined #zope3-dev | 14:59 | |
*** niemeyer has joined #zope3-dev | 15:03 | |
junkafarian | projekt01: basically it is a video publishing system and we only want the user that uploaded the video to be able to edit it | 15:14 |
junkafarian | however the container will have lots of videos | 15:15 |
junkafarian | so i dont want to tar the whole folder with a permission that allows any user to edit any video | 15:17 |
dennis_ | crippsfx for me usually that means I am doing something which requires the object to be locatable (have a __parent__ hierarchy) and it doesn't yet (since i just cerated it) | 15:18 |
CrippsFX | dennis_: I see. That makes sense (I couldn't figure that out directly by looking at where NotYet was raised). | 15:20 |
CrippsFX | hm. I guess I'll have to explicitly set the __parent__ then. | 15:20 |
CrippsFX | brb | 15:20 |
srichter | markusleist: what are you looking for with repsect to z3c.form? | 15:20 |
dennis_ | use locate(obj, parent, name) .. from zope.location.location | 15:20 |
CrippsFX | dennis_: kk. will do. | 15:21 |
*** MJ is now known as MJ|lunch | 15:21 | |
dennis_ | (though if you add to a container it should do it already) | 15:21 |
*** jukart has joined #zope3-dev | 15:26 | |
markusleist | srichter: i'm looking for an "object-browser-widget" to refs or uids of objects in ZODB | 15:29 |
markusleist | srichter: now i'm working on my adaption of DateSelectWidget-example from z3c.formdemo.addressbook to my set of object-uids - thnx for the moment / sorry, i have to dive deeper into z3c.form, first | 15:29 |
srichter | there is no object browser widget | 15:29 |
CrippsFX | dennis_: yeah, I figured the __parent__ should already be taken care of because the object is being put into a container ... I don't know why it's not doing it automagically ... but then again, I'm pretty sure this component is one giant hack. | 15:29 |
markusleist | that is my problem | 15:30 |
*** nour1 has joined #zope3-dev | 15:30 | |
srichter | markusleist: the requirements for object/reference widgets are all over the place and not well defined | 15:31 |
dennis_ | cripps if the container itself is an attribute of some object, it does not have __parent__ pointing to the real object, and you get the same effect | 15:31 |
srichter | markusleist: before implementing a reference widget, you first need a reference field | 15:31 |
srichter | markusleist: I think this would make a great third-party package. | 15:31 |
dennis_ | (cripps as opposed to the object itself being a container) | 15:31 |
junkafarian | is there not a way to restrict permissions to an objects creator? :( | 15:32 |
CrippsFX | dennis_: actually ... I've made the container an attribute of a view class ... | 15:32 |
CrippsFX | so that might explain the weird behaviour :) | 15:32 |
dennis_ | view classes have short lifespans, i think | 15:32 |
CrippsFX | dennis_: yep. That's the intention. | 15:32 |
dennis_ | but i dont know what you're tring to do anway :) | 15:33 |
markusleist | srichter; but: all my objects have an uid-attribute, so an multiple-list auf this uids can be used as my "1:n"-relation, or? | 15:33 |
CrippsFX | dennis_: goes words to the effect of: query a database, make a container, display said container and then throw it away so that next time I want to view the data, it's fresh. | 15:33 |
markusleist | there are some implementaions of references in ZODB, right? | 15:33 |
dennis_ | junkafarian look into zope.app.securitypolicy.interfaces, for example IPrincipalRoleManager or IPrincipalPermissionManager | 15:33 |
*** benji has joined #zope3-dev | 15:34 | |
junkafarian | dennis_: but do i have to create a new permission for each user/object? | 15:34 |
dennis_ | cripps so in the update() method you create self.data, and the pagetemplate uses view/data to render ? then i dont know why anything would complain about the NotYet | 15:34 |
dennis_ | junkafarian no, you can have for example mysite.Edit permission, which is NOT granted to any principal by default (or role), and grant it only for that object to a specific principal | 15:35 |
dennis_ | (the owner) | 15:35 |
dennis_ | it's really very flexible, but takes some time to fully appreciate :) | 15:35 |
junkafarian | ah | 15:35 |
junkafarian | ok | 15:35 |
* junkafarian has only been developing on zope for a matter of weeks | 15:36 | |
junkafarian | and is liking it more and more | 15:36 |
dennis_ | junkafarian the IPrincipalPermissionManager grants (or denies) a specific permission to a specific principal, only for that given object (and its children) | 15:36 |
*** nour1 has quit IRC | 15:36 | |
CrippsFX | dennis_: actually, I was doing that in the @form.action() method ... *whistles* | 15:36 |
junkafarian | dennis_: perfect! | 15:37 |
* junkafarian chases it up | 15:37 | |
srichter | markusleist: you can handle this case using a choice field, for which a widget exists | 15:39 |
dennis_ | cripps for forms its a little bit different, i guess, not sure what you're doing anymore :) | 15:39 |
srichter | markusleist: all you have to do it create a vocabulary/source for the choice field | 15:39 |
srichter | markusleist: if you have too many objects to choose from, you might need a custom implementation of a widget for your choice field | 15:40 |
srichter | markusleist: (the default is an option box) | 15:40 |
CrippsFX | dennis_: yeah ... basically, I have two choice widgets that gather information, and I'm creating a container filled with data retrieved from a database (based on the input from the widgets). Once the form is submitted, I want to display the data in the container. | 15:40 |
*** rcrafton has joined #zope3-dev | 15:41 | |
markusleist | srichter: thank you - that's the "simple" way. I will write you an email today. | 15:41 |
CrippsFX | dennis_: thanks to Stephan I got *most* of it figured out. It's just dealing with the errors that had me really confuzzled ;) | 15:41 |
dennis_ | crippsfx wouldn't it be easier to collect the data, and in form.nextURL call a display page with ?argumenta=a&b=b that loads from your database (in the update()) method and displays the info? | 15:42 |
CrippsFX | dennis_: I've no idea how to use form.nextURL when I don't have a view set up for a non-persistent object ... | 15:42 |
dennis_ | you could have display_table_from_sql.html registered for *, which takes arguments and loads and displays the data | 15:43 |
dennis_ | i use sql for most-popular-page ranking etc | 15:44 |
dennis_ | pull the data in a viewlet | 15:44 |
*** jsadjohnson has quit IRC | 15:45 | |
CrippsFX | dennis_: I'm sorry ... do you have an example of a template/function call/registration that I can look at to figure that out? | 15:45 |
*** MJ|lunch is now known as MJ | 15:49 | |
*** malthe has quit IRC | 15:52 | |
*** alga has joined #zope3-dev | 15:53 | |
*** vlado has joined #zope3-dev | 15:54 | |
dennis_ | crippsfx: http://paste.lisp.org/display/45335 | 15:58 |
CrippsFX | dennis_: thanks :) | 16:01 |
*** vlado has quit IRC | 16:03 | |
CrippsFX | dennis_: ahh. That makes a little more sense now. | 16:04 |
*** edgordon has quit IRC | 16:05 | |
*** nerdalert has joined #zope3-dev | 16:25 | |
*** rcrafton has quit IRC | 16:27 | |
*** baijum has quit IRC | 16:32 | |
*** rcrafton has joined #zope3-dev | 16:37 | |
*** Ariel_Calzada has quit IRC | 16:39 | |
*** cursor has quit IRC | 16:42 | |
*** netshade has joined #zope3-dev | 16:52 | |
*** jfroche has quit IRC | 16:54 | |
*** malthe has joined #zope3-dev | 16:56 | |
*** jukart has quit IRC | 16:58 | |
*** lucielejard has joined #zope3-dev | 17:02 | |
*** jfroche has joined #zope3-dev | 17:02 | |
*** greenman has quit IRC | 17:13 | |
*** sorindregan has quit IRC | 17:14 | |
benji | do I recall correctly that someone has written an xmlrpc authentication plugin? | 17:20 |
*** reco has joined #zope3-dev | 17:21 | |
*** greenman has joined #zope3-dev | 17:23 | |
srichter | benji: not that I am aware of | 17:23 |
*** greenman has quit IRC | 17:24 | |
benji | darn | 17:24 |
srichter | benji: but it should be easy enough to write :-) | 17:24 |
benji | slightly less easy than not writing it <wink> | 17:25 |
srichter | benji: btw, do you mean forward the authentication request via XML-RPC somewhere or having a plugin for XML-RPC requests | 17:25 |
benji | the former | 17:25 |
srichter | ok, right, this does not exist | 17:26 |
*** natea_ is now known as natea | 17:27 | |
*** edgordon has joined #zope3-dev | 17:28 | |
*** faassen has joined #zope3-dev | 17:33 | |
*** edgordon has quit IRC | 17:38 | |
*** cursor has joined #zope3-dev | 17:43 | |
*** edgordon has joined #zope3-dev | 17:45 | |
*** pelle__ has joined #zope3-dev | 18:00 | |
*** rocky has quit IRC | 18:01 | |
*** alga has quit IRC | 18:02 | |
*** rocky has joined #zope3-dev | 18:02 | |
*** edgordon has quit IRC | 18:06 | |
*** nathany has joined #zope3-dev | 18:07 | |
*** natea has quit IRC | 18:07 | |
*** foxmjay has quit IRC | 18:09 | |
*** ferrafox has joined #zope3-dev | 18:15 | |
*** zagy has quit IRC | 18:15 | |
*** rocky has joined #zope3-dev | 18:17 | |
*** pelle__ has quit IRC | 18:17 | |
*** pelle_ has quit IRC | 18:17 | |
*** norro has joined #zope3-dev | 18:18 | |
*** pelle_ has joined #zope3-dev | 18:18 | |
dennis_ | what is the best way to make @@absolute_url and zapi.getAbsoluteURL return everything except the http://server:port/ part? I am caching some pages but don't want the server part cached in there, it's enough if it is just an absolute /path/to/document (will getPath() always work?) | 18:18 |
srichter | dennis_: I would implement a derivative of absoluteURL in zope.traversing.browser that excludes the server part and register it as an alternative anme | 18:20 |
dennis_ | sounds reasonable :) | 18:21 |
srichter | maybe call it absolutePath | 18:22 |
dennis_ | am I going to break something by having absolutePaths instead of URLs in my links ? | 18:22 |
srichter | I don't think so | 18:27 |
*** csmiga has joined #zope3-dev | 18:28 | |
*** malthe_ has joined #zope3-dev | 18:29 | |
*** malthe has quit IRC | 18:29 | |
*** zagy has joined #zope3-dev | 18:47 | |
dennis_ | ok that works nicely. thanks :) | 18:48 |
*** pelle_ has quit IRC | 18:50 | |
*** MJ has quit IRC | 18:53 | |
*** jfroche has quit IRC | 18:54 | |
*** timte has quit IRC | 18:57 | |
*** romanofski has quit IRC | 19:13 | |
*** projekt01 has quit IRC | 19:28 | |
*** malthe_ is now known as malthe | 19:29 | |
*** whit has joined #zope3-dev | 19:32 | |
*** pcardune has joined #zope3-dev | 19:32 | |
junkafarian | erm, i need to grant and deny a user permissions on an object when that object is created, however, the user doesnt have permissions to do that :( | 19:33 |
srichter | if you do it programmatically, the security framework is turned off and it can be done | 19:34 |
junkafarian | eg withing the application scripts? | 19:34 |
junkafarian | s/within | 19:34 |
*** RaFromBRC has joined #zope3-dev | 19:35 | |
junkafarian | at the moment it is in a __call__ method of a browser:page | 19:35 |
junkafarian | and it is returning unauthorised | 19:35 |
*** kleist^lurking has left #zope3-dev | 19:35 | |
junkafarian | srichter: ^ | 19:36 |
junkafarian | basically i want the user to get granted the permission to upload a file once they create an object | 19:37 |
junkafarian | and when the file is uploaded i want to remove the permissions again | 19:37 |
srichter | remove the security wrapper of the context | 19:37 |
junkafarian | the security proxy? | 19:37 |
junkafarian | ah | 19:38 |
junkafarian | cool | 19:38 |
srichter | or have a special event listener for "object added event" that hands out the permissions | 19:38 |
srichter | (the latter would be cleaner I think) | 19:38 |
junkafarian | cant i set it up in the object creation script? | 19:38 |
srichter | what script? | 19:39 |
srichter | you mean the add form create() method? | 19:40 |
junkafarian | the add form | 19:40 |
junkafarian | yes | 19:40 |
junkafarian | or is that not secure? | 19:40 |
srichter | that would be a location you can do it too, but the problem there is that you leave business logic within view code, which is a bad idea | 19:40 |
srichter | security is not the problem | 19:40 |
srichter | it's more a separation of concerns issue | 19:40 |
junkafarian | best practice? :P | 19:40 |
junkafarian | cool | 19:41 |
srichter | view code should not contain business logic | 19:41 |
srichter | right ;-) | 19:41 |
junkafarian | makes sense! | 19:41 |
junkafarian | cheers ;) | 19:41 |
srichter | event listeners are very powerful | 19:42 |
srichter | and they allow you to implement policy in a aconfined and well-documented way | 19:42 |
*** fcorrea has joined #zope3-dev | 19:42 | |
*** fcorrea_ has joined #zope3-dev | 19:42 | |
junkafarian | would i implement that within the object container? | 19:43 |
*** fcorrea_ has quit IRC | 19:43 | |
junkafarian | to monitor the creation of new contained objects? | 19:43 |
*** whit has quit IRC | 19:43 | |
srichter | no, you use the event framework :-) | 19:44 |
*** whit has joined #zope3-dev | 19:44 | |
*** malthe has quit IRC | 19:44 | |
*** whit has quit IRC | 19:45 | |
junkafarian | [13:36] junkafarian has only been developing on zope for a matter of weeks | 19:45 |
junkafarian | :P | 19:45 |
*** whit has joined #zope3-dev | 19:45 | |
junkafarian | havent come across that yet :P | 19:45 |
srichter | mmh, try one of the books to read up on it | 19:46 |
*** dunny has joined #zope3-dev | 19:47 | |
*** whit has quit IRC | 19:47 | |
*** chacha_chaudhry_ has quit IRC | 19:54 | |
*** chacha_chaudhry has joined #zope3-dev | 19:54 | |
*** jfroche has joined #zope3-dev | 19:59 | |
*** pbugni has joined #zope3-dev | 20:44 | |
*** cursor has quit IRC | 20:48 | |
*** faassen has quit IRC | 20:53 | |
*** ignas has quit IRC | 20:57 | |
*** fcorrea_ has joined #zope3-dev | 21:06 | |
*** richardkan has quit IRC | 21:07 | |
*** fcorrea has quit IRC | 21:07 | |
*** d2m has quit IRC | 21:13 | |
CrippsFX | would somebody please help me make sense of this traceback: http://www.pastebin.ca/639609 ... from what I gather, __call__() somewhere is not being called with the correct number of arguments, but because of the way the traceback is presented, I can't tell which part of my code is causing this problem. | 21:19 |
bigkevmcd | CrippsFX: my reading of it is that whatever template is, it probably isn't what it should be | 21:20 |
CrippsFX | bigkevmcd: I see. | 21:21 |
CrippsFX | bigkevmcd: ah. I see, yes. That appeared to be the problem. | 21:21 |
*** dunny has quit IRC | 21:22 | |
dennis_ | What is the recommended way for an event handler to get the current principal (I am trying to tag an object revision with the principal id upon modification, currently using queryInteraction(), which works, but maybe isn't the best way) | 21:29 |
*** Newfie2007 has quit IRC | 21:38 | |
*** jinty has quit IRC | 21:46 | |
*** Jell-O-Fishi has quit IRC | 21:49 | |
*** nathany_ has joined #zope3-dev | 21:49 | |
*** junkafarian has quit IRC | 22:00 | |
*** nathany has quit IRC | 22:02 | |
*** zagy has quit IRC | 22:05 | |
*** oferw has joined #zope3-dev | 22:08 | |
*** zagy has joined #zope3-dev | 22:10 | |
*** pelle_ has joined #zope3-dev | 22:12 | |
*** salfield has quit IRC | 22:23 | |
*** zagy_ has joined #zope3-dev | 22:23 | |
*** timte has joined #zope3-dev | 22:24 | |
*** zagy has quit IRC | 22:37 | |
CrippsFX | dennis_, srichter : thanks for the help you guys have been giving me ... after much deliberation and experimentation, I must mention this: the problem I'm having with my current task is not *getting* the information, it's displaying it (i.e. getting a handmade template to render) ... you both mention "the template can now use the data" in your advice to me, but I need to know *how* to get the template to display correctly. Stephan, I'm using | 22:38 |
CrippsFX | the method you gave me, where the event handler takes care of assigning the retrieved data to a view attribute. | 22:38 |
*** greenman has joined #zope3-dev | 22:41 | |
CrippsFX | I'm going home for the night. I'll check the irc logs in the morning. | 22:43 |
dennis_ | you'd have to show the view code and the template | 22:44 |
*** pbugni has quit IRC | 22:52 | |
*** RaFromBRC is now known as RaFromBRC|lunch | 22:53 | |
*** fcorrea has joined #zope3-dev | 22:54 | |
*** fcorrea_ has quit IRC | 22:54 | |
*** oferw_ has joined #zope3-dev | 22:56 | |
*** nathany_ has quit IRC | 23:00 | |
*** nathany__ has joined #zope3-dev | 23:00 | |
*** oferw has quit IRC | 23:12 | |
*** mkerrin has quit IRC | 23:19 | |
*** chacha_chaudhry has quit IRC | 23:23 | |
*** pelle_ has quit IRC | 23:28 | |
*** rocky is now known as rocky|away | 23:37 | |
*** mgedmin has quit IRC | 23:38 | |
srichter | CrippsFX: there are several ways to attach the template | 23:46 |
srichter | (1) assign the ``template`` attribute to the form | 23:46 |
*** oferw_ has quit IRC | 23:46 | |
*** nathany has joined #zope3-dev | 23:48 | |
*** nathany__ has quit IRC | 23:48 | |
*** waa has joined #zope3-dev | 23:54 | |
*** RaFromBRC|lunch is now known as RaFromBRC | 23:58 |
Generated by irclog2html.py 2.15.1 by Marius Gedminas - find it at mg.pov.lt!