)]}'
{"keystone/api/trusts.py":[{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"807b8244cfa1bec652e1c521f1bdab8441986183","unresolved":false,"context_lines":[{"line_number":191,"context_line":"                \"\\\"identity:list_trusts\\\" rule in config to accept the defaults, or explicitly\""},{"line_number":192,"context_line":"                \"set a rule that is not empty.\""},{"line_number":193,"context_line":"            )"},{"line_number":194,"context_line":"            if not flask.request.args:"},{"line_number":195,"context_line":"                # NOTE(morgan): Admin can list all trusts."},{"line_number":196,"context_line":"                ENFORCER.enforce_call(action\u003d\u0027admin_required\u0027)"},{"line_number":197,"context_line":"                trusts +\u003d PROVIDERS.trust_api.list_trusts()"},{"line_number":198,"context_line":""},{"line_number":199,"context_line":"        if not flask.request.args:"},{"line_number":200,"context_line":"            trusts +\u003d PROVIDERS.trust_api.list_trusts()"},{"line_number":201,"context_line":"        elif trustor_user_id:"},{"line_number":202,"context_line":"            trusts +\u003d PROVIDERS.trust_api.list_trusts_for_trustor(trustor_user_id)"},{"line_number":203,"context_line":"        elif trustee_user_id:"}],"source_content_type":"text/x-python","patch_set":3,"id":"7faddb67_7cdb8820","line":200,"range":{"start_line":194,"start_character":0,"end_line":200,"end_character":55},"updated":"2019-08-12 22:04:30.000000000","message":"These look redundant, we might end up with duplicated trust information here. Previously we only did the addtion to the trusts list once.","commit_id":"ea14440a55c83fd6bd54cc3913e16dd642d6a82a"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"c9184d4a1f256a8b2ff318043573a0fa4875576a","unresolved":false,"context_lines":[{"line_number":168,"context_line":"    def _list_trusts(self):"},{"line_number":169,"context_line":"        trustor_user_id \u003d flask.request.args.get(\u0027trustor_user_id\u0027)"},{"line_number":170,"context_line":"        trustee_user_id \u003d flask.request.args.get(\u0027trustee_user_id\u0027)"},{"line_number":171,"context_line":"        if not trustor_user_id and not trustee_user_id:"},{"line_number":172,"context_line":"            ENFORCER.enforce_call(action\u003d\u0027identity:list_trusts\u0027)"},{"line_number":173,"context_line":"        elif trustor_user_id:"},{"line_number":174,"context_line":"            target \u003d {\u0027trust\u0027: {\u0027trustor_user_id\u0027: trustor_user_id}}"},{"line_number":175,"context_line":"            ENFORCER.enforce_call(action\u003d\u0027identity:list_trusts_for_trustor\u0027,"},{"line_number":176,"context_line":"                                  target_attr\u003dtarget)"},{"line_number":177,"context_line":"        elif trustee_user_id:"},{"line_number":178,"context_line":"            target \u003d {\u0027trust\u0027: {\u0027trustee_user_id\u0027: trustee_user_id}}"},{"line_number":179,"context_line":"            ENFORCER.enforce_call(action\u003d\u0027identity:list_trusts_for_trustee\u0027,"},{"line_number":180,"context_line":"                                  target_attr\u003dtarget)"},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"        trusts \u003d []"},{"line_number":183,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"7faddb67_35a073f3","line":180,"range":{"start_line":171,"start_character":0,"end_line":180,"end_character":53},"updated":"2019-08-16 18:50:38.000000000","message":"NIT: for ease of reading, do:\n\nIf trustor_user_id: XXXX\nelif trustee_user_id: XXX\nelse:\n\n\nThis ensures we clearly mark the fall through behavior and never end up with the unenforced programming error.","commit_id":"7717ed38d920a08e1a8b17c00dc4e39260033d7c"}]}
