_maharaja | thnx | 00:06 |
---|---|---|
_maharaja | do you know how i can compare the event's owner with the current user? | 01:18 |
srichter | though the online version is a bit outdated and you should buy the book ;-) | 01:22 |
_maharaja | :> | 01:23 |
_maharaja | well - i'm not planning to dig deep into zope or schoolbell | 01:23 |
_maharaja | i just want to do a quick addon of "private" entries | 01:23 |
*** _maharaja has quit IRC | 02:52 | |
*** elmo has quit IRC | 02:52 | |
*** elmo has joined #schooltool | 02:56 | |
*** _maharaja has joined #schooltool | 03:01 | |
*** didymo has joined #schooltool | 03:25 | |
povbot | /svn/commits: * jinty committed revision 4072: | 07:24 |
povbot | /svn/commits: * Add make extract-translations to the build sequence. Fix for http://issues.schooltool.org/issue279. | 07:24 |
*** srichter has quit IRC | 07:25 | |
*** srichter has joined #schooltool | 07:25 | |
povbot | /svn/commits: * jinty committed revision 4073: | 09:14 |
povbot | /svn/commits: Reverted 4072 as it caused too many problems. | 09:14 |
*** Aiste has joined #schooltool | 09:32 | |
*** SteveA_ is now known as SteveA | 09:51 | |
*** thisfred has joined #schooltool | 11:10 | |
*** ignas_ has joined #schooltool | 12:06 | |
*** thisfred has quit IRC | 12:07 | |
*** bskahan has joined #schooltool | 14:09 | |
*** srichter has quit IRC | 14:12 | |
*** SteveA has quit IRC | 14:50 | |
*** SteveA has joined #schooltool | 14:51 | |
*** bska|mobile has joined #schooltool | 15:02 | |
*** bskahan has quit IRC | 15:07 | |
*** bska|mobile has quit IRC | 15:14 | |
*** bskahan has joined #schooltool | 15:24 | |
bskahan | are we going to peg to zope 3.1 for the 1.2/0.11 releases? | 15:29 |
*** srichter has joined #schooltool | 15:33 | |
*** srichter has quit IRC | 15:34 | |
*** srichter has joined #schooltool | 15:36 | |
*** srichter has quit IRC | 15:36 | |
*** srichter has joined #schooltool | 15:37 | |
_maharaja | hi bskahan! | 15:50 |
_maharaja | i've got a question | 15:50 |
_maharaja | how do i get the current user? | 15:50 |
_maharaja | cause i need to do sth like: | 15:50 |
ignas_ | _maharaja, IPerson(self.request.principal) ? | 15:50 |
_maharaja | if (this.isprivate && loggedinuser = this.owner) | 15:50 |
_maharaja | k, ill try | 15:51 |
_maharaja | ignas_: is there a way to "var_dump" a structure? | 15:51 |
_maharaja | like its possible in php? | 15:51 |
ignas_ | dict(object) iirc | 15:51 |
ignas_ | or you mean like pickle ? | 15:52 |
_maharaja | thnx - ill try | 15:52 |
_maharaja | i do not know :) i'm hacking schoolbell in vi ;) | 15:52 |
_maharaja | i need a way to see the structure of my objects | 15:52 |
bskahan | p = Person() | 15:58 |
bskahan | dict(p) | 15:58 |
bskahan | doesn't seem to work | 15:58 |
ignas_ | p.__dict__ | 16:00 |
bskahan | ignas_: yeah, that's it | 16:01 |
_maharaja | k, ill try | 16:01 |
_maharaja | bskahan: current state of affairs: i (successfuuully) added a private element | 16:02 |
_maharaja | and am currently working on the display part | 16:02 |
_maharaja | currently, all private elements are displayed as private | 16:02 |
_maharaja | but the creator should be able see/edit his events too :P | 16:03 |
_maharaja | moreover, there are (future) acls to take care of | 16:03 |
bskahan | nice | 16:04 |
_maharaja | so how do i compare the current user to the owner of an event? | 16:08 |
_maharaja | (the right way) | 16:08 |
_maharaja | note: i've never done any python programming ;) | 16:08 |
ignas_ | _maharaja, what is the context ? | 16:14 |
ignas_ | like what type of object is self.context ? | 16:14 |
ignas_ | i'd guess | 16:15 |
ignas_ | event.__parent__.__parent__ is IPerson(self.request.principal) | 16:15 |
ignas_ | the first __parent__ is the Calendar | 16:16 |
ignas_ | ant the second one is the owner of the calendar ... | 16:16 |
_maharaja | i'm inside a event | 16:16 |
_maharaja | and self.request.principal does not resolv to anything | 16:16 |
_maharaja | do i have to import it? | 16:16 |
_maharaja | there is no self.request | 16:17 |
ignas_ | how is the function you are editing/adding called | 16:17 |
ignas_ | and where is it used ? | 16:17 |
ignas_ | i mean - who calls it ? | 16:17 |
_maharaja | right now i'm editing class EventForDisplay | 16:17 |
_maharaja | well - honestly i do not know anything | 16:18 |
_maharaja | as i do not know how it works :) | 16:18 |
_maharaja | what i do is hacking at its worst | 16:18 |
_maharaja | screw the code until it works :P | 16:18 |
_maharaja | and try to get things right | 16:18 |
_maharaja | if you tell me a good ide for linux, ill probably be able to tell you more | 16:19 |
ignas_ | _maharaja, well - ide does not help you with Zope, and the best ide is vi/emacs + tags + mkid | 16:20 |
ignas_ | if you will look at def getBooker(self) | 16:20 |
ignas_ | oh | 16:20 |
ignas_ | btw | 16:21 |
ignas_ | that might not help you | 16:21 |
bskahan | + python shell | 16:21 |
ignas_ | could you please describe what exactly are you trying to do and why ? | 16:21 |
_maharaja | i'm trying to add privacy to the calendar | 16:21 |
ignas_ | what kind of privacy ? | 16:21 |
_maharaja | i added an extra field private (similar to allday) | 16:22 |
ignas_ | you want events having permissions not just calendar ? | 16:22 |
_maharaja | if private is true, the owner is the only one who is able to view title/description/etc and to edit events | 16:22 |
_maharaja | indeed | 16:22 |
_maharaja | i managed to do that | 16:22 |
_maharaja | i added a function isPrivate() which returns true/false | 16:23 |
_maharaja | right now, its added to EventForDisplay | 16:23 |
ignas_ | well implementing that properly is kind of difficult ... and hacky way is error prone ... | 16:23 |
ignas_ | i think you should modify the calendar not the event | 16:23 |
_maharaja | and i introduced getTitle() and getShortTitle so i do not need to mess with the templates as they will return "Private" if an elemennnnnnnt is private | 16:23 |
ignas_ | so the calendar would not allow you accessing private events at all | 16:23 |
_maharaja | sry for the typos, i'm at university and chatting via vnc ;) | 16:24 |
_maharaja | well, my intention is not to block access | 16:24 |
_maharaja | but to restrict it | 16:24 |
ignas_ | in what ways ? | 16:24 |
_maharaja | others should see my private entries | 16:24 |
_maharaja | they shall know that i'm not available | 16:24 |
ignas_ | but should not see what are they :/ | 16:24 |
_maharaja | true | 16:25 |
_maharaja | thats why i thought EventForDisplay is the right place | 16:25 |
bskahan | http://www.kanzaki.com/docs/ical/vevent.html | 16:25 |
bskahan | the relevant VEVENT attribute is class: PUBLIC/PRIVATE | 16:26 |
_maharaja | i know | 16:26 |
bskahan | i think there might be a BUSY value too | 16:26 |
_maharaja | and confidential | 16:26 |
ignas_ | well, if someone can view your calendar - he can get your ICal | 16:27 |
bskahan | I'm not sure though, that might be what the transparent: value refers to | 16:27 |
ignas_ | and that kind of defeats the purpose | 16:27 |
_maharaja | are there "transparent" getters and setters in python? | 16:28 |
_maharaja | like: event.title = "bla" calls event.setTitle("bla") if this method is available? | 16:28 |
ignas_ | yes | 16:29 |
ignas_ | they are called properties | 16:29 |
ignas_ | and anyway i'd modify the Calendar code os it would return a new kind of Event | 16:29 |
ignas_ | inherited from CalendarEvent yet created on the fly, and preferrably immutable | 16:30 |
bskahan | I'd do it at the schoolbell.calendar level, rather than schoolbell.app since to get it working right you have to deal with the ical display as well as the browser display | 16:31 |
ignas_ | or even better yield IPrivateEvent(event) if event.private is True | 16:31 |
_maharaja | mhm - sound complicated :) | 16:31 |
_maharaja | cause i do not know where to implement that | 16:31 |
ignas_ | _maharaja, well the task you picked up IS complicated | 16:31 |
_maharaja | thou i know what you mean | 16:31 |
_maharaja | i need to understand the schoolbell/zope architecture :-/ | 16:32 |
* bskahan nods | 16:32 | |
_maharaja | (a quick introduction prefereeeeed) | 16:32 |
bskahan | heh | 16:32 |
_maharaja | thats a thing that would help lots of open source hackers, if they want to help you | 16:32 |
_maharaja | some viso/... gfx and a few pages on how it works and what to read | 16:33 |
bskahan | we have a low-hanging fruit list | 16:33 |
ignas_ | _maharaja, if you know Zope3 - it is a lot easier to understand | 16:33 |
bskahan | how's your xhtml/CSS design background? | 16:33 |
*** srichter has quit IRC | 16:34 | |
_maharaja | well - i know html, xml and how to work with basic css like positioning, colors, etc. | 16:35 |
_maharaja | and i know where to get more information on these topics | 16:35 |
bskahan | a gentle introduction might be creating a good browser view for handling many overlapping events | 16:36 |
ignas_ | _maharaja, having IE would be nice, our testing lags on that field ... | 16:36 |
_maharaja | pft :) | 16:37 |
_maharaja | i need the private stuff :> | 16:37 |
bskahan | the use case for schoolbell is conference schedules with multiple tracks, and in schooltool it would be scheduling a student with a busy timetable schedule | 16:37 |
bskahan | heh | 16:38 |
ignas_ | and for private stuff - i'd estimate at least 1 hour of discussion with alga or mgedmin + ~8 hours of implementation if i was doing that task | 16:39 |
_maharaja | -> ? | 16:39 |
ignas_ | i am not even sure how private events should work properly ... | 16:39 |
ignas_ | like - should "superuser" be capable of deleting them ? | 16:40 |
_maharaja | neither do i as i do not know your architecture/goals/planning/seperation/etc | 16:40 |
ignas_ | they need a proper permission in the acls too | 16:40 |
ignas_ | if we add the permission - we must set it properly in the subscriber | 16:41 |
_maharaja | mhm - so what would you suggest? | 16:41 |
ignas_ | where should we check for it ? what about ical ? | 16:41 |
_maharaja | cause i would be willing to help you | 16:41 |
bskahan | ignas_ would they need an ACL permission? Private for some, public for others? | 16:42 |
_maharaja | basically i think that private <-> public is enough | 16:42 |
ignas_ | bskahan, i think they should if they would be implemented properly ... like a superuser can see even your private events ... while others can not | 16:42 |
_maharaja | so that my private elements are protected from all | 16:42 |
ignas_ | i suggest pestering th1a so he would include it in the next proposal, because the upcomming one is UI oriented | 16:43 |
* bskahan doesn't want to add another table cell to the ACL view ;) | 16:43 | |
bskahan | but your right, because we don't actually have a "Super user" | 16:44 |
ignas_ | that's what i mean by saying that the task IS complicated | 16:45 |
* bskahan nods | 16:45 | |
bskahan | its more complicated than I was thinking, I assumed private meant private from everyone but the manager, but we don't really have something that's inherently "manager" | 16:46 |
ignas_ | the ical, editing, deleting issue is complex too ... | 16:47 |
_maharaja | -> i would not grant the "manager" the rights to see my private elements per se | 16:49 |
bskahan | for schooltool, that would have to be the case | 16:49 |
ignas_ | _maharaja, well - you can try, yet do you imagine root having no access to your files ? | 16:49 |
_maharaja | and from my gutts - adding privateforall elements should be easier | 16:49 |
ignas_ | _maharaja, and a security hole too | 16:50 |
_maharaja | ignas_: i thought about that - true. | 16:50 |
bskahan | making your calendar private is pretty easy | 16:50 |
_maharaja | the hole calendar? or what do you mean | 16:50 |
_maharaja | whole even | 16:51 |
bskahan | I thought that's what you meant by privateforall | 16:51 |
ignas_ | no he means - private events are private for all | 16:52 |
_maharaja | yes | 16:53 |
bskahan | ah | 16:53 |
ignas_ | _maharaja, well - are you using ical publishing features ? | 16:53 |
_maharaja | yes, i do | 16:53 |
bskahan | I'm not even sure you could make it private from zope.Manager | 16:53 |
_maharaja | bskahan: np if its visible for zope.Manager | 16:53 |
_maharaja | and fine grained acls aren't a problem either | 16:54 |
_maharaja | my szenario: | 16:54 |
_maharaja | we're using different ical software (sunbird, etc.) and need a web interface | 16:54 |
_maharaja | schoolbell looks dammmmmn nice | 16:54 |
bskahan | schoolbell's default manager has zope.Manager access | 16:54 |
_maharaja | but lacks some features | 16:54 |
_maharaja | like proper support for private elements, etc. | 16:55 |
ignas_ | _maharaja, well - you can hax the ical import feature to skip private elements ... | 16:55 |
ignas_ | like - make their titles obfuscated | 16:55 |
ignas_ | well sure you will not be capable of editing private events through the web | 16:55 |
_maharaja | indeed | 16:55 |
_maharaja | but a sync back to my client will mess things up :) | 16:56 |
ignas_ | yet - you will be safe | 16:56 |
ignas_ | _maharaja, you can mess with timestamps | 16:56 |
ignas_ | so ST would tell the calendar that the events stored are older than the ones your ical client has | 16:56 |
_maharaja | anyways, it would be messing | 16:56 |
_maharaja | well - thats ugly messsssssssing :) | 16:57 |
ignas_ | well - sorry to disappoint you, but any other easy way to do what you want is - messing, and without knowledge of zope/SchoolTool - most probably ugly ;) | 16:57 |
_maharaja | i prefere an ok-but-not-best implementation | 16:57 |
_maharaja | *g* | 16:57 |
_maharaja | i'm willing to leanr | 16:57 |
_maharaja | i'm simply not knowing where to start | 16:57 |
_maharaja | and what tools to use | 16:57 |
ignas_ | start exploring, and use exhuberant-ctags + vi/emacs | 16:58 |
ignas_ | the two arew field tested | 16:58 |
_maharaja | as i'm coming from php/java and a little c# | 16:58 |
_maharaja | all on windowsssss | 16:58 |
_maharaja | k | 16:58 |
bskahan | ignas_: related to the permissions on manager, I don't think theres a way to create a new manager account inside schoolbell. So you could delete the initial manager and then you'd have no manager | 16:58 |
ignas_ | bskahan, no you can't :P | 16:59 |
ignas_ | i have implemented that 2 days ago :) | 16:59 |
ignas_ | in SB | 16:59 |
ignas_ | user can't delete himself | 16:59 |
ignas_ | and anyone who can delete the manager - most probably has the same permissions as the manager does | 16:59 |
bskahan | heh, that's what I meant | 17:00 |
bskahan | you could add a person, grant delete access to the persons container | 17:00 |
bskahan | delete the manager | 17:00 |
bskahan | no one can control access now | 17:00 |
_maharaja | bbl - have to go shopping with my gf ;) | 17:00 |
bskahan | _maharaja: bye | 17:01 |
bskahan | not sure what the right way to handle that is | 17:05 |
bskahan | anyone with create access on the persons container could render the system pretty useless | 17:06 |
bskahan | one thing to add is users with zope.Manager should be able to grant zope.Manager to another user, only users with zope.Manager can delete users with zope.Manager | 17:07 |
*** gml has joined #schooltool | 17:07 | |
*** bskahan has quit IRC | 17:12 | |
*** bskahan has joined #schooltool | 17:13 | |
ignas_ | bskahan, create an issue for that ... | 17:18 |
* bskahan nods | 17:18 | |
bskahan | 283 and 284 | 17:18 |
*** ignas_ has quit IRC | 17:27 | |
th1a | bskahan: Yes, the intention is to stick with Zope 3.1 when it is out. | 17:51 |
bskahan | thanks | 17:52 |
bskahan | can I add issue 284 to our ACL story? | 17:53 |
bskahan | issue284 is the fact that you can't create a full manager in the current UI | 17:53 |
bskahan | I want to run it by alga, but I don't see why you shouldn't | 17:55 |
th1a | bskahan: Good point. | 17:56 |
bskahan | I'm actually not sure that it should be in the ACL view specifically | 17:57 |
bskahan | but it should be somewhere | 17:57 |
bskahan | because the ACL view generally deals other access the "context" of the acl page, while granting zope.Manager is more of a "make this person root" | 17:58 |
*** SteveA_ has joined #schooltool | 18:10 | |
*** bska|mobile has joined #schooltool | 18:21 | |
*** bskahan has quit IRC | 18:35 | |
*** SteveA has quit IRC | 18:35 | |
*** bska|mobile has quit IRC | 18:40 | |
*** alga has joined #SchoolTool | 18:48 | |
alga | th1a: AYT? | 18:56 |
alga | I've had an interesting idea in the shower today | 18:56 |
alga | Mark's goal is to be THE calendaring component for Z3 | 18:56 |
alga | We're lacking in that respect, as we have generic calendar components, but we do not have generic views for them | 18:57 |
alga | It would be good to refactor our schoolbell calendar views so that they inherited from generic calendar views in schoolbell.calendar.browser | 18:57 |
alga | so that it was easy for people to use such calendar components in their apps | 18:58 |
alga | 'cause right now we have more of the calendaring app, and not much in the sense of a featureful calendaring component | 18:59 |
*** erchache has joined #schooltool | 19:40 | |
erchache | hi | 19:40 |
erchache | i have notice a programmer on my job make a similar program to schoolbell but specific to computer science practice labs | 19:40 |
erchache | th1a | 19:41 |
*** tvon has joined #schooltool | 20:47 | |
th1a | I am here. | 21:10 |
tvon | So am I | 21:11 |
th1a | alga: I think we've already lost the Zope 3 calendaring battle, due to licensing. | 21:11 |
tvon | Did anyone get a issue242 email? | 21:11 |
tvon | th1a: what do you mean? | 21:12 |
th1a | I think we're being overtaken by CPSSharedCalendar. | 21:14 |
tvon | Isn't that a Plone/Zope2 solution? | 21:15 |
tvon | ah, they are aiming for z3 a bit as well | 21:16 |
*** erchache has quit IRC | 21:16 | |
th1a | If we were going to spend more development time on calendaring per se, it would probably need to be merged with their work. | 21:16 |
th1a | Which I would like to do, except we've got other stuff to work on. | 21:16 |
tvon | odd, the installation procedure indicates that it requires zope2, zope3 *and* it shipps with Five included | 21:17 |
tvon | wtf | 21:17 |
th1a | alga: Actually, what you need to do is discuss those issues with Mark at EuroPython, since I won't be there. | 21:18 |
alga | ok | 21:18 |
alga | gotta run | 21:18 |
th1a | ok. bye. | 21:18 |
*** alga has quit IRC | 21:18 | |
th1a | How hard would it be to turn ZODB's undo functionality in our UI? | 22:02 |
*** Aiste has quit IRC | 22:28 | |
tvon | I don't think it would be difficult | 22:48 |
*** Aiste has joined #schooltool | 22:50 | |
*** Aiste has quit IRC | 22:55 | |
*** ignas has quit IRC | 23:14 | |
*** Aiste has joined #schooltool | 23:25 | |
*** SteveA_ has quit IRC | 23:33 | |
*** SteveA_ has joined #schooltool | 23:48 |
Generated by irclog2html.py 2.15.1 by Marius Gedminas - find it at mg.pov.lt!