)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":13252,"name":"Dr. Jens Harbott","display_name":"Jens Harbott (frickler)","email":"frickler@offenerstapel.de","username":"jrosenboom"},"change_message_id":"1f740f779c39c224f8c13763ddb8ddadf2446c5c","unresolved":true,"context_lines":[{"line_number":4,"context_line":"Commit:     Lajos Katona \u003clajos.katona@est.tech\u003e"},{"line_number":5,"context_line":"CommitDate: 2024-07-24 06:53:25 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Don\u0027t fail for role_assignment list for bad project id"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Don\u0027t fail in _list_role_assignments_for_tree"},{"line_number":10,"context_line":"if the project_id in the API call is not a valid"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"eea0cf21_c61fae03","line":7,"updated":"2024-07-26 06:26:52.000000000","message":"Why should this not fail, it is a bad API call anyway?","commit_id":"3eef16b861831f028fe0934ea4a5e2e74f3bd3b3"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"3f275f4f45f468feadc01e30ff05da1ee7cebcd5","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"f68b5762_c9168655","updated":"2024-07-26 14:33:13.000000000","message":"thanks for checking, I will come back to this one after I am back from PTO","commit_id":"3eef16b861831f028fe0934ea4a5e2e74f3bd3b3"}],"keystone/api/role_assignments.py":[{"author":{"_account_id":13252,"name":"Dr. Jens Harbott","display_name":"Jens Harbott (frickler)","email":"frickler@offenerstapel.de","username":"jrosenboom"},"change_message_id":"1f740f779c39c224f8c13763ddb8ddadf2446c5c","unresolved":true,"context_lines":[{"line_number":98,"context_line":"            except exception.ProjectNotFound:"},{"line_number":99,"context_line":"                msg \u003d _(\u0027scope.project.id must be a valid project_id if \u0027"},{"line_number":100,"context_line":"                        \u0027include_subtree is also specified\u0027)"},{"line_number":101,"context_line":"                project_id \u003d None"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"        ENFORCER.enforce_call(action\u003d\u0027identity:list_role_assignments_for_tree\u0027,"},{"line_number":104,"context_line":"                              filters\u003dfilters, target_attr\u003dtarget)"}],"source_content_type":"text/x-python","patch_set":2,"id":"e65f6549_c99765ec","line":101,"updated":"2024-07-26 06:26:52.000000000","message":"I think you want to do\n\nraise exception.ValidationError(message\u003dmsg)\n\nhere instead? just falling through will fail in L105 below and override the msg again, so this patch currently wouldn\u0027t do what the commit message says?","commit_id":"3eef16b861831f028fe0934ea4a5e2e74f3bd3b3"},{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"50dbce67481346484750593636b9d70e02b61e76","unresolved":true,"context_lines":[{"line_number":98,"context_line":"            except exception.ProjectNotFound:"},{"line_number":99,"context_line":"                msg \u003d _(\u0027scope.project.id must be a valid project_id if \u0027"},{"line_number":100,"context_line":"                        \u0027include_subtree is also specified\u0027)"},{"line_number":101,"context_line":"                project_id \u003d None"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"        ENFORCER.enforce_call(action\u003d\u0027identity:list_role_assignments_for_tree\u0027,"},{"line_number":104,"context_line":"                              filters\u003dfilters, target_attr\u003dtarget)"}],"source_content_type":"text/x-python","patch_set":2,"id":"b1a1cae9_7b7fb5fd","line":101,"in_reply_to":"e65f6549_c99765ec","updated":"2024-09-18 12:55:26.000000000","message":"actually no, to tell the truth if I raise ValidationError here, as result I have htp500, and long traceback in keystone log (... Sep 18 12:28:57 jammy devstack@keystone.service[133204]: ERROR keystone AssertionError: PROGRAMMING ERROR: enforcement (`keystone.common.rbac_enforcer.enforcer.RBACEnforcer.enforce_call()`) has not been called; API is unenforced.\n\")\n\nIf I set project_id\u003dNone and raise ValidationError in l125. then the result will be a short exception (like: {\"error\":{\"code\":404,\"message\":\"Could not find project: 13f6f0f6fa8740d4921d04908d7220eb.\",\"title\":\"Not Found\"}} ), which is not the same as without include_subtree, but better to give actual feedback to the user.","commit_id":"3eef16b861831f028fe0934ea4a5e2e74f3bd3b3"}]}
