This is an automated email from the ASF dual-hosted git repository. jshao pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/gravitino.git
commit 9922dd1288f1e84114f193ec8298f4306c63905d Author: yangyang zhong <[email protected]> AuthorDate: Fri Jul 4 11:50:01 2025 +0800 [#7549] improvement(authz): Improve the process logic of authorization is disabled (#7566) ### What changes were proposed in this pull request? improve the process logic of authorization is disabled ### Why are the changes needed? close: #7549 ### Does this PR introduce _any_ user-facing change? None ### How was this patch tested? Using the existing test cases is sufficient. --- .../main/java/org/apache/gravitino/server/GravitinoServer.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/server/src/main/java/org/apache/gravitino/server/GravitinoServer.java b/server/src/main/java/org/apache/gravitino/server/GravitinoServer.java index f44f436ad0..582e0d105a 100644 --- a/server/src/main/java/org/apache/gravitino/server/GravitinoServer.java +++ b/server/src/main/java/org/apache/gravitino/server/GravitinoServer.java @@ -121,9 +121,11 @@ public class GravitinoServer extends ResourceConfig { new AbstractBinder() { @Override protected void configure() { - bind(GravitinoInterceptionService.class) - .to(InterceptionService.class) - .in(Singleton.class); + if (serverConfig.get(Configs.ENABLE_AUTHORIZATION)) { + bind(GravitinoInterceptionService.class) + .to(InterceptionService.class) + .in(Singleton.class); + } bind(gravitinoEnv.metalakeDispatcher()).to(MetalakeDispatcher.class).ranked(1); bind(gravitinoEnv.catalogDispatcher()).to(CatalogDispatcher.class).ranked(1); bind(gravitinoEnv.schemaDispatcher()).to(SchemaDispatcher.class).ranked(1);
