IRC log of #zope3-dev for Saturday, 2005-11-19

*** sashav has joined #zope3-dev00:17
*** bradb has left #zope3-dev00:21
*** newnick has left #zope3-dev00:45
*** newnick has joined #zope3-dev00:45
*** newnick has left #zope3-dev00:47
*** zbir has quit IRC00:51
*** natea is now known as natea|powernap00:52
*** sashav has quit IRC00:53
*** GaryPoster has quit IRC01:04
*** alga has joined #zope3-dev01:34
*** zbir_ has joined #zope3-dev01:37
*** Jim7J1AJH has joined #zope3-dev01:44
*** d2m has quit IRC01:53
*** JoaoJoao has joined #zope3-dev01:58
JoaoJoaohello01:58
JoaoJoaoDo I have to do something special in a container type to let the contained object sbe cataloged?02:01
JoaoJoao(I have a TodoList type, which contains TodoItem's, the TodoList is cataloged but not the TodoItem's)02:04
*** philiKON has quit IRC02:07
*** SiggyF has joined #zope3-dev02:20
*** hazmat has joined #zope3-dev02:37
*** ChanServ sets mode: +o hazmat02:37
*** yota has quit IRC02:40
*** Volpe has joined #zope3-dev02:58
VolpeDo permissions work through aquistion? i.e if I have object x and object y (which is on x), and I set a view on y to be public (i.e zope.Public) but everything about x is not public (i.e zope.ManageContent) will I be able to access the view on y or will x's permissions stuff that up ?03:00
VolpeNo one here?03:03
JoaoJoaoI'm here03:04
JoaoJoaoVolpe: I'm new in Zope3, maybe the Zope3 docs have something about it. What I know is that there's little implicit acquisition in Z303:05
VolpeI don't think it is an aquisition problem, I'm really taking stabs in the dark.03:06
VolpeI just have a page template I've declared public, that I can't view unless I authenticate.03:07
JoaoJoaoVolpe: But my guess is that you can't, unless you remove security proxies03:07
JoaoJoaoVolpe: I'm new to Z3, so sorry if I can't help much03:08
Volpesecurity proxies?03:09
*** SiggyF has quit IRC03:10
*** alga has quit IRC03:13
JoaoJoaoVolpe: IANAZ3G (I Am Not A Zope3 Guru), some Z3 guru here could help you better03:19
*** hazmat has quit IRC03:19
JoaoJoaoVolpe: Z3 is suffering from a lack of clear and fluid docs IMHO. It's not that hard, but it's made hard because of such problem03:22
VolpeThe guru's seem to be staying fairly quiet.03:27
VolpePerhaps my question is a really stupid one :\03:27
JoaoJoaoVolpe: They must be busy or even AFK03:28
VolpeI've just set everything in my configure.zcml to permission="zope.Public" and still I have to authenticate.  Something is seriously weird.03:28
JoaoJoaohave you set permissions on y?03:28
JoaoJoaoyou need to set permissions on the attributes too03:29
VolpeYep,03:29
VolpeIn the zcml?03:29
JoaoJoaoyes03:29
VolpeSo if Object X is a container, how can make access to it's contents (i.e y) public?03:30
JoaoJoaohttp://deadbeefbabe.org/paste/217503:31
JoaoJoaothen you set the permissions to the view03:32
VolpeThanks, so the set_schema is the permission for actually changing the object, but the interface is just to access teh object.03:33
JoaoJoaoprecisely03:33
VolpeAhhh, thank you.03:34
JoaoJoaoyou can set permissions on different fields to, I don't remember the syntax but the api docs have it03:34
VolpeI was hoping it was something a little more advanced, so I wouldn't feel so stupid :D03:34
*** zbir has joined #zope3-dev03:35
JoaoJoaoVolpe: It's not stupid ;) Read the docs on the Zope website about Zope3's architecture, it helps a lot03:36
VolpeYeah, I've read the, I just missed that... I guess.03:37
Volpethem*03:37
JoaoJoaoVolpe: Are you a Zope2 developer or you're trying Z3 right now?03:39
VolpeI'm Zope 2 dev03:55
JoaoJoaoFortunately there's Archetypes for Z203:56
VolpeWell I'm trying Z3 right now, but I'm a zope 2 developer :)03:57
*** j1m has quit IRC03:59
*** xenru has quit IRC04:12
*** xenru has joined #zope3-dev04:17
*** GaryPoster has joined #zope3-dev04:25
JoaoJoaoVolpe: So, how are your impressions about Z3 so far?04:39
VolpeIt is much better than z2.04:41
VolpeThough, it's a shame porting z2 stuff involves pretty much rewriting it.04:42
JoaoJoaoVolpe: There's Five too04:42
VolpeFive?04:42
JoaoJoaoYes, Five lets you use Z3 technologies in Z204:42
JoaoJoaoBe sure to check out http://codespeak.net/z3/five/04:43
Volpebut doesn't 2.9 etc have a lot of z3 stuff in it?04:43
JoaoJoaoindeed04:43
JoaoJoaoin fact Z2.9 includes Five04:43
Volpeoh okay. :)04:44
VolpeYeah, I don't think I could convince people at work to switch to z3.  We are to well entrenched in z204:44
JoaoJoaoHow do you use Z2 exactly? Plone, CMF...?04:45
Volpewe don't use either of those.04:45
Volpeall custom products.04:45
Volpe(i.e products written from scratch)04:46
JoaoJoaoThen you should be able to Fiveify (ugly word heheh) your products gradually04:47
VolpeI've been thinking of trying something like that (though I didn't know about five :D)04:48
JoaoJoaoVolpe: The first thing you can do is to use Five views04:49
JoaoJoaonot Five the number of course, Five the product04:49
VolpeWhat do Five views do? are they like Z3 View classes/04:50
JoaoJoaoYes that's what they do04:50
Volpeoh, cool... but how do you get self.context?04:50
JoaoJoaoZope 3 views work in Five, including layers and skins. To make them work however, you need to make a Zope 2 class "traversable". This can be done by using the five:traversable directive in ZCML.04:53
JoaoJoao(shameless copy'n paste from the Five website)04:53
JoaoJoaoI always hated truckloads of code in ZPT templates04:56
Volpehehe, I see that every day.04:57
JoaoJoaoWell, I see Delphi 6 code every day :P05:01
Volpeeek :)05:01
JoaoJoaoI liked this Z3 thing so much I'm willing to help improve it, although I'm no expert05:02
VolpeHeh, yeah I'm going to try and port stuff to z3, and see how it works out.05:03
*** Volpe has quit IRC05:11
*** deo has quit IRC05:45
*** JoaoJoao has quit IRC05:49
*** philiKON has joined #zope3-dev05:56
*** Volpe has joined #zope3-dev05:57
newpers_am i missing something here or is this all that zblog does:  http://img517.imageshack.us/my.php?image=zblog3vw.png06:10
newpers_if so, it needs a new name06:10
*** ChrisW has joined #zope3-dev06:12
zbirNo, that looks about status quo for most of the blogs out there.06:12
zbir;)06:13
ChrisWhey Zac ;-)06:13
zbirhey, Chris06:13
* ChrisW grumbles drunkenly and dozes off...06:14
newpers_zbir: thanks, I just wanted to make sure06:14
zbirthat didn't take long after your arrival06:14
ChrisWwha? me?06:14
zbirnewpers_: I'm being sarky. I don't know zblog from adam06:14
newpers_yes, i recognized that :)06:15
ChrisWwho's adam? ;-)06:16
newpers_i would really like to see more zope3 examples06:16
zbirChrisW: If I knew, I could prolly tell him apart from zblog06:17
ChrisW:-P06:17
zbirany zope 3/sql people aboot?06:17
*** tarek has quit IRC06:18
philiKONzbir, i'm afraid not. usually #z3-base has some (andres, jinty)06:22
zbirta, philiKON06:23
zbirwell, it's not exactly an sql/rdb thing.06:24
philiKONso, what's up?06:24
philiKONhi zbir :)06:24
zbirheya :)06:24
zbirI need to programmatically grant a permission to an object. I'm slamming an interface onto it programmatically via interface.directlyProvides, but that interface on that content class has no permissions, so I'm getting ForbiddenAttribute :\06:25
zbirI'm still learning my way with Z3 best practices, so am a bit like a bull in a china shop, still :)06:26
philiKONhehe06:26
philiKONzbir, why not allow the API of the interface on this class no matter what?06:26
zbirwell, I would but the class is a "GeneratedRowClass" and isn't an actual class class. :\06:27
philiKONhmm06:28
zbirin zope.app.rdb.__init__.py, there's the RowClassFactory function that hands back an instance06:28
zbirso, my zcml attempts to offer up permissions on a combination of a class and this interface that I'll be slamming on instances doesn't have a class to actually find06:29
philiKONhmm, right06:30
zbirso, I've got a row from an RDBMS and I'm trying to get it to accept that it's IPhysicallyLocatable. I've provided all that interface's methods on the result object, it just won't get me access them :)06:31
philiKONusually IPHysicallyLocatable is an adapter06:35
philiKONbut of course, you can have it on the object itself too. then the adaption is a null-adaption06:35
zbirright, that's what I was hoping to allow, and it seems to work, except for the permission thing.06:35
zbirI've also tried not making the directlyProvides assignment, and just returning IPhysicallyLocatable(result), but it still gets caught on the permission.06:36
zbirSeems like it'll work either way, once I allow for IPhysicallyLocatable's methods06:36
philiKONthere's a way you can do this06:38
zbirI guess I could make a wrapper content class just as a means to perform the permission assignment.06:38
philiKONif you make IPhysicallyLocatable an adapter, you can make it a *trusted* adapter06:38
philiKONthat means it'll get an unproxied object06:38
philiKONso, it won't get caught up on ForbiddenAttributeErrors06:38
philiKONin turn you make security assertions about the adapter class06:39
philiKONso that everything's still protected06:39
philiKON(usually, an adapter isn't security proxied because its context is. with trusted adapters it's the other way around)06:39
zbirwhat would I look for in the zope 3 tree to find an example?06:39
philiKONzbir, you got my book?06:39
zbirat the office :06:39
zbir:\06:39
philiKON:(06:40
philiKONi think the IZopeDublinCore stuff is trusted06:40
philiKONanyways, it doesn't really affect your python06:40
philiKONit's a matter of ZCML wiring06:40
philiKONin the <adapter /> directive, you say trusted="true"06:40
zbirsure, just need to see how to wire it all together.06:40
zbircool06:40
philiKONthen you make a <content>...</content> directive about the adapter class06:41
*** ChrisW has quit IRC06:48
zbirwell, I got more than the "System error has occurred." message :)07:06
zbirso that's a start07:07
*** natea|powernap is now known as natea07:09
philiKONzbir :)07:09
newpers_philiKON: what's #z3-base07:09
philiKONchannel of the z3base :)07:10
philiKONhttp://codespeak.net/z307:10
newpers_:)07:10
newpers_doh07:10
philiKONwhere five, sqlos, etc. are developed07:10
zbirbleargh. Well, that just opened the floodgates into even more weirdness. My brain is shot. I'm off to bed. Thanks, philiKON, I appreciate the pointers :)07:13
philiKONok, g'night07:14
*** suse-joe has joined #zope3-dev08:00
newpers_hmm... i just created a slackbuild for zope3 and when i get an error it says it's in /tmp/package-zope/user/python/ZODB/config.py.  that's where i did make install prefix=/tmp/package-zope, which was the temporary directory it used to make the package.  all the files are in /usr/... now.  so it gives me an error in a directory that doesn't exist08:13
newpers_perhaps i didn't something wrong08:13
philiKONnewpers_, what did you do?08:15
newpers_to generate the error?08:15
newpers_or are you saying that what I just said didn't make sense, because I tend to get that a lot08:16
newpers_heh08:16
*** newpers_ is now known as newpers08:17
philiKONwhen i asked you "what did you do", i meant that08:17
philiKONwhat are the steps you took?08:17
newpersall i did was. "runzope"08:17
philiKONno, you didn't08:17
philiKONyou did more08:17
philiKONfrom the beginning, dude08:17
newpersyeah, i'll post that08:17
newpershttp://pastebin.com/43510208:18
newpersthat's my SlackBuild file08:18
newpersi should have been more specific when I said package08:19
* philiKON reads08:19
suse-joeHi! Is there a way of showing what permissions a certain action needs, to debug problems with Roles and Permissions?08:21
philiKONnewpers, can you post the error too?08:22
newpersyeah08:23
philiKONsuse-joe, sort of. the debug skin tells you what permission you're lacking when an Unauthorized error occurs08:23
suse-joeYep, that should help.08:24
suse-joeHow exactly do I use it?08:24
newpersphiliKON: ok, this is for chapter 7 of your book.  i ran it a few weeks ago without any problems.08:25
newpershttp://pastebin.com/43510608:25
newpersbut that was before i reinstalled08:25
philiKONsuse-joe, ++skin++Debug i think08:25
suse-joephiliKON: Thanks! I had tried it lower case ...08:26
philiKONskins are usually upper case08:26
newpersat least I think i remember running it08:28
philiKONIOError: [Errno 11] Resource temporarily unavailable08:29
philiKONmeans it has problems creating Data.fs.lock08:30
newpersphiliKON: ok, sorry for your time.  the problem was that i had another zope process running.  i killed it and everything works now :)08:55
*** sashav has joined #zope3-dev09:47
*** dobee has joined #zope3-dev10:58
*** strichter has joined #zope3-dev11:35
*** srichter has quit IRC11:47
*** d2m has joined #zope3-dev12:10
*** Theuni has joined #zope3-dev12:46
*** agroszer has joined #zope3-dev13:22
*** SiggyF has joined #zope3-dev13:29
*** ChrisW has joined #zope3-dev14:21
*** ChrisW has left #zope3-dev14:21
*** dobee has quit IRC14:22
*** tarek has joined #zope3-dev14:24
*** sashav_ has joined #zope3-dev14:28
*** sashav has quit IRC14:29
*** sashav_ is now known as sashav14:29
*** yota has joined #zope3-dev14:53
*** SiggyF has quit IRC15:16
*** benji_york has joined #zope3-dev15:19
*** benji_york is now known as benji15:21
*** sashav_ has joined #zope3-dev15:27
*** sashav has quit IRC15:28
*** sashav_ is now known as sashav15:28
*** alga has joined #zope3-dev15:31
*** j1m has joined #zope3-dev15:38
suse-joe How can I log in a user programmatically? I am at the end of the registration process for a user and know the passwort and login already, so the user should not have to enter it again ...15:43
*** tarek has quit IRC15:59
*** d2m has quit IRC16:07
j1msuse-joe, if you are using session-based auth, you should be able to write the creds to the session and then redirect.16:29
suse-joeI did this, and it seems to work:16:30
suse-joe            sessionData = ISession(self.request)['zope.app.authentication.browserplugins']16:30
suse-joe            credentials = SessionCredentials(login, password)16:30
suse-joe            sessionData['credentials'] = credentials16:30
suse-joeThat's what you mean, yes?16:30
suse-joeI was looking for a more general solution, but as I am using session-based auth for the application the solution is fine for now.16:31
*** d2m has joined #zope3-dev16:31
suse-joeWell, for basic auth what I want is probably impossible anyway.16:33
benjisuse-joe, for basic auth you might be able to redirect to a url with the credentials: http://user:pass@example.com16:35
*** MJ has quit IRC16:37
suse-joebenji:Yes, but that's far from being secure ;-)16:37
benjino less secure than basic auth :)16:37
*** MJ has joined #zope3-dev16:37
suse-joebenji: Basic auth over https is more secure. Because then the credentials are not in the URL (and logged etc.), but in the encrypted workload.16:38
benjitrue16:38
*** sashav has quit IRC16:57
*** strichter is now known as srichter17:01
*** ChanServ sets mode: +o srichter17:01
*** sashav has joined #zope3-dev17:06
*** j1m has quit IRC17:10
*** MJ has quit IRC17:15
*** MJ has joined #zope3-dev17:17
*** sashav_ has joined #zope3-dev17:24
*** sashav has quit IRC17:24
*** sashav_ is now known as sashav17:24
*** JoaoJoao has joined #zope3-dev17:31
*** JoaoJoao has quit IRC18:07
*** xenru|clone has joined #zope3-dev18:12
*** xenru has quit IRC18:27
*** roym has joined #zope3-dev18:42
roymFolks, I need to store an object reference in my session (am using18:55
roympersistent sessions).  However, since the object (a LocationProxy) is18:55
roymgotten via an adapter, trying to store it yields a "TypeError: not18:55
roympicklable" message. Should I just store the removeAllProxies(obj)18:55
roymreference?18:55
roymOr does every object meant to be stored in a session container need to implement ILocation?18:56
benjiyou should be OK removing the proxy18:58
benjialternatively, you could make the object itself support ILocation and not have to worry about it18:58
*** BjornT has quit IRC19:05
*** sashav_ has joined #zope3-dev19:05
*** tarek has joined #zope3-dev19:07
roymbenji - thanks! (btw, loved your quick-start guide - wish I had read it when I first started out w/z3)19:09
benji:)19:10
roymhmm - I implemented ILocation, but I now get: "TypeError: can't pickle Checker objects"??19:20
roymdoing a type() on the object doesn't indicate it is a "Checker object"19:21
*** sashav has quit IRC19:23
benjiit sounds lik it's security proxied, you'll still have to remove that one :)19:25
roymyes - indeed. thanks.19:26
*** _anguenot has joined #zope3-dev19:41
roymI must be missing something fundamental here:19:44
roym(Pdb) iter.__dict__19:44
roym19:44
roym{'currentId': None, '__Security_checker__':19:44
roym<zope.security.checker.Checker object at 0x414f134c>, 'names':19:44
roym[u'Q01', u'Q02', u'Q03', u'Q04', u'Q05'], 'context': <... at19:44
roym0x4351606c>, '__parent__': <... at 0x4351606c>}19:44
roym19:44
roym(Pdb) iter2 = removeSecurityProxy(iter)19:44
roym(Pdb) iter2.__dict__19:44
roym19:44
roym{'currentId': None, '__Security_checker__':19:44
roym<zope.security.checker.Checker object at 0x414f134c>, 'names':19:44
roym[u'Q01', u'Q02', u'Q03', u'Q04', u'Q05'], 'context': <... at19:44
roym0x4351606c>, '__parent__': <... at 0x4351606c>}19:44
roymIn other words, the __dict__ is identical before and after removeSecurityProxy19:45
* benji is away: I'm busy19:48
*** hazmat has joined #zope3-dev19:55
*** ChanServ sets mode: +o hazmat19:55
*** hazmat has quit IRC20:18
SteveAroym: it isn't security proxied.  instead, it has a __Security_checker__ attribute.  So, del obj['__Security_checker__']21:09
roymSteveA: will do that, thanks... btw - any idea as to what causes a Security_checker attribute to be attached to the object?21:15
SteveAit is a way for the security machinery to say "if this object goes into a subsystem that needs security proxied objects, then here is the checker that you should use for the security proxy"21:23
SteveAso, you should be aware of this if you remove the __Security_checker__ attribute.21:23
SteveAit means "use the checker that is here, rather than looking up what checker to use in the global registry of checkers"21:23
SteveAif you know about adapters, then it is the equivalent of using __conform__ from PEP-246 rather than using the adapter registry21:24
roymSteveA: is it "normal" to have to remove the checker, simply to be able to store the object in a persistent session container?21:30
roymOr is is a case of my having missed a declaration or two in zcml?21:31
*** dobee has joined #zope3-dev21:42
*** efge has joined #zope3-dev21:48
*** agroszer has quit IRC22:00
*** SiggyF has joined #zope3-dev22:01
*** sashav has joined #zope3-dev22:10
suse-joeI want to have objects in a folder automatically named. So I say they should implement "IContainerNamesContainer". That works fine. But now I want to use a different naming scheme, e.g. I have Address objects in an Address folder, and instead of using "Address1", "Address" etc. I want it to use names like "PostCode_City".22:15
suse-joeI see I have to provide a different implementation for INameChooser for that, but what I don't see how exactly I will have to hook that one up, so it is used instead of the default one.22:16
roymsuse-joe: I believe you need to provide an adapter that adapts your folder object to INameChooser. The lookup magic searches for the adapter "closest" to your object.22:20
suse-joeSo I write my own NameChooser and then I do something like this (see below), but replace the "for" with the more specific interface of my Class, yes?22:22
suse-joe  <adapter22:22
suse-joe      provides=".interfaces.INameChooser"22:22
suse-joe      for="zope.app.container.interfaces.IWriteContainer"22:22
suse-joe      factory=".contained.NameChooser"22:22
suse-joe      />22:22
roymcorrect.22:22
suse-joeroym: It seems that the NameChooser is called BEFORE the object is populated with its attributes. So I can't access them to create the name from them :-(22:48
*** dobee has quit IRC23:05
roymsuse-joe: sorry, didn't realize that - maybe someone better versed in this stuff can help.23:16
roymdon't know if this is helpful, but there is a test in: src/zope/app/container/browser/tests/test_adding.py23:17
suse-joeroym: It's not your fault ;-). At least I learned how to hook up the adapter correctly that way. I'm now trying to just change the way the contents are displayed (i.e. display City/Postcode instead of the title) in the contents.pt, so I don't have to care about the id.23:18
*** SiggyF has quit IRC23:19
*** natea has quit IRC23:20
*** natea has joined #zope3-dev23:21
*** sashav has joined #zope3-dev23:29
*** sashav_ has joined #zope3-dev23:43
*** sashav has quit IRC23:43
*** sashav_ is now known as sashav23:43
*** philiKON has quit IRC23:47

Generated by irclog2html.py 2.15.1 by Marius Gedminas - find it at mg.pov.lt!