)]}'
{"designate/api/middleware.py":[{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"56d2b0dbc28fb1e669b90b5af1de8fd064a259dd","unresolved":false,"context_lines":[{"line_number":141,"context_line":"            roles\u003droles,"},{"line_number":142,"context_line":"            service_catalog\u003dcatalog)"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"        if request.environ[\"context\"].tenant is None:"},{"line_number":145,"context_line":"            raise exceptions.Forbidden(\"A project scoped token is required\")"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5afe65bd_e6ffb332","line":144,"updated":"2015-06-02 14:52:13.000000000","message":"Can we move this up, so it\u0027s next to the similar \"X-Identity-Status\" check.\n\nWe\u0027ll want to check if `headers.get(\u0027X-Tenant-ID\u0027) is None` up there though, as the context hasn\u0027t yet been created.","commit_id":"195ed5eb40fbc7fe3f867de473151e5a93a8c353"},{"author":{"_account_id":8099,"name":"Graham Hayes","email":"gr@ham.ie","username":"graham"},"change_message_id":"cd4fecafba7b48e367367e575af0d9c9e7ee2ece","unresolved":false,"context_lines":[{"line_number":128,"context_line":""},{"line_number":129,"context_line":"        tenant_id \u003d headers.get(\u0027X-Tenant-Id\u0027)"},{"line_number":130,"context_line":"        if tenant_id is None:"},{"line_number":131,"context_line":"            raise exceptions.Forbidden(\"A project scoped token is required\")"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"        if headers.get(\u0027X-Service-Catalog\u0027):"},{"line_number":134,"context_line":"            catalog \u003d json.loads(headers.get(\u0027X-Service-Catalog\u0027))"}],"source_content_type":"text/x-python","patch_set":2,"id":"5afe65bd_7ab913e9","line":131,"updated":"2015-06-02 16:11:32.000000000","message":"We can\u0027t use exceptions here - you need to copy what is done above (flask.Response)","commit_id":"c2428b7c5a06ba350f0301ebfcb7354bc5c215e1"}],"designate/tests/test_api/test_middleware.py":[{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"e90a90a15dc52be8380b39a44af24cfef3c5564d","unresolved":false,"context_lines":[{"line_number":95,"context_line":"        # Process the request"},{"line_number":96,"context_line":"        response \u003d app(request)"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"        self.assertEqual(response.status_code, 401)"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"class NoAuthContextMiddlewareTest(ApiTestCase):"}],"source_content_type":"text/x-python","patch_set":2,"id":"5afe65bd_17731bb3","line":98,"updated":"2015-06-02 15:32:14.000000000","message":"You\u0027re raising a Forbidden, which is a 403 rather than 401 - this won\u0027t pass.","commit_id":"c2428b7c5a06ba350f0301ebfcb7354bc5c215e1"},{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"2157aa3eaff6706f9daad7bff9750535e93fcd01","unresolved":false,"context_lines":[{"line_number":89,"context_line":"            \u0027X-User-ID\u0027: \u0027UserID\u0027,"},{"line_number":90,"context_line":"            \u0027X-Tenant-ID\u0027: None,"},{"line_number":91,"context_line":"            \u0027X-Roles\u0027: \u0027admin,Member\u0027,"},{"line_number":92,"context_line":"            \u0027X-Identity-Status\u0027: \u0027Invalid\u0027"},{"line_number":93,"context_line":"        }"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"        # Process the request"}],"source_content_type":"text/x-python","patch_set":4,"id":"5afe65bd_720d61e7","line":92,"updated":"2015-06-04 12:45:02.000000000","message":"This never tests the unscoped token code, as the Invalid identify status check hits first.","commit_id":"5356a6f43a43324ba88af9bc225dbc1a5efd1174"}]}
