*** pcardune has quit IRC | 00:46 | |
*** dlobo has joined #schooltool | 00:49 | |
*** dlobo has quit IRC | 01:20 | |
defunkt2 | awsome... | 02:33 |
---|---|---|
defunkt2 | np guys... how long this project been in develpment? | 02:34 |
*** dlobo has joined #schooltool | 02:40 | |
replaceafill | defunkt2, http://book.schooltool.org/htmlhelp/history.html :) | 03:42 |
defunkt2 | ooh.. its been here longer than i thought | 03:43 |
*** replaceafill has quit IRC | 05:06 | |
*** replaceafill has joined #schooltool | 05:11 | |
*** th1a has quit IRC | 06:23 | |
*** dlobo has quit IRC | 06:51 | |
*** defunkt2 has quit IRC | 07:19 | |
*** aelkner has quit IRC | 07:19 | |
*** replaceafill has quit IRC | 08:42 | |
*** defunkt2 has joined #schooltool | 09:14 | |
*** aelkner has joined #schooltool | 09:14 | |
*** Aiste has joined #schooltool | 09:47 | |
*** menesis has joined #schooltool | 10:01 | |
*** alga has joined #schooltool | 10:59 | |
*** mgedmin has joined #schooltool | 11:27 | |
*** Lumiere has quit IRC | 12:52 | |
*** Lumiere has joined #schooltool | 12:54 | |
*** alga has quit IRC | 12:57 | |
*** ignas has joined #schooltool | 13:00 | |
*** Aiste has quit IRC | 13:00 | |
*** alga has joined #schooltool | 13:00 | |
*** th1a has joined #schooltool | 14:34 | |
*** dlobo has joined #schooltool | 15:03 | |
*** jelkner has joined #schooltool | 15:06 | |
*** replaceafill has joined #schooltool | 15:25 | |
*** dlobo has quit IRC | 16:10 | |
*** dlobo has joined #schooltool | 16:17 | |
replaceafill | yvl, do you have time for a couple of questions? | 16:30 |
yvl | morning, replaceafill, aelkner | 16:31 |
yvl | sure, replaceafill :) | 16:31 |
replaceafill | yvl, great, first IBoundContacts | 16:31 |
replaceafill | use case: teacher needs to send email to a kids contact | 16:32 |
replaceafill | teacher is instructor in a kid's section | 16:32 |
replaceafill | so teacher can see kid's info | 16:32 |
replaceafill | but when the teacher hits the "Contacts" button in the kid's index page | 16:32 |
replaceafill | he get's a login screen | 16:32 |
replaceafill | i used you Security Log :D | 16:32 |
*** dlobo has quit IRC | 16:32 | |
replaceafill | and noticed that the problem is in | 16:32 |
yvl | uhh ouch | 16:33 |
replaceafill | contact.browser.basicperson.ContactOverviewView | 16:33 |
*** aelkner has quit IRC | 16:33 | |
yvl | what was the last security check? | 16:33 |
replaceafill | i get this at the end | 16:33 |
replaceafill | # Deny schooltool.view on <schooltool.contact.basicperson.BoundContact object at 0xbbfb4ec> | 16:33 |
replaceafill | # Crowds: <AggregateCrowd crowds=[<AggregateCrowd crowds=[<AdministratorsCrowd>, <ClerksCrowd>, <ManagersCrowd>]>, <OwnerCrowd>, <PersonInfoViewersCrowd>, <ContactPersonInstructorsCrowd>]> | 16:33 |
replaceafill | lisppaste5, url | 16:34 |
yvl | lisppaste5 is in coma, it seems | 16:34 |
replaceafill | :D | 16:34 |
yvl | hit by a truck or something | 16:34 |
replaceafill | :)) | 16:34 |
replaceafill | that last ContactPersonInstructorsCrowd got my attention | 16:34 |
replaceafill | i thought, that should check that the teacher is actually an instructor for the kid | 16:34 |
replaceafill | and it does | 16:35 |
replaceafill | and it works | 16:35 |
replaceafill | the teacher can access the kid's contact | 16:35 |
replaceafill | like http://localhost/contacts/Contact | 16:35 |
replaceafill | the teacher can see that | 16:35 |
replaceafill | but the teacher cannot access the ContactOverviewView for some reason... | 16:35 |
yvl | odd | 16:36 |
replaceafill | i even removed everything from the ContactOverviewView template, thinking that maybe the template is trying to access something forbidden | 16:36 |
replaceafill | but still | 16:36 |
replaceafill | i get a login page | 16:36 |
yvl | ok, I'll try to debug that | 16:36 |
replaceafill | see? your security log tool works ;) | 16:37 |
yvl | ....... | 16:38 |
yvl | I wonder why it said DENY | 16:38 |
*** alga has quit IRC | 16:39 | |
yvl | you know what | 16:39 |
yvl | add __repr__ to the bound contact | 16:39 |
yvl | something like | 16:39 |
yvl | def __repr__(self): | 16:39 |
yvl | return '<BoundContact(%s)>' % self._person.__name__ | 16:40 |
yvl | just for debugging | 16:40 |
replaceafill | adding.. | 16:40 |
replaceafill | done | 16:41 |
replaceafill | should i check the security log again? | 16:41 |
replaceafill | or use prints somewhere | 16:42 |
yvl | yes, security log | 16:44 |
yvl | it should print # Deny schooltool.view on <BasicPerson(student-username-something)> | 16:44 |
replaceafill | http://pastebin.com/XtTguKEY | 16:44 |
replaceafill | yes | 16:44 |
replaceafill | BoundContact(ariana) | 16:45 |
replaceafill | the teacher can see ariana's index page | 16:45 |
yvl | that is very odd | 16:46 |
yvl | are you working with st trunk? | 16:46 |
replaceafill | yes | 16:46 |
*** aelkner has joined #schooltool | 16:46 | |
replaceafill | yvl, i'm using your sprint branch for the logging | 16:46 |
replaceafill | but i get the same login screen in trunk | 16:46 |
yvl | hmm, I cannot reproduce | 16:47 |
replaceafill | hhmm | 16:48 |
yvl | well, if it got deny, then ContactPersonInstructors crowd also failed | 16:48 |
yvl | do an old fashioned import pdb; pdb.set_trace() | 16:48 |
yvl | or, add print's | 16:48 |
replaceafill | i did | 16:48 |
replaceafill | in that crow | 16:48 |
replaceafill | crowd | 16:48 |
yvl | and? | 16:49 |
replaceafill | and i noticed that when tom tries to access ariana's contactoverviewview | 16:49 |
replaceafill | self.context.persons is empty | 16:49 |
replaceafill | because i guess the crowd works for a contact | 16:49 |
replaceafill | no a boundcontact | 16:49 |
yvl | what is self.context ? | 16:49 |
replaceafill | contact.persons -> students | 16:50 |
replaceafill | in that case, self.context -> boundcontact for ariana | 16:50 |
yvl | is it the right self.context? | 16:50 |
replaceafill | let me check again | 16:50 |
replaceafill | if user.username == 'tom' and self.contex._person.username == 'ariana': | 16:51 |
replaceafill | import pdb; pdb.set_trace() | 16:51 |
replaceafill | in that crowd | 16:51 |
replaceafill | and self.context... | 16:51 |
replaceafill | ok, login as tom, the teacher | 16:53 |
replaceafill | go to ariana's index | 16:53 |
replaceafill | hit Contacts | 16:53 |
replaceafill | pdb.set_trace works | 16:53 |
replaceafill | (Pdb) self.context | 16:53 |
replaceafill | <BoundContact(ariana)> | 16:53 |
replaceafill | (Pdb) [v for v in self.context.persons] | 16:53 |
replaceafill | [] | 16:53 |
replaceafill | because the student is not a contact for other students | 16:54 |
yvl | ooooooh | 16:54 |
yvl | found out why | 16:55 |
replaceafill | my tiny brain thinks that crowd works on Contacts | 16:55 |
replaceafill | not BoundContacts | 16:55 |
replaceafill | why? | 16:55 |
yvl | # XXX: hack to obtain basic person, because if we write an adapter | 16:55 |
yvl | # to it, all objects adaptable to IBasicPerson will get indexed. | 16:55 |
yvl | # This is to be removed as soon as basic person catalogs learn | 16:55 |
yvl | # how to index *only* basic persons. | 16:55 |
yvl | person = self.context | 16:55 |
yvl | ere you go | 16:55 |
replaceafill | :| | 16:55 |
yvl | schooltool.basicperson.security.py | 16:55 |
replaceafill | personinfoviewercrowd | 16:56 |
yvl | yes | 16:56 |
yvl | I wonder why getParent did not work there | 16:56 |
replaceafill | want me to put the pdb there? | 16:56 |
yvl | no, it's my bug from now on | 16:58 |
replaceafill | :) | 16:58 |
yvl | the thing is, that we need an adapter to IPerson from IBoundContact | 16:58 |
replaceafill | :O | 16:59 |
yvl | the actual crowd to work is schooltool.course.section.PersonInstructorsCrowd | 16:59 |
yvl | but the XXX in schooltool.basicperson.security explains why we do not have one | 16:59 |
replaceafill | i see | 17:00 |
yvl | I'll fix the catalog soon | 17:00 |
replaceafill | cool, i'm cheating in the tests right now | 17:00 |
replaceafill | opening access for everyone | 17:00 |
replaceafill | yvl, getParent does get the basicperson | 17:03 |
yvl | but not in PersonInstructorsCrowd | 17:04 |
yvl | oh, wait | 17:04 |
yvl | it isn't even listed | 17:04 |
th1a | yvl: not to break your train of thought, but before you sign off, I'd like to schedule a meeting for tomorrow. | 17:06 |
yvl | go ahead th1a | 17:07 |
yvl | replaceafill: try putting tom into 'teachers' group at the same year | 17:08 |
yvl | it should work | 17:08 |
replaceafill | it is | 17:08 |
replaceafill | let me check | 17:08 |
replaceafill | yes, he is in the teachers group | 17:10 |
yvl | oh my god | 17:10 |
replaceafill | yvl, question, the PersonInstructorsCrowd is not in the security log, correct? | 17:10 |
yvl | just read the personinfoviewers implementation | 17:10 |
yvl | it turns out | 17:10 |
replaceafill | so, the view is not trying to use it? | 17:11 |
yvl | (this is gonna be a good one) | 17:11 |
yvl | that you can look at person info | 17:11 |
yvl | if they are teachers | 17:11 |
yvl | this year | 17:11 |
th1a | yvl: I'll have the main feature requests from the preliminary grant proposals loaded as bugs in Launchpad by tomorrow. I'd like to go through them and apply guesstimates and ask questions tomorrow. | 17:14 |
yvl | sounds great | 17:15 |
yvl | 9:30 your time tomorrow? | 17:15 |
th1a | 8:30 is ok with me. | 17:16 |
th1a | So that's... 1230 UTC? | 17:16 |
yvl | its 11:16 now in Providence? | 17:16 |
th1a | Yes. | 17:18 |
yvl | ok then | 17:18 |
yvl | 8:30 | 17:18 |
yvl | it will be 14:30 here | 17:18 |
th1a | OK. See you then. | 17:20 |
replaceafill | yvl, last question then | 17:20 |
yvl | shoot | 17:21 |
replaceafill | is it possible to know how many pages a PDF will have | 17:21 |
replaceafill | use case: | 17:21 |
replaceafill | wee need to put a signature space for a report in the last page | 17:21 |
replaceafill | in CanDo | 17:21 |
replaceafill | the first page needs a logo | 17:21 |
replaceafill | the second, third and other pages dont need a logo | 17:22 |
replaceafill | but sometimes, the report can be only a single page | 17:22 |
yvl | ( th1a, please assign https://bugs.launchpad.net/schooltool.intervention/+bug/540963 to someone, once you have free time to look at LP ) | 17:22 |
replaceafill | i was using a 'front_page' style sheet for the first page | 17:22 |
yvl | so far so good | 17:23 |
replaceafill | and the signature space was there too | 17:23 |
replaceafill | but now dwelsh wants the signature space at the last page | 17:23 |
replaceafill | so, i thought, i need a special stylesheet for the last page | 17:23 |
replaceafill | i know rml has support for firstpage style or something like that | 17:24 |
replaceafill | firstPageTemplate="front_page" | 17:25 |
th1a | yvl: Already did. | 17:25 |
th1a | You can just give all intervention bugs to aelkner. | 17:25 |
yvl | great | 17:25 |
th1a | replaceafill: Uh oh. | 17:26 |
replaceafill | th1a? | 17:26 |
yvl | replaceafill I doubt that you can specify something like lastPageTemplate | 17:26 |
th1a | Yes. | 17:26 |
replaceafill | yes :( | 17:26 |
th1a | Ask him if it can go on the front page. | 17:26 |
replaceafill | th1a, he said it could but if we changed the position of the signature :) | 17:27 |
yvl | one solution would be add the logo as the flowable | 17:27 |
yvl | appending to the story | 17:27 |
yvl | maybe flowables can 'snap' to bottom of the page | 17:28 |
replaceafill | flowables... | 17:28 |
replaceafill | looking... | 17:28 |
yvl | well, flowables ar all elements within a story | 17:28 |
yvl | like paragraphs, images | 17:28 |
replaceafill | ah | 17:28 |
replaceafill | RML for Idiots!!! | 17:30 |
replaceafill | a doc just for me ;) | 17:30 |
replaceafill | ok yvl, now for real, last dumb question | 17:32 |
replaceafill | in a browser = Browser(...) | 17:32 |
replaceafill | in a ftest | 17:32 |
replaceafill | we have browser.serve() | 17:32 |
yvl | go on... | 17:32 |
replaceafill | to start the server for debuggin right | 17:32 |
replaceafill | and it launches your browser | 17:32 |
replaceafill | with localhost:8000 | 17:32 |
replaceafill | and the user that you specified in Browser('tom', 'tom') | 17:33 |
replaceafill | my question is, do you know if it's possible to log in as another user | 17:33 |
replaceafill | in the same session? | 17:33 |
yvl | hmm | 17:34 |
yvl | never tried it | 17:34 |
replaceafill | ah ok, never mind then :) | 17:34 |
replaceafill | just a question that came to me | 17:34 |
replaceafill | since Log out doesn't work | 17:34 |
replaceafill | but it's ok, no biggie | 17:34 |
replaceafill | thanks yvl | 17:34 |
*** dlobo has joined #schooltool | 17:35 | |
yvl | if you really need it | 17:35 |
yvl | you can change browser.username and browser.password | 17:36 |
yvl | before browser.serve() | 17:36 |
yvl | evil, but should work | 17:36 |
replaceafill | but not in the web browser, right? | 17:36 |
yvl | that I didn't try | 17:36 |
yvl | so - dunno... | 17:37 |
replaceafill | ok | 17:37 |
replaceafill | yvl, thanks again, those were my only questions | 17:37 |
yvl | allright then | 17:41 |
yvl | happy coding ;) | 17:41 |
yvl | (and don't spend too much time struggling with rml... I'm not that confident that you can add the logo at the bottom of the page easily) | 17:42 |
yvl | (and I'd guess that you can't add logo to the _top_ of the last page) | 17:42 |
replaceafill | ah ok | 17:43 |
*** Aiste has joined #schooltool | 17:57 | |
*** mgedmin has quit IRC | 18:38 | |
*** Aiste has quit IRC | 18:41 | |
*** dlobo has quit IRC | 18:59 | |
*** dlobo has joined #schooltool | 19:37 | |
*** replaceafill has quit IRC | 20:55 | |
*** dlobo has quit IRC | 22:06 | |
*** dlobo has joined #schooltool | 22:06 | |
*** dlobo has quit IRC | 22:12 | |
*** dlobo has joined #schooltool | 22:43 | |
*** dlobo has quit IRC | 23:30 | |
*** jelkner has quit IRC | 23:50 | |
ignas | yvl, FYI - the only way to log in as another user is to NOT give a user at all, as in - pass None and None, then - you will have to log in for the first URL, but the log in will be cookie based instead of http headers based | 23:50 |
Generated by irclog2html.py 2.15.1 by Marius Gedminas - find it at mg.pov.lt!