=== maxb_ is now known as maxb [00:23] EdwinGrubbs: https://code.launchpad.net/~thumper/launchpad/branch-api-expose-package-bits/+merge/19550 ? [00:23] EdwinGrubbs: very trivial === jamalta is now known as jamalta-afk [03:19] thumper: feel free to review https://code.edge.launchpad.net/~mwhudson/launchpad/unicod-branch-names-bug-449528/+merge/19572 later if you like :-) [09:36] on call: noodles775 || reviewing: - || queue [adiroiban(bug-509252-take-2)] || This channel is logged: http://irclogs.ubuntu.com || https://code.edge.launchpad.net/launchpad/+activereviews === noodles775 changed the topic of #launchpad-reviews to: on call: noodles775 || reviewing: - || queue [adiroiban(bug-509252-take-2)] || This channel is logged: http://irclogs.ubuntu.com || https://code.edge.launchpad.net/launchpad/+activereviews === noodles775 changed the topic of #launchpad-reviews to: on call: noodles775 || reviewing: adiroiban(bug-509252-take-2) || queue [] || This channel is logged: http://irclogs.ubuntu.com || https://code.edge.launchpad.net/launchpad/+activereviews [11:15] noodles775, I have one with 2500 removed lines; can you take it? [11:16] salgado: pop it in the queue :), it sounds *fab* (-: === salgado changed the topic of #launchpad-reviews to: on call: noodles775 || reviewing: adiroiban(bug-509252-take-2) || queue [salgado] || This channel is logged: http://irclogs.ubuntu.com || https://code.edge.launchpad.net/launchpad/+activereviews [11:18] adiroiban: hi! thanks for all the cleanups that you included in your branch! [11:19] noodles775: hi. [11:19] everything is ok? [11:20] I should have done those changed one month ago, but by then I didn't know to much about LP [11:20] :), I was keen to know more of the background for removing the security check from the model code? [11:20] basicaly, I was cleaning some mess generated be me [11:21] Usually it needs to be both on the model and the view as view checks won't be relevant for API calls? [11:21] s/to be/to be used [11:22] talking with henninge, and I think there was also an email on lp-dev ml, [11:22] * noodles775 reads [11:22] we decided not to include check_permission code in the model [11:24] noodles775: the problem is that check_permission does not take a user parameter and assumes the request user. You don't have that in the model. [11:24] the request [11:25] henninge: maybe we can add a new check_permission_with_user helper [11:25] adiroiban: no, we just need to add a user parameter to check_permission. Somebody suggested that on the ML, too. [11:26] :) [11:26] or that :) [11:36] noodles775: even in the code that is now in trunk there is no security check in the model [11:37] and they are done in 4 other places in the view [11:38] and the model.distroseries.checkTranslationViewable() is only called from the view [11:38] there is no other place in the model to call it [11:39] henninge, adiroiban: So if I'm understanding the email thread correctly, this branch is going *against* what was recommended isn't it? [11:40] adiroiban: yeah, I'm just trying to find where that security adapter is used. [11:40] noodles775: sorry, which email thread? [11:41] henninge: RFD: Overhauling the Launchpad authorization adapters [11:41] noodles775: I don't think it is against... as there is no check_permission in the model, or why do you think it is agains the recomandations? [11:41] AFAICS, the security check should go on the model, and be called by both the security adapter and the view? [11:42] adiroiban: if someone comes along later and exposes this via the API? [11:42] noodles775: yes, that is the current recommendation. [11:46] henninge, noodles775 , then we have to extend check_permission [11:46] because the current code from the model [11:46] is only doing half of the security checks [11:47] adiroiban: if you take a look at lib/lp/registry/interfaces/person.py:addMember() [11:48] you'll see it's got a reviewer attribute, which is set to the request user when this is accessed via the API. [11:48] Could adding a similar param to your model code check work similarly? [11:49] Or would that be dependent on check_permission having the extra param... hrm. [11:49] noodles775: no, because in my case, the security is done using classes from security.py [11:51] I am not sure that addind security related check in the model is a good idea. There must be a good reason why in zope we have the securityproxy, and the security checks are not done in the model layer [11:52] adiroiban: did you see BjornT's reply in the email? [11:54] noodles775: this one: https://lists.launchpad.net/launchpad-dev/msg02063.html ? [11:56] no, from the more recent thread above... hang on. [11:56] adiroiban: https://lists.launchpad.net/launchpad-dev/msg02504.html [11:56] noodles775: no. I'm reading the thread now [11:57] Specifically: We already have this. Have the check in model code, and have the security adapter ask the model. [11:57] OK. [12:04] noodles775: thanks. then I will have to extend check_permission and then come back to this branch [12:05] adiroiban: I'm not sure that you will need to (based on BjornT's reply)... [12:06] adiroiban: if you need to include the current user in the permission check, can't you: [12:06] 1. add an optional requestor param to the model security check, and then, [12:06] 2. Call this directly from the view, and [12:07] noodles775: this will not solve the current problem, as I need to use check_permissions [12:07] in the model [12:07] and check_permission does not accept an user param [12:08] adiroiban: ok, I didn't yet see the need to call check_permission from the model code... where is that call? [12:08] and like Barry Warsaw said, adding more security checks in the model is not a good idea for the long term [12:09] noodles775: in my branch, look at check_distroseries_translations_viewable from browser_helper.py [12:10] Sure, it's something the security infrastructure should manage, but in cases like these, until it does, moving them to the view has issues too. [12:10] * noodles775 checks [12:12] if you look in the diff, you will see that checkTranslationsViewable() was allwasy called toghere with check_permission [12:12] together [12:13] and when changing check_permission in one place, it is easy to forget about the other place it is called together with checkTranslationsViewable [12:13] ? [12:13] adiroiban: yeah, so unless I've missed something, all you need to do is update AdminDistroSeriesLanguage.checkAuthenticated() to additionally call distroseries.checkTranslationsViewable()? [12:15] yes... but then distroseries.checkTranslationsViewable() will have to call AdminDistributionTranslations.checkAuthenticated [12:15] why? if all callsites use check_permission? (sorry if I've missed something obvious) [12:18] (ie. ignore my point 2 above, you'd use the check_permission call in the view as well, as is done currently) [12:19] from my point of view checkTranslationsViewable() is design for an exception [12:19] not for the rule [12:19] and all the „normal” rules are in security.py [12:19] this is why I was expecting to see the exception based on the „normal rules” [12:19] and not the „normal rules” based on the exception code [12:20] please let me know if I did not make myself understood [12:22] I hadn't thought about it in terms of what is based on what, but rather, how can the code be organised so that the check is in the one place to cover both the view, and other modes of access (such as the API). [12:23] s/view/browser view [12:27] the new check_distroseries_translations_viewable is called from the URL traversal code for each object [12:27] so it should also protect the API... or not ? [12:32] adiroiban: I hadn't seen the context of that, so yes (I think) it would, but couldn't/shouldn't it use check_permission? [12:33] it does use check_permission [12:33] (assuming the above changes.) [12:33] No, I mean the other way around, it should call the standard check_permission(), which would call the model's extra permission check. [12:34] gar, s/check_permission()/check_permission() directly [12:37] noodles775: Then I will have to move the logic from browser_helpers.py to security.py [12:37] is that what you are saying? [12:40] noodles775: no, as per the email, the logic would stay on the model (where it currently is), but be called by the security check in security.py. [12:40] adiroiban: ^^ [12:40] :) [12:40] but I can not use check_permission() from the model [12:40] * noodles775 thinks it's way past his lunch break - brain is doing crazy things ;) [12:41] no hurry [12:41] we can continue after lunch [12:42] adiroiban: OK, that's the thing that I need clarified... I'm not currently seeing why you need to call check_permission from the model code. [12:42] * noodles775 goes to lunch [12:42] enjoy your meal :) [12:42] Ta! === bigjools is now known as bigjools-lunch [13:34] So adiroiban, why would you need to call check_permission from the model code? [13:34] because launchpad admins are allowed to see series with hidden translations === mrevell is now known as mrevell-lunch [13:35] while for other the translations should be hidden [13:39] even if we move that method/function in the model [13:39] it will not be called from the model [13:39] or is URL traversal part of the model? [13:40] adiroiban: yes, but the view would be calling check_permission() directly, which would check exactly that (as it currently does) and then additionally call the IDistroSeries.checkTranslationsViewable() where necessary (ie. when they are not an admin). [13:40] And the URL traversal would also call check_permission() [13:40] noodles775: ok. I think I got it [13:40] :) [13:41] let me move the code and then show you the diff [13:41] OK, I'll summarise that on the MP and mark it as needs fixing... you can then attach the diff to your reply, thanks! [13:41] noodles775: so you want to replace all calls for check_distroseries_translations_viewable from the view [13:41] with just check_permission [13:42] Yes, assuming that your check_permission will also call IDistroSeries.checkTranslationsViewable(). [13:42] noodles775: it should :) [13:42] thanks! [13:43] np! [13:45] noodles775: there is still one detail [13:45] yep? [13:45] Danilo told me that the security check was not done in the security.py [13:45] so that the users will see a proper message [13:45] not „accees denied” [13:45] Right... hrm... [13:45] my check_distroseries_translations_viewable is doing 2 checks [13:46] one for launchpad.view [13:46] and one for launchpad.TranslatonsAdmin [13:47] adiroiban: where is that currently? All I can see are difirent exception strings in checkTranslationsViewable()... which are not permission related? [13:48] s/difirent/different ugh. [13:48] in the current code from trunk, the model.distroseries.checkTranslationsViewable is not doing any security checks [13:49] but if you search for the places where it is called [13:49] you will see there is a security check before each call [13:49] * noodles775 looks [13:50] and there is also some delegation from translations.browser.distroseries.checkTranslationsViewable [13:50] which is doing some security checks and the it call registry.model.distroseries.checkTranslationsViewable === salgado changed the topic of #launchpad-reviews to: on call: noodles775 || reviewing: adiroiban(bug-509252-take-2) || queue [salgado*2] || This channel is logged: http://irclogs.ubuntu.com || https://code.edge.launchpad.net/launchpad/+activereviews [13:57] adiroiban: so is this an accurate summary: The view code needs to call the model code's check directly as it depends on exceptions being raised for non-admins, to give an appropriate message? [13:57] sorry salgado :/ [13:58] noodles775, ? [13:59] noodles775: not sure if is „model code's check” [13:59] salgado: that I still haven't gotten to your first review. [13:59] oh, no worries [13:59] the view needs to choose between checking for launchpad.View or launchpad.TranslationsAdmin [13:59] and this decision is based on the state of the distroseries [14:01] so yes. the view needs to call/read something from the model [14:01] in order to take the correct decission regarding what permission and error message to display [14:01] Right, so simply: if the user isn't a translations admin and translations are hidden, return a meaningful error. [14:02] yes... a meaningful error based on the series status [14:02] Yep... [14:03] OK, I think you were right to move most of checkTranslationsViewable() to the view, as most of it is not a security check, but error generation. Only the first 3 lines should be part of the security. [14:04] * noodles775 thinks a bit more. [14:06] noodles775: the first 3 lines are in fact http://paste.ubuntu.com/379087/ [14:06] i guess [14:06] adiroiban: yes, exactly. [14:07] the probles is with this conditional security check [14:07] problem [14:10] it was the same issue that triggered Henning's email in December https://lists.launchpad.net/launchpad-dev/msg02061.html [14:13] adiroiban: http://pastebin.ubuntu.com/379097/ [14:14] if they have admin, they will see it, if they have view, they will see it, if they don't have view permission (because the hidden check would be in the security.py check for launchpad.View), they get the relevant error? [14:15] Ah, this then hits the problem that someone with Admin won't necessarily have View? [14:15] But that's easy to fix in security.py (by being explicit). === mrevell-lunch is now known as mrevell [14:17] looking [14:17] So we're really missing a DistroSeriesLanguageView class in security.py I think? [14:18] noodles775: DistroSeriesLanguageAdminTranslations should call DistroSeriesAdminTranslation, which should call DistributionAdminTranslations [14:20] adiroiban: what's your skype id... might be quicker to discuss this :) [14:20] and you code is also in DistroSeriesNavigation [14:20] and your code is also in DistroSeriesNavigation [14:20] and it should be called from the translation URL traversal for DistroSeries and SourcePackage [14:21] hm... [14:21] let me install skype first :) [14:21] yes, it's an example just to separate the security from the error msg. [14:21] the id should be adiroiban === mup_ is now known as mup === bigjools-lunch is now known as bigjools [14:39] noodles775, could you please review https://code.edge.launchpad.net/~abentley/launchpad/restricted-diffs/+merge/19607 ? [14:39] abentley: please add it to the queue, if I don't get to it, someone else will. === abentley changed the topic of #launchpad-reviews to: on call: noodles775 || reviewing: adiroiban(bug-509252-take-2) || queue [salgado*2, abentley] || This channel is logged: http://irclogs.ubuntu.com || https://code.edge.launchpad.net/launchpad/+activereviews [14:40] noodles775: please allow me to install and make skype working on my computer, and also have lunch and will come back in about 30 minutes [14:41] adiroiban: np, I'll update the MP for the moment, enjoy your lunch! === salgado is now known as salgado-lunch [14:51] henninge: can you please take a look at my comment on adiroiban's MP at: https://code.edge.launchpad.net/~adiroiban/launchpad/bug-509252-take-2/+merge/19484 [14:52] and let me know if it's sane? === noodles775 changed the topic of #launchpad-reviews to: on call: noodles775 || reviewing: salgado || queue [salgado, abentley] || This channel is logged: http://irclogs.ubuntu.com || https://code.edge.launchpad.net/launchpad/+activereviews [14:55] noodles775, got another one for your queue... is that too much? https://code.launchpad.net/~jtv/launchpad/bug-507681/+merge/19531 [14:55] jtv: yeah, I probably won't get to it (as I'll need to come back to an earlier review too), but put it on and we'll see :) [14:56] noodles775: will do === jtv changed the topic of #launchpad-reviews to: on call: noodles775 || reviewing: salgado || queue [salgado, abentley, jtv] || This channel is logged: http://irclogs.ubuntu.com || https://code.edge.launchpad.net/launchpad/+activereviews [15:02] noodles775: back. skype test was working, skypeid adiroiban [15:04] salgado-lunch: when you're back, are there further branches coming? If I run a local server, I can't login... [15:04] adiroiban: great... one tic. === matsubara is now known as matsubara-lunch === bigjools changed the topic of #launchpad-reviews to: on call: noodles775 || reviewing: salgado || queue [salgado, abentley, jtv, bigjools] || This channel is logged: http://irclogs.ubuntu.com || https://code.edge.launchpad.net/launchpad/+activereviews [15:39] abentley: everything's stuck on 507681 now... can I get you to review it? [15:40] abentley: this mp: https://code.launchpad.net/~jtv/launchpad/bug-507681/+merge/19531 [15:41] jtv, is there a reason you want me specifically? Otherwise, I'd rather leave it to the OCR. [15:42] abentley: one of the wellington gang would be nice. Plus, OCR is backlogged, and this way you get to unblock your own branch-url branch. :-) [15:43] * jtv watches shouting mobs outside... must be a big football match on [15:43] here comes the police... [15:43] ...and the riot police vehicle. Sport at its best! [15:44] jtv: it didn't happen without pictures [15:44] damn [15:44] hang on [15:44] jtv, I'll see. I've got a lot going on right now. [15:51] bigjools: the action seems to have shifted out of range. Thank you, Erwin Rommel, for popularizing the meeting engagement. [15:51] abentley: I'll shop around a bit more. [15:51] does Godwin's law apply here already? [15:51] bigjools: it doesn't work that way. [15:52] bigjools: but since we're talking, can I get you to review a buildfarm branch that we have several other branches blocked on? [15:52] jtv: how big? [15:53] bigjools: see for yourself... https://code.launchpad.net/~jtv/launchpad/bug-507681/+merge/19531 [15:53] jtv: might be able to look a bit later [15:54] in an hour or so [15:54] bigjools: I would be indebted to the tune of several good beers [15:54] jtv, the diff has conflicts. [15:54] * bigjools will hold you to that at the next epic [15:54] bigjools: let's hope it's in Belgium. [15:54] ah you're going to uds? [15:54] abentley: thanks for pointing that out! [15:55] bigjools: no plans, no [15:55] oh, beers... belgium.... [15:55] I prefer ale from England ;) === matsubara-lunch is now known as matsubara === salgado-lunch is now known as salgado [15:56] noodles775, what happens when you try to login? [15:56] bigjools: I only recently had the chance to learn about proper ales [15:56] fixing the conflicts now... that's what I get for updating copyright dates. [15:56] salgado: DiscoveryFailure: HTTP Response status from identity URL host is not 200. Got status 503
[15:56] ah, sirens now [15:57] noodles775, when people review one of these branches I always forget to mention they need to add testopenid.dev to /etc/hosts [15:57] sorry [15:57] noodles775, btw, flacoste has just approved that branch of mine [15:57] salgado: great. [15:57] jtv, with pipelines, the recommended way to merge is to merge into the first pipe, then run 'bzr pump'. [15:58] * noodles775 checks the size of abentley's branch. [15:58] abentley: just what I was doing... I'm getting used to pipelines already [15:58] Nice. === sinzui1 is now known as sinzui [16:01] jtv, cool. Then you can check out pump --from-submit next time, which automates it even further. [16:01] salgado: i wanted to share the pleasure of remoing 2k lines! [16:02] abentley: oh! That's nice. === noodles775 changed the topic of #launchpad-reviews to: noodles775 || reviewing: abentley || queue [jtv, bigjools] || This channel is logged: http://irclogs.ubuntu.com || https://code.edge.launchpad.net/launchpad/+activereviews [16:04] flacoste, it felt good indeed. :) [16:13] noodles775: I will take care of Adi's branch. [16:15] henninge: thanks. [16:20] abentley: your branch looks great. The only question I have is whether there's really a need to include each segment of the url in the doctest: http://code.launchpad.dev/~person-name.../product-name.../branch.../+merge/.../+preview-diff/+files/preview.diff [16:21] noodles775, I would be fine with just showing "/+preview-diff/+files/preview.diff". Would you prefer that? [16:22] abentley: yeah (not that I care much either way, it'd just mean it was within 78chars :)) [16:22] kfogel, care to review a wording change you suggested? https://code.launchpad.net/~jtv/launchpad/bug-299008/+merge/19628 [16:23] jtv: looking (but I'm not officially a reviewer) [16:23] kfogel: I don't think anybody would object in this case [16:24] jtv: I'll just note that in my review so it's all above board, np. [16:24] kfogel: thanks [16:25] jtv: heh, nice note [16:25] :) [16:27] jtv: approved [16:27] kfogel: sheishei [16:28] kfogel: "䄟䄟"? [16:28] jtv: :-) modern romanization: "xie xie"; older romanization system: "hsieh hsieh"; actual pronounciation "shuh-yea shuh-yea" :-) [16:28] jtv: hunh, my xchat isn't displaying that right, unfortunately [16:28] kfogel: China Airlines, apparently, is not the most precise of Mandarin schools. [16:29] kfogel: wrong character set... never mind [16:29] jtv: odd, because their academic reputation is excelelnt [16:29] gotta be better than their flight safety reputation :) [16:30] (never had any trouble myself, but istrm hearing something about that) === noodles775 changed the topic of #launchpad-reviews to: on call: - || reviewing: - || queue [jtv, bigjools] || This channel is logged: http://irclogs.ubuntu.com || https://code.edge.launchpad.net/launchpad/+activereviews [16:40] thanks noodles775, enjoy your evening! [16:41] jtv: was that sarcasm? I didn't get to your branch ;) You too! [16:42] noodles775: no sarcasm—at least I'm at the front of the queue now, when there was a fair backlog ahead of me earlier === deryck is now known as deryck[lunch] [17:24] uh. nobody on call. [17:31] rockstar: are you available to review a multiversion branch? [17:31] leonardr, yes. [17:31] gary: if it's something i can take, i can review while my own branch is in review [17:31] rockstar: ok, on the way [17:31] gary_poster, I am OCR today, but had a personal errand this morning. === rockstar changed the topic of #launchpad-reviews to: on call: rockstar || reviewing: leonardr || queue [jtv, bigjools] || This channel is logged: http://irclogs.ubuntu.com || https://code.edge.launchpad.net/launchpad/+activereviews [17:32] leonardr, rockstar: ok thank you. I got it taken care of I think. === bigjools changed the topic of #launchpad-reviews to: on call: rockstar || reviewing: leonardr || queue [jtv, bigjools*2] || This channel is logged: http://irclogs.ubuntu.com || https://code.edge.launchpad.net/launchpad/+activereviews === henninge is now known as henninge-afk === gary_poster is now known as gary-lunch [17:58] rockstar: https://code.edge.launchpad.net/~leonardr/lazr.restful/launchpad-integration/+merge/19639/ === deryck[lunch] is now known as deryck === rockstar changed the topic of #launchpad-reviews to: on call: rockstar || reviewing: bigjools || queue [jtv, bigjools] || This channel is logged: http://irclogs.ubuntu.com || https://code.edge.launchpad.net/launchpad/+activereviews === gary-lunch is now known as gary_poster === rockstar changed the topic of #launchpad-reviews to: on call: rockstar || reviewing: bigjools || queue [] || This channel is logged: http://irclogs.ubuntu.com || https://code.edge.launchpad.net/launchpad/+activereviews [19:26] * rockstar cooks through the backlog of reviews [19:27] * abentley reminds rockstar of the UI review [19:27] abentley, yup, I know. [19:47] abentley, ui=rockstar for you === rockstar changed the topic of #launchpad-reviews to: on call: rockstar || reviewing: || queue [] || This channel is logged: http://irclogs.ubuntu.com || https://code.edge.launchpad.net/launchpad/+activereviews [19:49] rockstar, thanks! [19:50] rockstar, what do you think about the two shades of yellow? [19:53] abentley, well, I'm not sure if it really matters. [19:53] abentley, maybe the diff message should be blue, indicating "informational" but yellow also seems to indicate "stale" so I'm a little conflicted. [19:53] I didn't think it was a big enough deal to even worry about. [19:54] If someone complains, then we can re-evaluate. [19:54] rockstar, I didn't actually get that "yellow means stale". I thought it meant "note". [19:55] abentley, I think it means "caution" but when I was looking at the comments, I almost felt like it was like old yellowed paper. I don't know. [19:55] rockstar, Anyhow, we might want to look at settling on one shade of yellow. [19:56] abentley, yeah, but I don't think it's a huge issue, so don't go out of your way for it. === salgado is now known as salgado-afk [20:49] bac: can you look at the incremental diff I added to https://code.edge.launchpad.net/~edwin-grubbs/launchpad/bug-99395-linking-sourcepackages-to-projects/+merge/19429 [20:49] * bac looks [20:51] looks good EdwinGrubbs [20:52] thanks === EdwinGrubbs is now known as Edwin-lunch === matsubara is now known as matsubara-afk === sinzui changed the topic of #launchpad-reviews to: on call: rockstar || reviewing: || queue [sinzui] || This channel is logged: http://irclogs.ubuntu.com || https://code.edge.launchpad.net/launchpad/+activereviews [21:53] rockstar: do you have time for a short branch: https://code.launchpad.net/~sinzui/launchpad/packaging-timeout-bug-523886/+merge/19660 [21:59] sinzui, for you, sure. === rockstar changed the topic of #launchpad-reviews to: on call: rockstar || reviewing: sinzui || queue [] || This channel is logged: http://irclogs.ubuntu.com || https://code.edge.launchpad.net/launchpad/+activereviews === Edwin-lunch is now known as EdwinGrubbs