sparcd | ok, I'll have to work it out | 00:03 |
---|---|---|
sparcd | afd_: thanks for your help | 00:03 |
sparcd | oh, one last thing, if I only want logged in people to access 'View', what do I change: <grant permission="zope.View" role="zope.Anonymous" /> to? | 00:04 |
afd_ | sparcd: you could write a pau user source plugin that could know how to look in your site to be able to properly implement its required interface | 00:05 |
sparcd | afd_: yes, that's what I'm thinking | 00:05 |
sparcd | afd_: how do I assign roles to principals from my plugin, do I need another plugin? | 00:05 |
afd_ | there's zope.Authenticated for your view permission question | 00:06 |
afd_ | sparcd: you have two options, from my point of view | 00:06 |
*** pcardune has joined #zope3-dev | 00:06 | |
afd_ | the important interface for you is IPrincipalRoleMap, which maps roles to principals on annotatable objects | 00:07 |
afd_ | so you could make "local" grants of roles to all principals | 00:07 |
sparcd | afd_: that's exactly what I need | 00:07 |
sparcd | so I need my objects in my site to implement IPrincipalRoleMap | 00:08 |
afd_ | or you could override the IPrincipalRoleMap adapter to compute a set of roles that are returned when an object is interogated for security settings | 00:08 |
sparcd | afd_: yes, overriding the adaptor sounds better | 00:08 |
afd_ | there's not much needed for IPrincipalRoleMap, all annotatable objects are adaptable to that interface, I think | 00:08 |
afd_ | so it could be just need to make your persistent objects adaptable | 00:09 |
sparcd | afd_: this is all great and really helped me get on with my work | 00:09 |
afd_ | :) | 00:09 |
sparcd | but for the moment I need to give explicit view permission to my users as I've changed the security of 'View' and I can't login now | 00:10 |
afd_ | just grant the View to authenticated users | 00:11 |
afd_ | from zcml | 00:11 |
*** J1m has joined #zope3-dev | 00:11 | |
sparcd | afd_: I have <role id="zope.Authenticated" title="Authenticated users" /> | 00:11 |
sparcd | and <grant permission="zope.View" role="zope.Authenticated" /> | 00:11 |
*** junkafarian has joined #zope3-dev | 00:11 | |
afd_ | sparcd: I think should be <authenticatedGroup id="zope.Authenticated" /> | 00:12 |
afd_ | look in svn.zope.org/Zope3/trunk/zopeskel/etc | 00:12 |
sparcd | I get a ValueError: ('Undefined role id', 'zope.Authenticated') | 00:12 |
sparcd | and I have the autheticatedGroup bit | 00:13 |
afd_ | the order in which these declaration are read is important | 00:14 |
sparcd | I have on one line: <authenticatedGroup id="zope.Authenticated" title="Authenticated Users" /> | 00:14 |
sparcd | and on the next <grant permission="zope.View" role="zope.Authenticated" /> | 00:14 |
sparcd | and I get exceptions.ValueError: ('Undefined role id', 'zope.Authenticated') | 00:15 |
sparcd | is it because it's not a role? it's a group? | 00:16 |
afd_ | are you sure it's from the grant line? does it work if you take out that line? | 00:17 |
sparcd | <grant permission="zope.View" role="zope.Authenticated" /> if I take out this line, then I still can't log in (but can as manager) | 00:18 |
sparcd | if I leave it in, the zope instance doesn't start | 00:18 |
sparcd | zope.Anonymous works, but that's a role | 00:18 |
afd_ | try with <grant permission="zope.View" principal="zope.Authenticated" /> | 00:20 |
sparcd | afd_: it now starts up, but now I get a browser login popup when I visit my new site, and the username/password doesn't exist | 00:22 |
afd_ | maybe you didn't activate the plugins in pau | 00:23 |
sparcd | yes, they work fine if I allow Anonymous to zope.View | 00:23 |
*** regebro has quit IRC | 00:24 | |
afd_ | the idea is that the pau has activated and deactived plugins | 00:24 |
*** basti__ has quit IRC | 00:25 | |
afd_ | when you add a new user source, for example, you need to add it to pau's list of plugins | 00:25 |
afd_ | I have to go... maybe tomorrow, if you still have problems | 00:25 |
sparcd | afd_: I have done this, if I grant 'View' to anonymous, the login form works and I can log in using my new account | 00:25 |
afd_ | http://apidoc.zope.org/++apidoc++/ with the Book is your help | 00:25 |
sparcd | which Book? | 00:25 |
*** junkafarian_ has quit IRC | 00:26 | |
*** sparcd has left #zope3-dev | 00:26 | |
*** jhauser has quit IRC | 00:30 | |
*** tiredbones has quit IRC | 00:32 | |
*** J1m has quit IRC | 00:33 | |
*** junkafarian has quit IRC | 00:34 | |
*** JaRoel|4D has quit IRC | 00:44 | |
*** hazmat has quit IRC | 00:47 | |
*** afd_ has quit IRC | 00:48 | |
*** hazmat has joined #zope3-dev | 00:52 | |
*** ChanServ sets mode: +o hazmat | 00:52 | |
*** elro_ has quit IRC | 00:57 | |
*** malthe|away is now known as malthe|Zzz | 00:58 | |
*** sm has joined #zope3-dev | 01:00 | |
*** nyo has quit IRC | 01:01 | |
*** vimes656_ has quit IRC | 01:03 | |
*** nyo has joined #zope3-dev | 01:03 | |
*** vimes656 has joined #zope3-dev | 01:10 | |
*** JaRoel|4D has joined #zope3-dev | 01:13 | |
*** nyo has quit IRC | 01:16 | |
*** vimes656 has quit IRC | 01:27 | |
*** nyo has joined #zope3-dev | 01:30 | |
*** tarek has quit IRC | 01:36 | |
*** nyo has quit IRC | 01:37 | |
*** nyo1 has joined #zope3-dev | 01:37 | |
*** nyo1 is now known as nyo | 01:37 | |
*** redir has joined #zope3-dev | 01:42 | |
*** brandon_rhodes has quit IRC | 02:16 | |
*** nyo has quit IRC | 02:17 | |
*** nyo has joined #zope3-dev | 02:17 | |
*** quodt has quit IRC | 02:19 | |
*** kaeru has joined #zope3-dev | 02:22 | |
*** sm has quit IRC | 02:48 | |
*** nyo has quit IRC | 02:48 | |
*** nyo1 has joined #zope3-dev | 02:48 | |
*** nyo1 is now known as nyo | 02:48 | |
*** sm has joined #zope3-dev | 03:12 | |
*** romanofski has joined #zope3-dev | 03:24 | |
*** dunny has quit IRC | 03:25 | |
*** nyo has quit IRC | 03:36 | |
*** nyo has joined #zope3-dev | 03:45 | |
*** sm has quit IRC | 03:53 | |
*** hazmat has quit IRC | 04:00 | |
*** nyo1 has joined #zope3-dev | 04:09 | |
*** nyo has quit IRC | 04:09 | |
*** nyo1 is now known as nyo | 04:09 | |
*** philiKON_ has quit IRC | 04:16 | |
*** nyo has quit IRC | 04:24 | |
*** nyo has joined #zope3-dev | 04:30 | |
*** romanofski has quit IRC | 04:34 | |
*** nyo has quit IRC | 05:01 | |
*** nyo1 has joined #zope3-dev | 05:01 | |
*** nyo1 is now known as nyo | 05:01 | |
*** stub has joined #zope3-dev | 05:06 | |
*** nyo has quit IRC | 05:20 | |
*** nyo has joined #zope3-dev | 05:20 | |
*** dunny has joined #zope3-dev | 05:52 | |
*** nyo1 has joined #zope3-dev | 05:55 | |
*** nyo has quit IRC | 05:55 | |
*** nyo1 is now known as nyo | 05:56 | |
*** stub1 has joined #zope3-dev | 06:05 | |
*** stub has quit IRC | 06:05 | |
*** stub1 is now known as stub | 06:05 | |
*** nyo has quit IRC | 06:16 | |
*** nyo1 has joined #zope3-dev | 06:16 | |
*** nyo1 is now known as nyo | 06:16 | |
*** kaeru has quit IRC | 06:19 | |
*** nyo1 has joined #zope3-dev | 06:48 | |
*** nyo has quit IRC | 06:48 | |
*** nyo1 is now known as nyo | 06:49 | |
*** nyo has quit IRC | 06:52 | |
*** nyo1 has joined #zope3-dev | 06:52 | |
*** nyo1 is now known as nyo | 06:52 | |
*** vimes656 has joined #zope3-dev | 07:01 | |
*** nyo has quit IRC | 07:04 | |
*** sm has joined #zope3-dev | 07:09 | |
*** rocky has quit IRC | 07:10 | |
*** nyo has joined #zope3-dev | 07:12 | |
*** nyo has quit IRC | 07:32 | |
*** nyo1 has joined #zope3-dev | 07:32 | |
*** nyo1 is now known as nyo | 07:32 | |
*** tarek has joined #zope3-dev | 07:45 | |
*** tarek has quit IRC | 07:48 | |
*** tarek has joined #zope3-dev | 07:54 | |
*** nyo has quit IRC | 07:56 | |
*** nyo1 has joined #zope3-dev | 07:56 | |
*** nyo1 is now known as nyo | 07:56 | |
*** tarek has quit IRC | 08:03 | |
*** nyo has quit IRC | 08:07 | |
*** davisagli has joined #zope3-dev | 08:12 | |
*** philiKON has joined #zope3-dev | 08:13 | |
*** philiKON_ has joined #zope3-dev | 08:15 | |
*** nyo has joined #zope3-dev | 08:22 | |
*** thekryz has joined #zope3-dev | 08:28 | |
*** thekryz has left #zope3-dev | 08:35 | |
*** philiKON has quit IRC | 08:36 | |
*** afd_ has joined #zope3-dev | 08:42 | |
*** fairwinds has quit IRC | 08:48 | |
*** nyo has quit IRC | 08:51 | |
*** agroszer has joined #zope3-dev | 08:51 | |
*** JaRoel|4D has quit IRC | 08:56 | |
*** zagy has joined #zope3-dev | 08:59 | |
*** elro has joined #zope3-dev | 09:06 | |
*** __mac__ has joined #zope3-dev | 09:07 | |
*** jukart has joined #zope3-dev | 09:38 | |
*** vimes656 has quit IRC | 09:48 | |
*** iham|away has quit IRC | 09:52 | |
*** JaRoel|4D has joined #zope3-dev | 09:53 | |
*** pyqwer has joined #zope3-dev | 09:53 | |
*** iham has joined #zope3-dev | 09:55 | |
*** JaRoel|4_ has joined #zope3-dev | 10:01 | |
*** junkafarian has joined #zope3-dev | 10:10 | |
*** pelle_ has joined #zope3-dev | 10:12 | |
*** mkerrin has joined #zope3-dev | 10:13 | |
*** jhauser has joined #zope3-dev | 10:18 | |
*** elro has quit IRC | 10:21 | |
*** JaRoel|4D has quit IRC | 10:25 | |
*** basti__ has joined #zope3-dev | 10:26 | |
*** olavgg1 has joined #zope3-dev | 10:29 | |
*** olavgg1 has joined #zope3-dev | 10:30 | |
*** junkafarian has quit IRC | 10:32 | |
*** harobed has joined #zope3-dev | 10:34 | |
*** afd_ has quit IRC | 10:34 | |
*** malthe|Zzz is now known as malthe | 10:42 | |
*** regebro has joined #zope3-dev | 10:45 | |
*** sm has quit IRC | 10:47 | |
*** MJ has joined #zope3-dev | 10:48 | |
*** MrTopf has joined #zope3-dev | 10:56 | |
*** quodt has joined #zope3-dev | 10:58 | |
*** elro has joined #zope3-dev | 11:00 | |
*** afd_ has joined #zope3-dev | 11:01 | |
*** bigkevmcd has joined #zope3-dev | 11:02 | |
*** jpcw has joined #zope3-dev | 11:05 | |
*** ktwilight has joined #zope3-dev | 11:17 | |
*** ktwilight_ has quit IRC | 11:21 | |
*** olavgg1 has quit IRC | 11:26 | |
*** pcardune has quit IRC | 11:31 | |
*** olavgg1 has joined #zope3-dev | 11:32 | |
*** junkafarian has joined #zope3-dev | 11:40 | |
*** MJ has quit IRC | 11:43 | |
*** multani has joined #zope3-dev | 11:49 | |
*** harobed has quit IRC | 11:50 | |
*** davisagli has left #zope3-dev | 11:53 | |
*** nyo has joined #zope3-dev | 11:59 | |
*** sparcd has joined #zope3-dev | 12:11 | |
sparcd | I'm probably doing something really stupid, but I'm following the WorldCookery example in Phil's great book. But when trying to add a recipe I get: ComponentLookupError: ((<zope.schema._bootstrapfields.Field object at 0x2835830>, <zope.publisher.browser.BrowserRequest instance URL=http://localhost:8080/worldcookery/recipes/+/worldcookery.Recipe%3D>), <InterfaceClass zope.app.form.interfaces.IInputWidget>, u'') | 12:12 |
*** junkafarian_ has joined #zope3-dev | 12:14 | |
*** junkafarian has quit IRC | 12:19 | |
nyo | sparcd: that error means that there's no widget registered for zope.schema.Field, but you are trying to make a form containing that field | 12:19 |
*** junkafarian_ is now known as junkafarian | 12:19 | |
*** elro has quit IRC | 12:19 | |
sparcd | nyo: I'm using TextLine and Text | 12:19 |
nyo | sparcd: most often that happens when trying to get autogenerated form for interface, derived from ILocation/IContained | 12:20 |
*** elro has joined #zope3-dev | 12:20 | |
nyo | sparcd: (because they define __parent__ and __name__ as Field) | 12:20 |
sparcd | so I need to provide an adapter for this? | 12:20 |
nyo | sparcd: no. just omit those fields from the form | 12:20 |
afd_ | sparcd: you need to omit them like: fields = Fields(IMySchema).omit('__name__', '__parent__') | 12:21 |
nyo | sparcd: or, if you are using zope.app.form's directives, like browser:addform, you can specify the "fields" parameter with names of fields to _include_ in the form | 12:22 |
sparcd | afd_: I put that line in and now the form appears :-) | 12:22 |
sparcd | nyo: afd_: thanks for your help | 12:22 |
*** hipertracker has joined #zope3-dev | 12:23 | |
sparcd | I get this now: AttributeError: 'Recipe' object has no attribute '__parent__' | 12:24 |
afd_ | post the fulll traceback | 12:25 |
sparcd | http://pastebin.com/m31c6f287 | 12:26 |
*** hipertracker has left #zope3-dev | 12:26 | |
*** brandon_rhodes has joined #zope3-dev | 12:27 | |
sparcd | ah, should my recipe type be: Persistent, Contained | 12:27 |
nyo | sparcd: are you implementing ILocation/IContained (or interface inheriting from it) w/o defining __name__ and __parent__ attributes? | 12:28 |
nyo | sparcd: ah | 12:28 |
sparcd | the interface has IContained | 12:28 |
nyo | sparcd: so you need to implement it:) subclassing Contained is right tho | 12:28 |
sparcd | that fixed it, what a dummy | 12:29 |
sparcd | do I still need to omit those fields previously now? | 12:29 |
nyo | sparcd: yeah, there's no widgets for abstract "Field" class | 12:30 |
sparcd | nyo: ok great, so I've got this working so far and am happy | 12:30 |
nyo | sparcd: btw you could not inherit your interface from IContained, but implement it separately in your class, if you don't certainly need your interface to declare all objects as "contained" | 12:31 |
sparcd | good to know | 12:31 |
sparcd | next thing I need to get this authentication working | 12:33 |
sparcd | I have a pau instance with a principal folder and one member in that folder | 12:33 |
sparcd | I am using a session credentials which gives the nice login form | 12:33 |
sparcd | I have set zope.View grant to principal="zope.Authenticated" | 12:40 |
sparcd | now I no longer get the login form | 12:40 |
sparcd | I just get a browser login popup | 12:40 |
sparcd | and the username/password I have in my pau doesn't allow access | 12:41 |
nyo | sparcd: do you have "zope.Authenticated" principal? | 12:41 |
nyo | sparcd: ah, that's a group maybe.. | 12:42 |
sparcd | I have <authenticatedGroup id="zope.Authenticated" title="Authenticated Users" /> | 12:42 |
nyo | sparcd: yep | 12:42 |
nyo | sparcd: that's strange | 12:42 |
nyo | sparcd: if you remove the grant, the login form comes back? | 12:42 |
sparcd | nyo: only if I make the grant to zope.Anonymous | 12:43 |
*** yotaff has joined #zope3-dev | 12:43 | |
*** MJ has joined #zope3-dev | 12:44 | |
nyo | sparcd: hmmm... i have never used groups btw) | 12:44 |
sparcd | nyo: how would you recommend this? | 12:44 |
sparcd | nyo: I'm new to Zope 3 | 12:45 |
nyo | sparcd: well. groups is a nice feature, so it's okay. it's just that I personally didn't have a situation where i needed groups yet. I use roles - I assign permission to roles, and roles to principals directly. | 12:46 |
sparcd | nyo: that's great, I will do the same | 12:46 |
nyo | sparcd: maybe the groups thing need some different config for the PAU | 12:47 |
sparcd | so how do I get this login form to appear? do I need to grant some permissions to anonymous? | 12:47 |
sparcd | I basically don't want Anonymous to see *any* of the site | 12:49 |
nyo | sparcd: it should not be needed. login views are registered with zope.Public permission that is always available | 12:49 |
nyo | sparcd: does the "loginForm.html" page of the site works if you call it using URL (/yoursite/loginForm.html) | 12:50 |
sparcd | no, I get a browser login popup | 12:50 |
nyo | sparcd: hm... looks like something raises Unauthorized when traversing, before your site with PAU is set active | 12:52 |
nyo | wtf | 12:52 |
sparcd | yeah | 12:52 |
nyo | i'll just try to create an instance with no permissions for anonymous) | 12:52 |
sparcd | my pau is registered correctly | 12:52 |
sparcd | when the permission zope.View is set to zope.Anonymous, and I click on login I get the nice loginForm | 12:53 |
nyo | sparcd: yeah, the problem is not in the pau | 12:54 |
*** reco has quit IRC | 12:55 | |
nyo | sparcd: is the site in question is the root one? | 12:56 |
sparcd | nyo: no, I've added a folder and made it a site | 12:56 |
nyo | sparcd: ok. I'll try to reproduce that) | 12:56 |
sparcd | ok | 12:57 |
sparcd | I've tried it in the root as well and I get the same result | 12:57 |
*** kaeru has joined #zope3-dev | 12:58 | |
nyo | sparcd: yep, I got the same here. interesting | 12:58 |
sparcd | :-( | 13:01 |
nyo | sparcd: ah | 13:01 |
nyo | sparcd: the zope.app.folder.Folder require zope.View permission for all attributes in the IReadContainer interface (the __getitem__ and so on) | 13:02 |
sparcd | ok | 13:03 |
nyo | sparcd: so it raises Unauthorized when trying to traverse the folder, because default traverser uses "get" method to get a subobject by name | 13:03 |
sparcd | ok | 13:03 |
sparcd | so what can I do? if anything? | 13:03 |
nyo | sparcd: you could redefine permissions for the Folder class or make your own folder/site implementation with own permissions | 13:04 |
sparcd | <require permission="zope.View" interface="zope.app.container.interfaces.IReadContainer" /> so change that? | 13:05 |
sparcd | I have my own folder, which I am using with that declaration | 13:05 |
nyo | sparcd: it's better to "override" the standard declarations in your application using zcml overrides | 13:06 |
nyo | sparcd: but yes,that line.. you could change the zope.View to zope.Public for that) | 13:06 |
sparcd | nyo: I have http://pastebin.com/m3f15a389 | 13:06 |
nyo | sparcd: alternatively, you could also override the traverser to one that removes security proxy before trying to get a subobject | 13:07 |
nyo | sparcd: yeah, but I guess, your "root" folder is still Folder from zope.app.folder | 13:07 |
nyo | sparcd: and it tries to traverse it while it still has standard declarations | 13:07 |
sparcd | the root of the site is whatever the root of a Zope 3 site is | 13:08 |
nyo | sparcd: it's zope.app.folder.Folder in the standard installation | 13:08 |
sparcd | ok cool | 13:08 |
sparcd | I have set the require permission to zope.Public for my site, but I guess I also need to do it on the default folder (root) ? | 13:09 |
nyo | yep, create the file like "overrides.zcml" in your application, and include it from main zcml file using the <includeOverrides file="..." /> directive | 13:11 |
sparcd | ok great | 13:11 |
sparcd | I'll give that a go and report back | 13:11 |
sparcd | gotta nip out for a short while now | 13:11 |
sparcd | thanks so much for help | 13:11 |
lisppaste6 | nyo pasted "permission override for folder" at http://paste.lisp.org/display/74261 | 13:11 |
sparcd | great | 13:11 |
sparcd | :-) | 13:11 |
nyo | and make a redefinition there like ^^^ | 13:12 |
nyo | :) | 13:12 |
sparcd | will give it a go | 13:12 |
sparcd | thx | 13:12 |
nyo | sparcd: np | 13:12 |
*** ignas has joined #zope3-dev | 13:16 | |
*** afd__ has joined #zope3-dev | 13:24 | |
*** alga has joined #zope3-dev | 13:34 | |
*** hazmat has joined #zope3-dev | 13:34 | |
*** ChanServ sets mode: +o hazmat | 13:34 | |
*** kaeru has quit IRC | 13:36 | |
*** afd_ has quit IRC | 13:38 | |
*** dunny has quit IRC | 13:45 | |
*** harobed has joined #zope3-dev | 13:48 | |
*** malthe has quit IRC | 14:04 | |
*** olavgg1 has quit IRC | 14:05 | |
*** fairwinds has joined #zope3-dev | 14:05 | |
*** menesis has joined #zope3-dev | 14:07 | |
*** hazmat has quit IRC | 14:09 | |
*** goschtl has joined #zope3-dev | 14:10 | |
*** olavgg1 has joined #zope3-dev | 14:12 | |
*** benji has quit IRC | 14:30 | |
*** alga has quit IRC | 14:42 | |
*** tarek has joined #zope3-dev | 14:43 | |
*** malthe has joined #zope3-dev | 14:43 | |
*** J1m has joined #zope3-dev | 14:53 | |
*** alga has joined #zope3-dev | 14:55 | |
*** toutpt has joined #zope3-dev | 14:57 | |
*** markusleist has quit IRC | 15:11 | |
*** thekryz has joined #zope3-dev | 15:16 | |
*** mgedmin has joined #zope3-dev | 15:16 | |
*** menesis has quit IRC | 15:18 | |
*** thekryz has left #zope3-dev | 15:20 | |
*** stub has quit IRC | 15:43 | |
*** olavgg1 has quit IRC | 15:44 | |
*** malthe is now known as malthe|away | 15:46 | |
*** lurkymclurkleton has joined #zope3-dev | 16:02 | |
*** olavgg1 has joined #zope3-dev | 16:02 | |
*** jamur2 has joined #zope3-dev | 16:03 | |
*** menesis has joined #zope3-dev | 16:04 | |
*** lucielejard has joined #zope3-dev | 16:07 | |
*** JaRoel|4_ has quit IRC | 16:08 | |
*** mintsauce has joined #zope3-dev | 16:09 | |
*** aaronv has joined #zope3-dev | 16:15 | |
*** JaRoel|4D has joined #zope3-dev | 16:15 | |
*** benji has joined #zope3-dev | 16:19 | |
*** cshenton has joined #zope3-dev | 16:25 | |
*** markusleist has joined #zope3-dev | 16:26 | |
*** mintsauce has quit IRC | 16:28 | |
*** menesis has quit IRC | 16:39 | |
*** menesis has joined #zope3-dev | 16:44 | |
*** d2m has quit IRC | 16:47 | |
*** junkafarian_ has joined #zope3-dev | 16:48 | |
*** d2m has joined #zope3-dev | 16:50 | |
*** junkafarian has quit IRC | 16:51 | |
sparcd | nyo: the overrides stuff works | 16:51 |
*** whit has joined #zope3-dev | 16:55 | |
*** malthe|away is now known as malthe | 16:58 | |
*** J1m has quit IRC | 17:01 | |
*** reco has joined #zope3-dev | 17:01 | |
*** markusleist1 has joined #zope3-dev | 17:05 | |
*** J1m has joined #zope3-dev | 17:06 | |
sparcd | how do I create a view for a container? | 17:08 |
*** nathany has joined #zope3-dev | 17:09 | |
sparcd | do I add it here? http://pastebin.com/m3e5f6c21 | 17:09 |
*** cshenton_ has joined #zope3-dev | 17:11 | |
*** markusleist has quit IRC | 17:13 | |
zagy | sparcd: a view or a page? | 17:16 |
zagy | probably a page | 17:16 |
zagy | probably a page | 17:16 |
sparcd | zagy: I'm just trying to make the folder look different, at the moment it shows a blank page | 17:16 |
nyo | sparcd: no, you add a view to a container just like to any other object, containerViews directive is just a syntax sugar for defining common views | 17:17 |
sparcd | if I define a view as 'index.html' I get a conflicting message | 17:17 |
sparcd | with containerViews | 17:17 |
nyo | sparcd: remove "index" argument from the containerViews directive | 17:17 |
zagy | container is not special there, just use <browser:page | 17:17 |
nyo | so it won't create it | 17:17 |
*** rocky has joined #zope3-dev | 17:17 | |
sparcd | nyo: I get http://pastebin.com/d352b9461 | 17:18 |
*** tarek has quit IRC | 17:18 | |
mgedmin | sparcd: delete line 48 from /Users/ben/Sites/hammerhead/src/hammerhead/browser/configure.zcml | 17:20 |
*** tarek has joined #zope3-dev | 17:20 | |
sparcd | mgedmin: brill thanks | 17:20 |
mgedmin | well, nyo gave you the correct answer first | 17:21 |
mgedmin | I just translated it into a lower level | 17:21 |
sparcd | nyo: yeah sorry | 17:21 |
*** J1m has quit IRC | 17:21 | |
sparcd | and I loop through context/items | 17:22 |
sparcd | cool, I'm now getting somewhere :-) | 17:23 |
sparcd | adding my own permissions now | 17:24 |
*** hexsprite has quit IRC | 17:26 | |
*** dvschramm has joined #zope3-dev | 17:27 | |
*** cshenton has quit IRC | 17:27 | |
*** dvschramm has quit IRC | 17:28 | |
*** dvschramm has joined #zope3-dev | 17:28 | |
sparcd | if I have a folder within my site, I can prevent a user accessing it by putting a permission on the view, but how do I prevent it even showing up in the folder listing? | 17:28 |
*** timte has joined #zope3-dev | 17:29 | |
nyo | sparcd: if by "folder listing" you mean default index.html view that's created by browser:containerViews directive, then i doubt it's possible - you need to write your own view that will filter inaccesible folders. | 17:33 |
sparcd | nyo: ok, I will do that - thanks | 17:33 |
sparcd | nyo: how do I work out if a user has permission to view a folder | 17:36 |
*** basti__ has quit IRC | 17:37 | |
*** srichter has quit IRC | 17:37 | |
*** MJ has quit IRC | 17:41 | |
*** srichter has joined #zope3-dev | 17:41 | |
*** J1m has joined #zope3-dev | 17:42 | |
*** fRiSi has joined #zope3-dev | 17:43 | |
*** afd__ has quit IRC | 17:44 | |
*** cshenton has joined #zope3-dev | 17:53 | |
nyo | sparcd: you can use the canAccess or checkPermission functions from zope.security | 17:54 |
sparcd | nyo: great, but I've added <require permission="mysite.ViewProjects" interface="zope.app.container.interfaces.IReadContainer" /> | 17:55 |
sparcd | and this doesn't seem to work as the user has the 'View' permission after logging in | 17:55 |
sparcd | any logged in user can see this folder | 17:57 |
nyo | sparcd: that's strange. you might grant the permission to the authenticated group | 17:58 |
sparcd | nyo: is it because the user has the 'View' permission? | 17:59 |
*** cshenton_ has quit IRC | 18:01 | |
nyo | sparcd: well, that's the most likely because of that | 18:05 |
sparcd | ok, so I'll remove that permission for logged in users | 18:05 |
*** rmarianski has joined #zope3-dev | 18:06 | |
*** goschtl has quit IRC | 18:08 | |
sparcd | nyo: I've added a new role: mysite.ViewSite | 18:10 |
sparcd | and given that to authenticated | 18:10 |
*** elro has quit IRC | 18:13 | |
*** rmarianski has quit IRC | 18:16 | |
*** rmarianski has joined #zope3-dev | 18:16 | |
*** pelle_ has quit IRC | 18:17 | |
*** srichter has quit IRC | 18:19 | |
*** srichter has joined #zope3-dev | 18:19 | |
*** sm has joined #zope3-dev | 18:19 | |
*** runyaga has quit IRC | 18:21 | |
nyo | sparcd: btw, i think it's better to name roles like mysite.Visitor or mysite.Member. mysite.ViewSite is a good name for permission, not for role | 18:26 |
nyo | sparcd: (but it's up to you of course) | 18:26 |
sparcd | mystie.ViewSite is a permission | 18:26 |
sparcd | mysite.ViewSite | 18:26 |
nyo | (19:10:34) sparcd: nyo: I've added a new role: mysite.ViewSite | 18:26 |
*** harobed has quit IRC | 18:27 | |
sparcd | nyo: yeah, I typed wrongly | 18:27 |
nyo | sparcd: ah, ok then | 18:27 |
sparcd | bad keyboard day | 18:27 |
sparcd | how do I allow the default admin admin user to access via the loginForm? it doesn't allow them at the moment | 18:28 |
*** aaronv is now known as aaronvLunch | 18:32 | |
*** srichter has quit IRC | 18:32 | |
*** srichter has joined #zope3-dev | 18:33 | |
*** jukart has quit IRC | 18:35 | |
*** jukart has joined #zope3-dev | 18:35 | |
*** jukart has quit IRC | 18:39 | |
*** pcardune has joined #zope3-dev | 18:41 | |
*** pcardune_ has joined #zope3-dev | 18:49 | |
*** pcardune has quit IRC | 18:50 | |
*** strichter has joined #zope3-dev | 18:52 | |
*** elro has joined #zope3-dev | 18:55 | |
*** natea_ has quit IRC | 18:58 | |
sparcd | I've now created a skin and am getting "Unrecognized expression type "provider"" | 19:00 |
*** markusleist1 has quit IRC | 19:03 | |
*** markusleist has joined #zope3-dev | 19:04 | |
*** elro has quit IRC | 19:04 | |
*** toutpt has quit IRC | 19:05 | |
*** davisagli has joined #zope3-dev | 19:06 | |
*** srichter has quit IRC | 19:07 | |
*** nyo has quit IRC | 19:08 | |
*** markusleist has quit IRC | 19:09 | |
*** __mac__ has quit IRC | 19:09 | |
*** sm has quit IRC | 19:10 | |
*** aaronvLunch is now known as aaronv | 19:14 | |
*** fRiSi has quit IRC | 19:15 | |
*** elro has joined #zope3-dev | 19:16 | |
*** elro has joined #zope3-dev | 19:20 | |
sparcd | fixed it | 19:21 |
*** pyqwer has quit IRC | 19:22 | |
*** JaRoel|4D has quit IRC | 19:25 | |
*** jukart has joined #zope3-dev | 19:34 | |
*** sparcd has left #zope3-dev | 19:34 | |
*** elro has quit IRC | 19:35 | |
*** quodt has quit IRC | 19:39 | |
*** alga has quit IRC | 19:42 | |
*** tarek has quit IRC | 19:43 | |
*** pcardune_ has quit IRC | 19:44 | |
*** malthe is now known as malthe|away | 19:47 | |
*** alecm has joined #zope3-dev | 19:47 | |
*** danfairs has quit IRC | 19:47 | |
*** alga has joined #zope3-dev | 19:49 | |
*** redir is now known as cheerbot | 19:52 | |
*** mkerrin has quit IRC | 19:53 | |
*** tarek has joined #zope3-dev | 19:55 | |
*** tarek has quit IRC | 19:56 | |
*** jukart has quit IRC | 19:56 | |
*** nyo has joined #zope3-dev | 19:58 | |
*** jukart has joined #zope3-dev | 20:05 | |
*** JaRoel|4D has joined #zope3-dev | 20:08 | |
*** junkafarian_ has quit IRC | 20:08 | |
*** sunew has joined #zope3-dev | 20:09 | |
*** jukart_ has joined #zope3-dev | 20:13 | |
*** danfairs has joined #zope3-dev | 20:26 | |
*** jukart has quit IRC | 20:30 | |
*** pcardune has joined #zope3-dev | 20:33 | |
*** cshenton_ has joined #zope3-dev | 20:36 | |
*** TresEquis has quit IRC | 20:38 | |
*** pcardune has quit IRC | 20:39 | |
*** cshenton has quit IRC | 20:44 | |
*** J1m has quit IRC | 20:44 | |
*** TresEquis has joined #zope3-dev | 20:45 | |
*** jukart has joined #zope3-dev | 20:45 | |
*** J1m has joined #zope3-dev | 20:47 | |
*** markusleist has joined #zope3-dev | 20:48 | |
*** nyo has quit IRC | 20:52 | |
*** nyo has joined #zope3-dev | 20:52 | |
*** TresEquis has quit IRC | 20:53 | |
*** davisagli has left #zope3-dev | 20:53 | |
*** cheerbot is now known as redir | 20:55 | |
*** pelle_ has joined #zope3-dev | 20:55 | |
*** d2m has left #zope3-dev | 20:55 | |
*** menesis has quit IRC | 21:03 | |
*** jukart_ has quit IRC | 21:03 | |
*** menesis has joined #zope3-dev | 21:03 | |
*** nyo has quit IRC | 21:06 | |
*** menesis has quit IRC | 21:07 | |
*** menesis has joined #zope3-dev | 21:07 | |
*** dunny has joined #zope3-dev | 21:11 | |
*** alga has quit IRC | 21:13 | |
*** nyo has joined #zope3-dev | 21:13 | |
*** alga has joined #zope3-dev | 21:13 | |
*** brandon_rhodes has quit IRC | 21:17 | |
*** junkafarian has joined #zope3-dev | 21:19 | |
*** d2m has joined #zope3-dev | 21:20 | |
*** MrTopf has quit IRC | 21:20 | |
*** quodt has joined #zope3-dev | 21:26 | |
*** dvschramm has quit IRC | 21:27 | |
*** TresEquis has joined #zope3-dev | 21:30 | |
*** hazmat has joined #zope3-dev | 21:33 | |
*** ChanServ sets mode: +o hazmat | 21:33 | |
*** junkafarian has quit IRC | 21:33 | |
*** jukart has quit IRC | 21:34 | |
*** junkafarian has joined #zope3-dev | 21:38 | |
*** nyo has quit IRC | 21:47 | |
*** whit has quit IRC | 22:01 | |
*** davisagli has joined #zope3-dev | 22:05 | |
*** cshenton_ has quit IRC | 22:15 | |
*** binbrain_ has joined #zope3-dev | 22:17 | |
*** binbrain has quit IRC | 22:18 | |
*** cshenton has joined #zope3-dev | 22:22 | |
*** brandon_rhodes has joined #zope3-dev | 22:22 | |
*** junkafarian is now known as junk|afk | 22:24 | |
*** vimes656 has joined #zope3-dev | 22:27 | |
*** strichter is now known as srichter | 22:31 | |
*** agroszer has quit IRC | 22:42 | |
*** menesis has quit IRC | 22:49 | |
*** aaronv has quit IRC | 22:49 | |
*** aaronv has joined #zope3-dev | 22:50 | |
*** ChanServ sets mode: +o srichter | 22:51 | |
*** ignas has quit IRC | 23:14 | |
*** mgedmin has quit IRC | 23:14 | |
*** alga has quit IRC | 23:17 | |
*** brandon_rhodes has quit IRC | 23:22 | |
*** hazmat has quit IRC | 23:32 | |
*** hazmat has joined #zope3-dev | 23:32 | |
*** ChanServ sets mode: +o hazmat | 23:32 | |
*** greenman has joined #zope3-dev | 23:36 | |
*** regebro has quit IRC | 23:54 | |
*** vimes656_ has joined #zope3-dev | 23:56 | |
*** vimes656 has quit IRC | 23:56 | |
*** vimes656 has joined #zope3-dev | 23:59 | |
*** vimes656_ has quit IRC | 23:59 |
Generated by irclog2html.py 2.15.1 by Marius Gedminas - find it at mg.pov.lt!