)]}'
{"refstack/api/controllers/vendors.py":[{"author":{"_account_id":10526,"name":"Catherine Diep","email":"cdiep@us.ibm.com","username":"cdiep"},"change_message_id":"46479c1c0385092ffbc0f5b10ef072870263d8ab","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        if not api_utils.check_user_is_vendor_or_foundation_admin(vendor_id):"},{"line_number":52,"context_line":"            return None"},{"line_number":53,"context_line":"        try:"},{"line_number":54,"context_line":"            _check_vendor_is_official(vendor_id)"},{"line_number":55,"context_line":"        except Exception:"},{"line_number":56,"context_line":"            return None"},{"line_number":57,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9aed3d3a_e8e99eb8","line":54,"range":{"start_line":54,"start_character":11,"end_line":54,"end_character":48},"updated":"2016-02-29 17:56:42.000000000","message":"Since we are listing the users of a vendor, as long as the user is a foundation admin or vendor admin,  the user should have privilege for the action.  Do we still need to check whether the vendor is official vendor?","commit_id":"798b70465b5c5b1d86c0182b0f900d73d5c659f4"},{"author":{"_account_id":11139,"name":"Egle","email":"ushnishtha@hotmail.com","username":"ushnishtha"},"change_message_id":"85ddfd0fb259f831e0a27a97bfedff0512a07863","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        if not api_utils.check_user_is_vendor_or_foundation_admin(vendor_id):"},{"line_number":52,"context_line":"            return None"},{"line_number":53,"context_line":"        try:"},{"line_number":54,"context_line":"            _check_vendor_is_official(vendor_id)"},{"line_number":55,"context_line":"        except Exception:"},{"line_number":56,"context_line":"            return None"},{"line_number":57,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"1af94dfe_538a4dc0","line":54,"range":{"start_line":54,"start_character":11,"end_line":54,"end_character":48},"in_reply_to":"3afc51ec_28bb1974","updated":"2016-03-16 18:54:21.000000000","message":"I think it is appropriate for users to have the option to add co-admins.","commit_id":"798b70465b5c5b1d86c0182b0f900d73d5c659f4"},{"author":{"_account_id":11139,"name":"Egle","email":"ushnishtha@hotmail.com","username":"ushnishtha"},"change_message_id":"f1f1873aab9def939df70b03898c72aee3f3677b","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        if not api_utils.check_user_is_vendor_or_foundation_admin(vendor_id):"},{"line_number":52,"context_line":"            return None"},{"line_number":53,"context_line":"        try:"},{"line_number":54,"context_line":"            _check_vendor_is_official(vendor_id)"},{"line_number":55,"context_line":"        except Exception:"},{"line_number":56,"context_line":"            return None"},{"line_number":57,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"5aef4532_37d00cf6","line":54,"range":{"start_line":54,"start_character":11,"end_line":54,"end_character":48},"in_reply_to":"5aef4532_146b4ef2","updated":"2016-03-09 17:03:48.000000000","message":"I think that vendor should be able to manage all users associated with it, regardless of approval status.","commit_id":"798b70465b5c5b1d86c0182b0f900d73d5c659f4"},{"author":{"_account_id":97,"name":"Daryl Walleck","email":"daryl.walleck@rackspace.com","username":"dwalleck"},"change_message_id":"0cc44b0e8978ec14855ccb5f52aacba563fa5fb9","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        if not api_utils.check_user_is_vendor_or_foundation_admin(vendor_id):"},{"line_number":52,"context_line":"            return None"},{"line_number":53,"context_line":"        try:"},{"line_number":54,"context_line":"            _check_vendor_is_official(vendor_id)"},{"line_number":55,"context_line":"        except Exception:"},{"line_number":56,"context_line":"            return None"},{"line_number":57,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"5aef4532_771574e3","line":54,"range":{"start_line":54,"start_character":11,"end_line":54,"end_character":48},"in_reply_to":"5aef4532_146b4ef2","updated":"2016-03-09 16:59:11.000000000","message":"Jumping in based on discussion at the midcycle. If an unapproved vendor can upload results for all intents and purposes be used normally, then it would make sense that user management should be enabled as well. If this ends up not being the case, then I would say that a vendor should not be able to perform other actions (upload/manage results) until they are approved. We should be consistent in one way or the other","commit_id":"798b70465b5c5b1d86c0182b0f900d73d5c659f4"},{"author":{"_account_id":11437,"name":"Jim Meyer","email":"jim@geekdaily.org","username":"jim.meyer"},"change_message_id":"00be6e8956ae0b0766f22789a9112dca6ce5b81f","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        if not api_utils.check_user_is_vendor_or_foundation_admin(vendor_id):"},{"line_number":52,"context_line":"            return None"},{"line_number":53,"context_line":"        try:"},{"line_number":54,"context_line":"            _check_vendor_is_official(vendor_id)"},{"line_number":55,"context_line":"        except Exception:"},{"line_number":56,"context_line":"            return None"},{"line_number":57,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"5aef4532_d74ba885","line":54,"range":{"start_line":54,"start_character":11,"end_line":54,"end_character":48},"in_reply_to":"5aef4532_771574e3","updated":"2016-03-09 17:06:11.000000000","message":"+1 on this as well as Chris and Egle\u0027s comments.","commit_id":"798b70465b5c5b1d86c0182b0f900d73d5c659f4"},{"author":{"_account_id":9312,"name":"Alexandre Levine","email":"alexandrelevine@gmail.com","username":"alevine"},"change_message_id":"7e456212b19750370b6109f861ffe0ba226de00c","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        if not api_utils.check_user_is_vendor_or_foundation_admin(vendor_id):"},{"line_number":52,"context_line":"            return None"},{"line_number":53,"context_line":"        try:"},{"line_number":54,"context_line":"            _check_vendor_is_official(vendor_id)"},{"line_number":55,"context_line":"        except Exception:"},{"line_number":56,"context_line":"            return None"},{"line_number":57,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3afc51ec_28bb1974","line":54,"range":{"start_line":54,"start_character":11,"end_line":54,"end_character":48},"in_reply_to":"5aef4532_bad9a159","updated":"2016-03-11 17:29:51.000000000","message":"Thank you Mark.\nIt helps a lot.\nThere is one point which still requires clarification: we\u0027re allowing access to User API for regular Users in order for them to be able to add people as their co-admins, right?","commit_id":"798b70465b5c5b1d86c0182b0f900d73d5c659f4"},{"author":{"_account_id":6754,"name":"Mark T. Voelker","email":"markvoelker@gmail.com","username":"mvoelker"},"change_message_id":"fe038eb59304e154ec194f3aa0c55ce4a8bf3285","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        if not api_utils.check_user_is_vendor_or_foundation_admin(vendor_id):"},{"line_number":52,"context_line":"            return None"},{"line_number":53,"context_line":"        try:"},{"line_number":54,"context_line":"            _check_vendor_is_official(vendor_id)"},{"line_number":55,"context_line":"        except Exception:"},{"line_number":56,"context_line":"            return None"},{"line_number":57,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"5aef4532_bad9a159","line":54,"range":{"start_line":54,"start_character":11,"end_line":54,"end_character":48},"in_reply_to":"5aef4532_f7b224e4","updated":"2016-03-09 17:10:36.000000000","message":"Thanks for engaging us in this discussion!  We really appreciate you folks checking in and asking for clarity, and we\u0027re glad to take some time at the midcycle to discuss.  I\u0027ll try to sum up some of the discussion at this week\u0027s DefCore midcycle:\n\n* We looked at this from a workflow perspective and felt that most vendors who come in to create a vendor entity would probably reasonably want to set everything up at once (e.g. adding an initial list of other people associated with the vendor and perhaps assigning roles) rather than have to do a few things, submit it for approval, wait for the Foundation to approve it (the Foundation\u0027s Interop Engineer is great, but has limited scalability \u003dp), and then do the rest of the work.\n\n* We also discussed that some non-official vendors may stay that way for a while, and it seems reasonable to let them manage their entity during that time.  In the case of employee turnover during that period, this also potentially takes some burden off of the Foundation staff.\n\nHope that helps!","commit_id":"798b70465b5c5b1d86c0182b0f900d73d5c659f4"},{"author":{"_account_id":9312,"name":"Alexandre Levine","email":"alexandrelevine@gmail.com","username":"alevine"},"change_message_id":"2960a4b438923eab904bdc5ea809a25996b5103c","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        if not api_utils.check_user_is_vendor_or_foundation_admin(vendor_id):"},{"line_number":52,"context_line":"            return None"},{"line_number":53,"context_line":"        try:"},{"line_number":54,"context_line":"            _check_vendor_is_official(vendor_id)"},{"line_number":55,"context_line":"        except Exception:"},{"line_number":56,"context_line":"            return None"},{"line_number":57,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"7af24918_57d43246","line":54,"range":{"start_line":54,"start_character":11,"end_line":54,"end_character":48},"in_reply_to":"7af24918_082c4faa","updated":"2016-03-06 10:48:25.000000000","message":"That\u0027s great. Is it going to happen in online meeting? I\u0027d rather attend to clear some points.\nAnyways, in this particular matter I\u0027d like to know a couple of answers:\n\n1. Do they need this use-case in the first row of releases or would it be ok to address it later along with use-cases 26 and 27?\n2. Which UI option in the section \"User information and lists\" is preferable for UI? Or would they care to add their own variant?\n\nAlso there is still a question of Vendor registration info. It was explained in details in the mailing list and it\u0027s also summed up in the doc - section \"Vendor registration\". \n\nIn regard to this particular review - I suggest merging it if it\u0027s the only issue. It doesn\u0027t pose any threat and doesn\u0027t bring any bugs. Later when decided we can change the code again. Right now it\u0027s correct providing the use-case for private Vendor co-admins is not being implemented in the first row of functionality.","commit_id":"798b70465b5c5b1d86c0182b0f900d73d5c659f4"},{"author":{"_account_id":9312,"name":"Alexandre Levine","email":"alexandrelevine@gmail.com","username":"alevine"},"change_message_id":"5a4abdfd75baafa5c10e6162f830540924bb4a8e","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        if not api_utils.check_user_is_vendor_or_foundation_admin(vendor_id):"},{"line_number":52,"context_line":"            return None"},{"line_number":53,"context_line":"        try:"},{"line_number":54,"context_line":"            _check_vendor_is_official(vendor_id)"},{"line_number":55,"context_line":"        except Exception:"},{"line_number":56,"context_line":"            return None"},{"line_number":57,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"7af24918_f00eba39","line":54,"range":{"start_line":54,"start_character":11,"end_line":54,"end_character":48},"in_reply_to":"7af24918_08dd160e","updated":"2016-03-03 06:26:34.000000000","message":"Catherine, we talked about it earlier. John should not be allowed to do this until we change our Requirements. That\u0027s why we have them and talked about them for so long. Let\u0027s stick with them now. There is no such requirement. Only Official Vendor admins can manage their co-admins. Use-cases 24 and 33. There is no alike use-case for regular user.\nShould we go back to our Requirements now and change them in order to accommodate such a use-case (I can predict that it\u0027s going to be a long process because it might affect many things around and will cause many discussions - I suggest not doing it).\nI haven\u0027t seen such a Use-case even as a prospective one in the DefCore partial reqs I used to create the Requirements doc.","commit_id":"798b70465b5c5b1d86c0182b0f900d73d5c659f4"},{"author":{"_account_id":10526,"name":"Catherine Diep","email":"cdiep@us.ibm.com","username":"cdiep"},"change_message_id":"0d2176ddb68adc1c6740dfc3f7fd263565e7a8c3","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        if not api_utils.check_user_is_vendor_or_foundation_admin(vendor_id):"},{"line_number":52,"context_line":"            return None"},{"line_number":53,"context_line":"        try:"},{"line_number":54,"context_line":"            _check_vendor_is_official(vendor_id)"},{"line_number":55,"context_line":"        except Exception:"},{"line_number":56,"context_line":"            return None"},{"line_number":57,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"7af24918_79afc02b","line":54,"range":{"start_line":54,"start_character":11,"end_line":54,"end_character":48},"in_reply_to":"7af24918_113dd7dc","updated":"2016-03-04 21:32:54.000000000","message":"Ah, I think I see where the misunderstanding regarding user information access is.  Let me try to clarify the major points here.  \n\n1) The guidance from DefCore is \"ONLY foundation members can list all users in RefStack\".\n\n2) Foundation members and vendor admins can list users in own vendor regardless of the vendor types (official, private, pending,...).  This is the case we discuss here \"get(self, vendor_id)\". Here, we are listing users of a specific vendor_id.\n\n3) Foundation or vendor admins can assign a user to a vendor.  The user to be added needs to provide his/her information (which is OpenID as coded in the \"put(self, vendor_id, openid)\" method) to the vendor as input information.  Vendor admins can not list users from RefStack and select one user to add. Per current implementation, all users in a vendor group are admin users. \n\nAgree that use case 26 and 27 should be postponed for the following reasons:\n\n* Use case 26: RefStack needs to implement user \"role\" or something equivalent to allow different levels of user access.\n* Use case 27: RefStack needs user group at product level.  Current user group is assigned at vendor level.\n\nLet\u0027s have more in-depth discussion in #refstack IRC if needed.","commit_id":"798b70465b5c5b1d86c0182b0f900d73d5c659f4"},{"author":{"_account_id":7822,"name":"Chris Hoge (not involved in upstream development)","email":"chris@hogepodge.com","username":"hogepodge"},"change_message_id":"e8447252a15a3c9a2b109059588bcab54c35eec9","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        if not api_utils.check_user_is_vendor_or_foundation_admin(vendor_id):"},{"line_number":52,"context_line":"            return None"},{"line_number":53,"context_line":"        try:"},{"line_number":54,"context_line":"            _check_vendor_is_official(vendor_id)"},{"line_number":55,"context_line":"        except Exception:"},{"line_number":56,"context_line":"            return None"},{"line_number":57,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"5aef4532_f7b224e4","line":54,"range":{"start_line":54,"start_character":11,"end_line":54,"end_character":48},"in_reply_to":"7af24918_57d43246","updated":"2016-03-09 17:01:38.000000000","message":"It\u0027s a terrible idea to just merge when there\u0027s disagreement. Code has a way of becoming policy, and this is a policy that as a consumer of this service I would not want to see enforced.","commit_id":"798b70465b5c5b1d86c0182b0f900d73d5c659f4"},{"author":{"_account_id":7822,"name":"Chris Hoge (not involved in upstream development)","email":"chris@hogepodge.com","username":"hogepodge"},"change_message_id":"59cfc2fc09ff891ae8c34108245ee7dd6f32872e","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        if not api_utils.check_user_is_vendor_or_foundation_admin(vendor_id):"},{"line_number":52,"context_line":"            return None"},{"line_number":53,"context_line":"        try:"},{"line_number":54,"context_line":"            _check_vendor_is_official(vendor_id)"},{"line_number":55,"context_line":"        except Exception:"},{"line_number":56,"context_line":"            return None"},{"line_number":57,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"5aef4532_146b4ef2","line":54,"range":{"start_line":54,"start_character":11,"end_line":54,"end_character":48},"in_reply_to":"7af24918_57d43246","updated":"2016-03-09 16:55:26.000000000","message":"Vendors shouldn\u0027t be bottlenecked with managing their accounts. Approval can take time (verifying data, people going on vacation, and so on), and this is an unnecessary blocker to getting valuable work done and data uploaded.","commit_id":"798b70465b5c5b1d86c0182b0f900d73d5c659f4"},{"author":{"_account_id":9312,"name":"Alexandre Levine","email":"alexandrelevine@gmail.com","username":"alevine"},"change_message_id":"67d88a639529de0367f094c07f7efc525780bbfe","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        if not api_utils.check_user_is_vendor_or_foundation_admin(vendor_id):"},{"line_number":52,"context_line":"            return None"},{"line_number":53,"context_line":"        try:"},{"line_number":54,"context_line":"            _check_vendor_is_official(vendor_id)"},{"line_number":55,"context_line":"        except Exception:"},{"line_number":56,"context_line":"            return None"},{"line_number":57,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"7af24918_c51c1016","line":54,"range":{"start_line":54,"start_character":11,"end_line":54,"end_character":48},"in_reply_to":"7af24918_79afc02b","updated":"2016-03-05 20:39:12.000000000","message":"We\u0027ve already discussed this and I wrote detailed description of the problem in my questions to defcore in the mailing list.\nWe started exactly from this point that Vendor cannot list but can add by openID and moved on afterwards. The result is summed up in my doc and questions in the mailing list, I don\u0027t want to repeat myself.\nIt doesn\u0027t work this way and it\u0027s useless because of the reasons I gave before.\nThat\u0027s why I was surprised you want to go all over this again. I suggest dropping this case for now altogether, otherwise we\u0027ll spend lots and lots of time going in circles, which I don\u0027t have unfortunately.\nIf you insist on it being included, please have someone from DefCore to give us clear, concise and consistent requirements for this release. I tried my best to do their job but now I guess we have to stop expanding and extending and deal with what we already have, which is quite enough times more than what currently exists in RefStack.","commit_id":"798b70465b5c5b1d86c0182b0f900d73d5c659f4"},{"author":{"_account_id":10526,"name":"Catherine Diep","email":"cdiep@us.ibm.com","username":"cdiep"},"change_message_id":"f320fe292fb139e5ef6175b8887157cf85f739bd","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        if not api_utils.check_user_is_vendor_or_foundation_admin(vendor_id):"},{"line_number":52,"context_line":"            return None"},{"line_number":53,"context_line":"        try:"},{"line_number":54,"context_line":"            _check_vendor_is_official(vendor_id)"},{"line_number":55,"context_line":"        except Exception:"},{"line_number":56,"context_line":"            return None"},{"line_number":57,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"7af24918_082c4faa","line":54,"range":{"start_line":54,"start_character":11,"end_line":54,"end_character":48},"in_reply_to":"7af24918_c51c1016","updated":"2016-03-05 23:49:46.000000000","message":"Alright.  I will request DefCore to confirm on the requirements regarding the specific questions raised in the patch.  Expect response on next Tuesday due to DefCore midcycle next week.","commit_id":"798b70465b5c5b1d86c0182b0f900d73d5c659f4"},{"author":{"_account_id":9312,"name":"Alexandre Levine","email":"alexandrelevine@gmail.com","username":"alevine"},"change_message_id":"cc05ca395b8abf0ad05ebf539f4a184c94c25fcb","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        if not api_utils.check_user_is_vendor_or_foundation_admin(vendor_id):"},{"line_number":52,"context_line":"            return None"},{"line_number":53,"context_line":"        try:"},{"line_number":54,"context_line":"            _check_vendor_is_official(vendor_id)"},{"line_number":55,"context_line":"        except Exception:"},{"line_number":56,"context_line":"            return None"},{"line_number":57,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"7af24918_113dd7dc","line":54,"range":{"start_line":54,"start_character":11,"end_line":54,"end_character":48},"in_reply_to":"7af24918_c93f6db2","updated":"2016-03-04 10:48:26.000000000","message":"I\u0027m a little confused. Official Vendor registration procedure has changed some time ago to approval instead of creation. However, after this decision was taken you had meeting with DefCore and decided that only Foundation Admins should have access to user lists and users information. Later I suggested that at least Official Vendors can have such access as well in order to be able to assign other admins.\nNow you\u0027re suggesting to allow Regular Users to have such access to all other users info and lists. That is my position for some time, so I can only agree with you.\nAnd I agree that such a use-case for private Vendor with multiple admins is really potentially a useful one.\nHowever, we do have a couple of use-cases which we postponed for initial iterations, for example 26 and 27. This new use-case - should it be implemented right away? If not, then should we just open the door for Regular Users to have info about other users by not checking for them to be official Vendors?\nAgain, I\u0027m all for it but I thought it contradicts with previous DefCore decisions.","commit_id":"798b70465b5c5b1d86c0182b0f900d73d5c659f4"},{"author":{"_account_id":10234,"name":"Andrey Pavlov","email":"andrey.mp@gmail.com","username":"andrey-mp"},"change_message_id":"a2cbb33a01b23d82ecf625c02ef81d3201e0c651","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        if not api_utils.check_user_is_vendor_or_foundation_admin(vendor_id):"},{"line_number":52,"context_line":"            return None"},{"line_number":53,"context_line":"        try:"},{"line_number":54,"context_line":"            _check_vendor_is_official(vendor_id)"},{"line_number":55,"context_line":"        except Exception:"},{"line_number":56,"context_line":"            return None"},{"line_number":57,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"7af24918_e57d73b2","line":54,"range":{"start_line":54,"start_character":11,"end_line":54,"end_character":48},"in_reply_to":"7af24918_cf21784f","updated":"2016-03-02 19:56:40.000000000","message":"But why RefStack should allow to manage users for private/pending vendors?\nI mean that RefStack should deny manage users for all users/admins if vendor is not official yet...","commit_id":"798b70465b5c5b1d86c0182b0f900d73d5c659f4"},{"author":{"_account_id":10526,"name":"Catherine Diep","email":"cdiep@us.ibm.com","username":"cdiep"},"change_message_id":"2c5ea1bc2b9ca30e686353127f8502ab01aeb11b","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        if not api_utils.check_user_is_vendor_or_foundation_admin(vendor_id):"},{"line_number":52,"context_line":"            return None"},{"line_number":53,"context_line":"        try:"},{"line_number":54,"context_line":"            _check_vendor_is_official(vendor_id)"},{"line_number":55,"context_line":"        except Exception:"},{"line_number":56,"context_line":"            return None"},{"line_number":57,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"7af24918_08dd160e","line":54,"range":{"start_line":54,"start_character":11,"end_line":54,"end_character":48},"in_reply_to":"7af24918_e57d73b2","updated":"2016-03-02 20:10:48.000000000","message":"Think about this use case.  User John creates a vendor \"Vendor_John\" which is a private vendor.  John by default becomes an admin of \"Vendor_John\". Now John wants to add an additional admin user \"Jane\" to manage \"Vendor_John\". John should be allowed to do that.","commit_id":"798b70465b5c5b1d86c0182b0f900d73d5c659f4"},{"author":{"_account_id":10526,"name":"Catherine Diep","email":"cdiep@us.ibm.com","username":"cdiep"},"change_message_id":"f65f5e50d9dafdd62b7d2a84f722f92b57ffa75b","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        if not api_utils.check_user_is_vendor_or_foundation_admin(vendor_id):"},{"line_number":52,"context_line":"            return None"},{"line_number":53,"context_line":"        try:"},{"line_number":54,"context_line":"            _check_vendor_is_official(vendor_id)"},{"line_number":55,"context_line":"        except Exception:"},{"line_number":56,"context_line":"            return None"},{"line_number":57,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"7af24918_c93f6db2","line":54,"range":{"start_line":54,"start_character":11,"end_line":54,"end_character":48},"in_reply_to":"7af24918_f00eba39","updated":"2016-03-03 17:54:35.000000000","message":"In the earlier discussion, the use case was that official vendors can ONLY be created by foundation admins.  And, private vendors can be created by anyone.  However, the use case had changed that foundation admins will not create any vendor. Anyone can create a private vendor and then request for foundation to approve it to become an official vendor.  As such, a private vendor could be a vendor created for a corporate vendor or an individual vendor.\n \nAllowing more than one users to manage private/pending vendor is needed.  No corporation would like to just have one user to manage their assets even while they are waiting for approval to become an official vendor. Let\u0027s update the requirement document if needed.","commit_id":"798b70465b5c5b1d86c0182b0f900d73d5c659f4"},{"author":{"_account_id":10526,"name":"Catherine Diep","email":"cdiep@us.ibm.com","username":"cdiep"},"change_message_id":"5d24b09e1eef4e45cac46ed68200aa57b8e02fcf","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        if not api_utils.check_user_is_vendor_or_foundation_admin(vendor_id):"},{"line_number":52,"context_line":"            return None"},{"line_number":53,"context_line":"        try:"},{"line_number":54,"context_line":"            _check_vendor_is_official(vendor_id)"},{"line_number":55,"context_line":"        except Exception:"},{"line_number":56,"context_line":"            return None"},{"line_number":57,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"7af24918_cf21784f","line":54,"range":{"start_line":54,"start_character":11,"end_line":54,"end_character":48},"in_reply_to":"9aed3d3a_696454b8","updated":"2016-03-02 19:17:39.000000000","message":"Regardless of the vendor type (private/pending/official/foundation), foundation admins can manage all users in any organization.  Vendor admins can manage users in own vendors.  So, there is no need for this checking.","commit_id":"798b70465b5c5b1d86c0182b0f900d73d5c659f4"},{"author":{"_account_id":10234,"name":"Andrey Pavlov","email":"andrey.mp@gmail.com","username":"andrey-mp"},"change_message_id":"b4ae4af395f01150f4378e77c8830a8243601410","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        if not api_utils.check_user_is_vendor_or_foundation_admin(vendor_id):"},{"line_number":52,"context_line":"            return None"},{"line_number":53,"context_line":"        try:"},{"line_number":54,"context_line":"            _check_vendor_is_official(vendor_id)"},{"line_number":55,"context_line":"        except Exception:"},{"line_number":56,"context_line":"            return None"},{"line_number":57,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9aed3d3a_696454b8","line":54,"range":{"start_line":54,"start_character":11,"end_line":54,"end_character":48},"in_reply_to":"9aed3d3a_e8e99eb8","updated":"2016-03-01 06:05:45.000000000","message":"here we check that vendor is not in private/pending state. As I understood RefStack should disallow user management for such vendors. (It has no sense...)","commit_id":"798b70465b5c5b1d86c0182b0f900d73d5c659f4"},{"author":{"_account_id":10526,"name":"Catherine Diep","email":"cdiep@us.ibm.com","username":"cdiep"},"change_message_id":"46479c1c0385092ffbc0f5b10ef072870263d8ab","unresolved":false,"context_lines":[{"line_number":66,"context_line":""},{"line_number":67,"context_line":"        if not api_utils.check_user_is_vendor_or_foundation_admin(vendor_id):"},{"line_number":68,"context_line":"            pecan.abort(403, \u0027Forbidden.\u0027)"},{"line_number":69,"context_line":"        _check_vendor_is_official(vendor_id)"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"        vendor \u003d db.get_organization(vendor_id)"},{"line_number":72,"context_line":"        creator \u003d api_utils.get_user_id()"}],"source_content_type":"text/x-python","patch_set":2,"id":"9aed3d3a_e837de4a","line":69,"range":{"start_line":69,"start_character":7,"end_line":69,"end_character":44},"updated":"2016-02-29 17:56:42.000000000","message":"same.","commit_id":"798b70465b5c5b1d86c0182b0f900d73d5c659f4"},{"author":{"_account_id":10526,"name":"Catherine Diep","email":"cdiep@us.ibm.com","username":"cdiep"},"change_message_id":"46479c1c0385092ffbc0f5b10ef072870263d8ab","unresolved":false,"context_lines":[{"line_number":81,"context_line":""},{"line_number":82,"context_line":"        if not api_utils.check_user_is_vendor_or_foundation_admin(vendor_id):"},{"line_number":83,"context_line":"            pecan.abort(403, \u0027Forbidden.\u0027)"},{"line_number":84,"context_line":"        _check_vendor_is_official(vendor_id)"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"        vendor \u003d db.get_organization(vendor_id)"},{"line_number":87,"context_line":"        db.remove_user_from_group(openid, vendor[\u0027group_id\u0027])"}],"source_content_type":"text/x-python","patch_set":2,"id":"9aed3d3a_2876e6d6","line":84,"range":{"start_line":84,"start_character":8,"end_line":84,"end_character":44},"updated":"2016-02-29 17:56:42.000000000","message":"same","commit_id":"798b70465b5c5b1d86c0182b0f900d73d5c659f4"},{"author":{"_account_id":9377,"name":"Sergey Slipushenko","email":"slipushenko@gmail.com","username":"sslypushenko"},"change_message_id":"1d7c989c9c6837512a37c7720e047c477a18a75b","unresolved":false,"context_lines":[{"line_number":33,"context_line":"CONF \u003d cfg.CONF"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"def _check_vendor_is_official(vendor_id):"},{"line_number":37,"context_line":"    vendor \u003d db.get_organization(vendor_id)"},{"line_number":38,"context_line":"    types \u003d [const.FOUNDATION,"},{"line_number":39,"context_line":"             const.OFFICIAL_VENDOR]"}],"source_content_type":"text/x-python","patch_set":3,"id":"3afc51ec_ae7459fd","line":36,"range":{"start_line":36,"start_character":4,"end_line":36,"end_character":29},"updated":"2016-03-11 15:44:37.000000000","message":"It should not be a separate function. At least it can be a static method in UsersController or part of api_utils.","commit_id":"f8c0bd4283115616ef2ce1e74f60f3f2d571fd03"}],"refstack/api/utils.py":[{"author":{"_account_id":9626,"name":"Paul Van Eck","email":"pvaneck@us.ibm.com","username":"pvaneck"},"change_message_id":"b3adf9783eada2778b9778d284679a38f85653f9","unresolved":false,"context_lines":[{"line_number":320,"context_line":"    return user in org_users"},{"line_number":321,"context_line":""},{"line_number":322,"context_line":""},{"line_number":323,"context_line":"def check_user_is_vendor_or_foundation_admin(vendor_id):"},{"line_number":324,"context_line":"    \"\"\"Check is user in vendor or foundation group or not.\"\"\""},{"line_number":325,"context_line":"    user \u003d get_user_id()"},{"line_number":326,"context_line":"    v_users \u003d db.get_organization_users(vendor_id)"}],"source_content_type":"text/x-python","patch_set":3,"id":"7af24918_9064fa49","line":323,"range":{"start_line":323,"start_character":4,"end_line":323,"end_character":44},"updated":"2016-03-07 05:09:36.000000000","message":"This function necessary when we have the two functions above it?","commit_id":"f8c0bd4283115616ef2ce1e74f60f3f2d571fd03"},{"author":{"_account_id":9377,"name":"Sergey Slipushenko","email":"slipushenko@gmail.com","username":"sslypushenko"},"change_message_id":"1d7c989c9c6837512a37c7720e047c477a18a75b","unresolved":false,"context_lines":[{"line_number":320,"context_line":"    return user in org_users"},{"line_number":321,"context_line":""},{"line_number":322,"context_line":""},{"line_number":323,"context_line":"def check_user_is_vendor_or_foundation_admin(vendor_id):"},{"line_number":324,"context_line":"    \"\"\"Check is user in vendor or foundation group or not.\"\"\""},{"line_number":325,"context_line":"    user \u003d get_user_id()"},{"line_number":326,"context_line":"    v_users \u003d db.get_organization_users(vendor_id)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3afc51ec_4e267569","line":323,"range":{"start_line":323,"start_character":4,"end_line":323,"end_character":44},"in_reply_to":"5aef4532_16758ef8","updated":"2016-03-11 15:44:37.000000000","message":"+1 to Paul\u0027s comment. This function shout be split on 2 functions","commit_id":"f8c0bd4283115616ef2ce1e74f60f3f2d571fd03"},{"author":{"_account_id":10234,"name":"Andrey Pavlov","email":"andrey.mp@gmail.com","username":"andrey-mp"},"change_message_id":"ff859abc5922d4a0f2c8f4dfda5479a97427f335","unresolved":false,"context_lines":[{"line_number":320,"context_line":"    return user in org_users"},{"line_number":321,"context_line":""},{"line_number":322,"context_line":""},{"line_number":323,"context_line":"def check_user_is_vendor_or_foundation_admin(vendor_id):"},{"line_number":324,"context_line":"    \"\"\"Check is user in vendor or foundation group or not.\"\"\""},{"line_number":325,"context_line":"    user \u003d get_user_id()"},{"line_number":326,"context_line":"    v_users \u003d db.get_organization_users(vendor_id)"}],"source_content_type":"text/x-python","patch_set":3,"id":"5aef4532_16758ef8","line":323,"range":{"start_line":323,"start_character":4,"end_line":323,"end_character":44},"in_reply_to":"7af24918_9064fa49","updated":"2016-03-07 19:12:27.000000000","message":"i used to do such functions to make calling code more easily and smaller. but it doens\u0027t matter to me and i can rework calling code","commit_id":"f8c0bd4283115616ef2ce1e74f60f3f2d571fd03"}],"refstack/db/sqlalchemy/api.py":[{"author":{"_account_id":10526,"name":"Catherine Diep","email":"cdiep@us.ibm.com","username":"cdiep"},"change_message_id":"46479c1c0385092ffbc0f5b10ef072870263d8ab","unresolved":false,"context_lines":[{"line_number":503,"context_line":"    organization \u003d (session.query(models.Organization.group_id)"},{"line_number":504,"context_line":"                    .filter_by(id\u003dorganization_id).first())"},{"line_number":505,"context_line":"    if organization is None:"},{"line_number":506,"context_line":"        raise NotFound(\u0027Organization with id %s not found\u0027 % organization_id)"},{"line_number":507,"context_line":"    group_id \u003d organization.group_id"},{"line_number":508,"context_line":"    users \u003d (session.query(models.UserToGroup, models.User)"},{"line_number":509,"context_line":"             .join(models.User,"}],"source_content_type":"text/x-python","patch_set":2,"id":"9aed3d3a_a3a7b9bb","line":506,"range":{"start_line":506,"start_character":48,"end_line":506,"end_character":57},"updated":"2016-02-29 17:56:42.000000000","message":"nit: not found --\u003e is not found?","commit_id":"798b70465b5c5b1d86c0182b0f900d73d5c659f4"}]}
