)]}'
{"keystone/contrib/revoke/model.py":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"84a1ed41a8c13d52c906938dbf65bf14dd17edf6","unresolved":false,"context_lines":[{"line_number":154,"context_line":"    def add_events(self, revoke_events):"},{"line_number":155,"context_line":"        return map(self.add_event, revoke_events or [])"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"    def append_if_not_none(self, destination, source, key):"},{"line_number":158,"context_line":"        try:"},{"line_number":159,"context_line":"            destination.append(source[key])"},{"line_number":160,"context_line":"        except KeyError:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2FLk0%3D","line":157,"updated":"2014-03-19 17:23:12.000000000","message":"add doc strings for parameters/return value","commit_id":"b3cdfa32de715c79175e0d7454176d0724027ce8"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"84a1ed41a8c13d52c906938dbf65bf14dd17edf6","unresolved":false,"context_lines":[{"line_number":196,"context_line":"                # If there is wildcard node on current level we take it."},{"line_number":197,"context_line":"                self.append_if_not_none(bundle, branch, wildcard)"},{"line_number":198,"context_line":"                if name \u003d\u003d \u0027role_id\u0027:"},{"line_number":199,"context_line":"                    # Roles are very special since token have a list of them"},{"line_number":200,"context_line":"                    # and any one of them will suffice."},{"line_number":201,"context_line":"                    for role_id in token_data.get(\u0027roles\u0027, []):"},{"line_number":202,"context_line":"                        self.append_if_not_none(bundle, branch,"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2FLkU%3D","line":199,"updated":"2014-03-19 17:23:12.000000000","message":"tokens*?","commit_id":"b3cdfa32de715c79175e0d7454176d0724027ce8"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"a87cdfcf04f34582d640f72f18dc6bbbce315513","unresolved":false,"context_lines":[{"line_number":207,"context_line":"                    for alt_name in alternatives.get(name, [name]):"},{"line_number":208,"context_line":"                        self.append_if_not_none("},{"line_number":209,"context_line":"                            bundle, branch,"},{"line_number":210,"context_line":"                            \u0027%s\u003d%s\u0027 % (name, token_data[alt_name]))"},{"line_number":211,"context_line":"            # On the next iteration we walk through collected branches and"},{"line_number":212,"context_line":"            # collect their subbranches."},{"line_number":213,"context_line":"            partial_matches \u003d bundle"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2FSXA%3D","line":210,"updated":"2014-03-18 21:20:38.000000000","message":"Suggest\n\n1: Keep the current filter logic\n\nor \n\n2: use the following check before each append:\n\n    if key in branch:\n        bundle.append(branch[key])\n\nUsing an instance method isn\u0027t making this any more clear.  I also don\u0027t particularly like the exception based logic flow in this case.","commit_id":"b3cdfa32de715c79175e0d7454176d0724027ce8"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"84a1ed41a8c13d52c906938dbf65bf14dd17edf6","unresolved":false,"context_lines":[{"line_number":225,"context_line":"                    return True"},{"line_number":226,"context_line":"            except KeyError:"},{"line_number":227,"context_line":"                pass"},{"line_number":228,"context_line":"        # If we made it out of the loop then no element in revokation tree"},{"line_number":229,"context_line":"        # corresponds to our token and it is good."},{"line_number":230,"context_line":"        return False"},{"line_number":231,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2FLgY%3D","line":228,"updated":"2014-03-19 17:23:12.000000000","message":"revocation*","commit_id":"b3cdfa32de715c79175e0d7454176d0724027ce8"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"5a9ac5e0adc96b8dcf712cdb7645c6575fb3b8db","unresolved":false,"context_lines":[{"line_number":175,"context_line":"        # revoke tree."},{"line_number":176,"context_line":"        alternatives \u003d {"},{"line_number":177,"context_line":"            \u0027user_id\u0027: [\u0027user_id\u0027, \u0027trustor_id\u0027, \u0027trustee_id\u0027],"},{"line_number":178,"context_line":"            \u0027domain_id\u0027: [\u0027identity_domain_id\u0027, \u0027assignment_domain_id\u0027],"},{"line_number":179,"context_line":"        }"},{"line_number":180,"context_line":"        # Contains current forest (collection of trees) to be checked."},{"line_number":181,"context_line":"        partial_matches \u003d [self.revoke_map]"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAWH%2F%2B8JQ%3D","line":178,"updated":"2014-03-21 14:56:17.000000000","message":"why is \u0027user_id\u0027 an alternative for \u0027user_id\u0027, but \u0027domain_id\u0027 isn\u0027t an alternative for \u0027domain_id\u0027?","commit_id":"d24ad2b5732c02f0f9958a869d679180d3d530b5"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"09786f957032bc4a37460056bba43ae6be655c19","unresolved":false,"context_lines":[{"line_number":175,"context_line":"        # revoke tree."},{"line_number":176,"context_line":"        alternatives \u003d {"},{"line_number":177,"context_line":"            \u0027user_id\u0027: [\u0027user_id\u0027, \u0027trustor_id\u0027, \u0027trustee_id\u0027],"},{"line_number":178,"context_line":"            \u0027domain_id\u0027: [\u0027identity_domain_id\u0027, \u0027assignment_domain_id\u0027],"},{"line_number":179,"context_line":"        }"},{"line_number":180,"context_line":"        # Contains current forest (collection of trees) to be checked."},{"line_number":181,"context_line":"        partial_matches \u003d [self.revoke_map]"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAWH%2F%2B7ts%3D","line":178,"in_reply_to":"AAAAWH%2F%2B72U%3D","updated":"2014-03-21 15:31:51.000000000","message":"L178 isn\u0027t tested","commit_id":"d24ad2b5732c02f0f9958a869d679180d3d530b5"},{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"dfcf9f4bb3c2a2283e758b4922865c83a50b9395","unresolved":false,"context_lines":[{"line_number":175,"context_line":"        # revoke tree."},{"line_number":176,"context_line":"        alternatives \u003d {"},{"line_number":177,"context_line":"            \u0027user_id\u0027: [\u0027user_id\u0027, \u0027trustor_id\u0027, \u0027trustee_id\u0027],"},{"line_number":178,"context_line":"            \u0027domain_id\u0027: [\u0027identity_domain_id\u0027, \u0027assignment_domain_id\u0027],"},{"line_number":179,"context_line":"        }"},{"line_number":180,"context_line":"        # Contains current forest (collection of trees) to be checked."},{"line_number":181,"context_line":"        partial_matches \u003d [self.revoke_map]"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAWH%2F%2B72U%3D","line":178,"in_reply_to":"AAAAWH%2F%2B8JQ%3D","updated":"2014-03-21 15:19:19.000000000","message":"domain_id is translated into the identity_domain_id for the user and the assignment_domain_id for the domain.  From the user it is:\nuser{\n    id:blah\n    domain:{\n     id:blahblah\n     }\n}\n\nuser_id is directly matched in the token, but also needs to match the trustor and trustee fields.","commit_id":"d24ad2b5732c02f0f9958a869d679180d3d530b5"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"5a9ac5e0adc96b8dcf712cdb7645c6575fb3b8db","unresolved":false,"context_lines":[{"line_number":205,"context_line":"            # lots of None values in our bundle that represent branches that"},{"line_number":206,"context_line":"            # would relate to our token but were not there. This call filters"},{"line_number":207,"context_line":"            # them out."},{"line_number":208,"context_line":"            partial_matches \u003d filter(None, bundle)"},{"line_number":209,"context_line":"            # If we end up with no branches to follow means that the token is"},{"line_number":210,"context_line":"            # definitelly not in the revoke tree and all further iterations"},{"line_number":211,"context_line":"            # will be for nothing."}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAWH%2F%2B8CQ%3D","line":208,"updated":"2014-03-21 14:56:17.000000000","message":"this behaves VERY differently from the previous implementation, and makes the inline comment above a complete lie.\n\n  $ python -c \"print filter(None, [\u0027a\u0027, \u0027\u0027, True, False, 1, 0, None])\"\n  [\u0027a\u0027, True, 1]","commit_id":"d24ad2b5732c02f0f9958a869d679180d3d530b5"},{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"dfcf9f4bb3c2a2283e758b4922865c83a50b9395","unresolved":false,"context_lines":[{"line_number":205,"context_line":"            # lots of None values in our bundle that represent branches that"},{"line_number":206,"context_line":"            # would relate to our token but were not there. This call filters"},{"line_number":207,"context_line":"            # them out."},{"line_number":208,"context_line":"            partial_matches \u003d filter(None, bundle)"},{"line_number":209,"context_line":"            # If we end up with no branches to follow means that the token is"},{"line_number":210,"context_line":"            # definitelly not in the revoke tree and all further iterations"},{"line_number":211,"context_line":"            # will be for nothing."}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAWH%2F%2B71M%3D","line":208,"in_reply_to":"AAAAWH%2F%2B8CQ%3D","updated":"2014-03-21 15:19:19.000000000","message":"Previous merely reset the bundle value, and then assigned to subnode.  This keeps the original value of bundle. The reassignment was not necessary.\n\nAs far as how it behaves, it removes \"Falsy\" values from the collection, which is what you are seeing.  In the case of an object assignment, that means None.  We don\u0027t add anything to bundle that isn\u0027t either a subnode or None.  A subnode that evaluates to False would be an empty list, and it would  be correct to remove that.","commit_id":"d24ad2b5732c02f0f9958a869d679180d3d530b5"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"5a9ac5e0adc96b8dcf712cdb7645c6575fb3b8db","unresolved":false,"context_lines":[{"line_number":208,"context_line":"            partial_matches \u003d filter(None, bundle)"},{"line_number":209,"context_line":"            # If we end up with no branches to follow means that the token is"},{"line_number":210,"context_line":"            # definitelly not in the revoke tree and all further iterations"},{"line_number":211,"context_line":"            # will be for nothing."},{"line_number":212,"context_line":"            if not partial_matches:"},{"line_number":213,"context_line":"                # If we end up with no branches to follow means that the token"},{"line_number":214,"context_line":"                # is definitely not in the revoke tree and all further"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAWH%2F%2B8Do%3D","line":211,"updated":"2014-03-21 14:56:17.000000000","message":"this comment is basically repeated twice -- and this one has a spelling error. remove this one.","commit_id":"d24ad2b5732c02f0f9958a869d679180d3d530b5"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"5a9ac5e0adc96b8dcf712cdb7645c6575fb3b8db","unresolved":false,"context_lines":[{"line_number":210,"context_line":"            # definitelly not in the revoke tree and all further iterations"},{"line_number":211,"context_line":"            # will be for nothing."},{"line_number":212,"context_line":"            if not partial_matches:"},{"line_number":213,"context_line":"                # If we end up with no branches to follow means that the token"},{"line_number":214,"context_line":"                # is definitely not in the revoke tree and all further"},{"line_number":215,"context_line":"                # iterations will be for nothing."},{"line_number":216,"context_line":"                return False"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAWH%2F%2B8EE%3D","line":213,"updated":"2014-03-21 14:56:17.000000000","message":"... follow, then that means ...","commit_id":"d24ad2b5732c02f0f9958a869d679180d3d530b5"},{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"dfcf9f4bb3c2a2283e758b4922865c83a50b9395","unresolved":false,"context_lines":[{"line_number":210,"context_line":"            # definitelly not in the revoke tree and all further iterations"},{"line_number":211,"context_line":"            # will be for nothing."},{"line_number":212,"context_line":"            if not partial_matches:"},{"line_number":213,"context_line":"                # If we end up with no branches to follow means that the token"},{"line_number":214,"context_line":"                # is definitely not in the revoke tree and all further"},{"line_number":215,"context_line":"                # iterations will be for nothing."},{"line_number":216,"context_line":"                return False"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAWH%2F%2B7zg%3D","line":213,"in_reply_to":"AAAAWH%2F%2B8EE%3D","updated":"2014-03-21 15:19:19.000000000","message":"Done","commit_id":"d24ad2b5732c02f0f9958a869d679180d3d530b5"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"5a9ac5e0adc96b8dcf712cdb7645c6575fb3b8db","unresolved":false,"context_lines":[{"line_number":220,"context_line":"        for leaf in partial_matches:"},{"line_number":221,"context_line":"            try:"},{"line_number":222,"context_line":"                issued_before \u003d leaf[\u0027issued_before\u0027]"},{"line_number":223,"context_line":"                if issued_before \u003e token_data[\u0027issued_at\u0027]:"},{"line_number":224,"context_line":"                    return True"},{"line_number":225,"context_line":"            except KeyError:"},{"line_number":226,"context_line":"                pass"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAWH%2F%2B8FY%3D","line":223,"updated":"2014-03-21 14:56:17.000000000","message":"combine L222 and L223 to avoid the unnecessary indirection","commit_id":"d24ad2b5732c02f0f9958a869d679180d3d530b5"},{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"dfcf9f4bb3c2a2283e758b4922865c83a50b9395","unresolved":false,"context_lines":[{"line_number":220,"context_line":"        for leaf in partial_matches:"},{"line_number":221,"context_line":"            try:"},{"line_number":222,"context_line":"                issued_before \u003d leaf[\u0027issued_before\u0027]"},{"line_number":223,"context_line":"                if issued_before \u003e token_data[\u0027issued_at\u0027]:"},{"line_number":224,"context_line":"                    return True"},{"line_number":225,"context_line":"            except KeyError:"},{"line_number":226,"context_line":"                pass"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAWH%2F%2B7zc%3D","line":223,"in_reply_to":"AAAAWH%2F%2B8FY%3D","updated":"2014-03-21 15:19:19.000000000","message":"Done","commit_id":"d24ad2b5732c02f0f9958a869d679180d3d530b5"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"228f839a42a2050aed833bdf54f9a0a13911b750","unresolved":false,"context_lines":[{"line_number":175,"context_line":"        # revoke tree."},{"line_number":176,"context_line":"        alternatives \u003d {"},{"line_number":177,"context_line":"            \u0027user_id\u0027: [\u0027user_id\u0027, \u0027trustor_id\u0027, \u0027trustee_id\u0027],"},{"line_number":178,"context_line":"            \u0027domain_id\u0027: [\u0027identity_domain_id\u0027, \u0027assignment_domain_id\u0027],"},{"line_number":179,"context_line":"        }"},{"line_number":180,"context_line":"        # Contains current forest (collection of trees) to be checked."},{"line_number":181,"context_line":"        partial_matches \u003d [self.revoke_map]"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAWH%2F%2B7oM%3D","line":178,"updated":"2014-03-21 15:40:57.000000000","message":"L178 isn\u0027t tested","commit_id":"14e2c3e22f9e9074790db6858fb9b9376cc1f087"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"228f839a42a2050aed833bdf54f9a0a13911b750","unresolved":false,"context_lines":[{"line_number":202,"context_line":"                        bundle.append("},{"line_number":203,"context_line":"                            tree.get(\u0027%s\u003d%s\u0027 % (name, token_data[alt_name])))"},{"line_number":204,"context_line":"            # tree.get returns `None` if there is no match, so `bundle.append`"},{"line_number":205,"context_line":"            # adds a \u0027None\u0027 entry. This call remoes the `None` entries."},{"line_number":206,"context_line":"            partial_matches \u003d filter(None, bundle)"},{"line_number":207,"context_line":"            if not partial_matches:"},{"line_number":208,"context_line":"                # If we end up with no branches to follow means that the token"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAWH%2F%2B7og%3D","line":205,"updated":"2014-03-21 15:40:57.000000000","message":"surprise! along with anything else that\u0027s falsey","commit_id":"14e2c3e22f9e9074790db6858fb9b9376cc1f087"}]}
