)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"7c3e8b9ac98dca56e03c3ceb59513ba312b3ed36","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"c9259c2b_8faff809","updated":"2024-10-08 12:32:14.000000000","message":"Basically, what this does is wait to create an Enforcer until it\u0027s actually needed, and by that time the CONF object preparation will have been completed.  Makes sense to me.","commit_id":"562a2eb48b4fc10cf97bd65d9a2f2e6d2a739eba"},{"author":{"_account_id":8122,"name":"Cyril Roelandt","email":"cyril@redhat.com","username":"cyril.roelandt.enovance"},"change_message_id":"781685ff60c14179f41e654a599c27e246835e76","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"eca79750_c44cbd60","updated":"2024-10-01 14:31:17.000000000","message":"So, do we not need to call it at all?","commit_id":"562a2eb48b4fc10cf97bd65d9a2f2e6d2a739eba"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"ba79bef33e1c38dda970a4a50bedc9689457a96d","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"dd2f2043_f5311f85","updated":"2024-09-19 02:56:27.000000000","message":"recheck","commit_id":"562a2eb48b4fc10cf97bd65d9a2f2e6d2a739eba"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"e9fc35ed1fd83ae89586f332f7aee1da6fc592af","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"9f517f94_17bbeca4","in_reply_to":"c9259c2b_8faff809","updated":"2024-10-11 15:23:33.000000000","message":"Yes you are correct and that\u0027s how Enforcer is initialized in nova or cinder (They initialize Enforcer when first policy check is executed.)","commit_id":"562a2eb48b4fc10cf97bd65d9a2f2e6d2a739eba"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"c342f78ffa60c5c8d9910c1c1f155cb095df135b","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"34722280_39b0bb8a","in_reply_to":"eca79750_c44cbd60","updated":"2024-10-01 14:47:09.000000000","message":"We don\u0027t need that call because Enforcer is instantiated when needed (eg. https://github.com/openstack/glance/blob/13acba7505295cfd57830510618d867a1bb4dd8a/glance/api/v2/images.py#L83 ).","commit_id":"562a2eb48b4fc10cf97bd65d9a2f2e6d2a739eba"}],"glance/common/config.py":[{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"7c3e8b9ac98dca56e03c3ceb59513ba312b3ed36","unresolved":true,"context_lines":[{"line_number":640,"context_line":"CONF.register_opts(task_opts, group\u003d\u0027task\u0027)"},{"line_number":641,"context_line":"CONF.register_opts(common_opts)"},{"line_number":642,"context_line":"CONF.register_opts(wsgi_opts, group\u003d\u0027wsgi\u0027)"},{"line_number":643,"context_line":"policy.Enforcer(CONF)"},{"line_number":644,"context_line":""},{"line_number":645,"context_line":""},{"line_number":646,"context_line":"def parse_args(args\u003dNone, usage\u003dNone, default_config_files\u003dNone):"}],"source_content_type":"text/x-python","patch_set":2,"id":"9346502b_71e71c84","side":"PARENT","line":643,"range":{"start_line":643,"start_character":16,"end_line":643,"end_character":20},"updated":"2024-10-08 12:32:14.000000000","message":"I was worried that the other places you were pointing to don\u0027t pass CONF when the Enforcer is created, but it looks like that\u0027s handled by ``Enforcer.__init__()``:\n\nhttps://github.com/openstack/glance/blob/13acba7505295cfd57830510618d867a1bb4dd8a/glance/api/policy.py#L53\n\nSo I think this line really is unnecessary (in addition to causing the issue you explain on the bug report).","commit_id":"3ea17a13a00c7fa51acce919cf3de77bfa9cf0ee"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"e9fc35ed1fd83ae89586f332f7aee1da6fc592af","unresolved":true,"context_lines":[{"line_number":640,"context_line":"CONF.register_opts(task_opts, group\u003d\u0027task\u0027)"},{"line_number":641,"context_line":"CONF.register_opts(common_opts)"},{"line_number":642,"context_line":"CONF.register_opts(wsgi_opts, group\u003d\u0027wsgi\u0027)"},{"line_number":643,"context_line":"policy.Enforcer(CONF)"},{"line_number":644,"context_line":""},{"line_number":645,"context_line":""},{"line_number":646,"context_line":"def parse_args(args\u003dNone, usage\u003dNone, default_config_files\u003dNone):"}],"source_content_type":"text/x-python","patch_set":2,"id":"0ad0aa53_36ecc20d","side":"PARENT","line":643,"range":{"start_line":643,"start_character":16,"end_line":643,"end_character":20},"in_reply_to":"9346502b_71e71c84","updated":"2024-10-11 15:23:33.000000000","message":"Yes and one more things I\u0027d add is that the enforcer instance created here is not at all used (Enforcer has no internal singleton).","commit_id":"3ea17a13a00c7fa51acce919cf3de77bfa9cf0ee"}]}
