diff --git a/core/trino-main/src/main/java/io/trino/security/InjectedConnectorAccessControl.java b/core/trino-main/src/main/java/io/trino/security/InjectedConnectorAccessControl.java index 1f17ec6982cd..76da1a5414c3 100644 --- a/core/trino-main/src/main/java/io/trino/security/InjectedConnectorAccessControl.java +++ b/core/trino-main/src/main/java/io/trino/security/InjectedConnectorAccessControl.java @@ -14,7 +14,6 @@ package io.trino.security; import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableMap; import io.trino.metadata.QualifiedObjectName; import io.trino.spi.TrinoException; import io.trino.spi.connector.CatalogSchemaName; @@ -60,13 +59,6 @@ public void checkCanCreateSchema(ConnectorSecurityContext context, String schema accessControl.checkCanCreateSchema(securityContext, getCatalogSchemaName(schemaName), properties); } - @Override - public void checkCanCreateSchema(ConnectorSecurityContext context, String schemaName) - { - checkArgument(context == null, "context must be null"); - accessControl.checkCanCreateSchema(securityContext, getCatalogSchemaName(schemaName), ImmutableMap.of()); - } - @Override public void checkCanDropSchema(ConnectorSecurityContext context, String schemaName) { diff --git a/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorAccessControl.java b/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorAccessControl.java index 9db91b99c744..6e2320b7d5a3 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorAccessControl.java +++ b/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorAccessControl.java @@ -99,17 +99,6 @@ default void checkCanCreateSchema(ConnectorSecurityContext context, String schem denyCreateSchema(schemaName); } - /** - * Check if identity is allowed to create the specified schema. - * - * @throws io.trino.spi.security.AccessDeniedException if not allowed - */ - @Deprecated - default void checkCanCreateSchema(ConnectorSecurityContext context, String schemaName) - { - denyCreateSchema(schemaName); - } - /** * Check if identity is allowed to drop the specified schema. * diff --git a/core/trino-spi/src/main/java/io/trino/spi/security/SystemAccessControl.java b/core/trino-spi/src/main/java/io/trino/spi/security/SystemAccessControl.java index 9a9fdb54bfba..77df60d14a1d 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/security/SystemAccessControl.java +++ b/core/trino-spi/src/main/java/io/trino/spi/security/SystemAccessControl.java @@ -264,17 +264,6 @@ default void checkCanCreateSchema(SystemSecurityContext context, CatalogSchemaNa denyCreateSchema(schema.toString()); } - /** - * Check if identity is allowed to create the specified schema in a catalog. - * - * @throws AccessDeniedException if not allowed - */ - @Deprecated - default void checkCanCreateSchema(SystemSecurityContext context, CatalogSchemaName schema) - { - denyCreateSchema(schema.toString()); - } - /** * Check if identity is allowed to drop the specified schema in a catalog. * diff --git a/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/classloader/ClassLoaderSafeConnectorAccessControl.java b/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/classloader/ClassLoaderSafeConnectorAccessControl.java index 11852db27a4b..021c60b61088 100644 --- a/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/classloader/ClassLoaderSafeConnectorAccessControl.java +++ b/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/classloader/ClassLoaderSafeConnectorAccessControl.java @@ -54,14 +54,6 @@ public void checkCanCreateSchema(ConnectorSecurityContext context, String schema } } - @Override - public void checkCanCreateSchema(ConnectorSecurityContext context, String schemaName) - { - try (ThreadContextClassLoader ignored = new ThreadContextClassLoader(classLoader)) { - delegate.checkCanCreateSchema(context, schemaName); - } - } - @Override public void checkCanDropSchema(ConnectorSecurityContext context, String schemaName) { diff --git a/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/AllowAllAccessControl.java b/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/AllowAllAccessControl.java index c1f93e3518b6..be94198f2a7e 100644 --- a/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/AllowAllAccessControl.java +++ b/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/AllowAllAccessControl.java @@ -37,11 +37,6 @@ public void checkCanCreateSchema(ConnectorSecurityContext context, String schema { } - @Override - public void checkCanCreateSchema(ConnectorSecurityContext context, String schemaName) - { - } - @Override public void checkCanDropSchema(ConnectorSecurityContext context, String schemaName) { diff --git a/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/AllowAllSystemAccessControl.java b/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/AllowAllSystemAccessControl.java index 354b08d72b39..53b9abb364ba 100644 --- a/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/AllowAllSystemAccessControl.java +++ b/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/AllowAllSystemAccessControl.java @@ -141,11 +141,6 @@ public void checkCanCreateSchema(SystemSecurityContext context, CatalogSchemaNam { } - @Override - public void checkCanCreateSchema(SystemSecurityContext context, CatalogSchemaName schema) - { - } - @Override public void checkCanDropSchema(SystemSecurityContext context, CatalogSchemaName schema) { diff --git a/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/FileBasedAccessControl.java b/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/FileBasedAccessControl.java index 05b49d728f0d..4b113e5ebbf1 100644 --- a/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/FileBasedAccessControl.java +++ b/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/FileBasedAccessControl.java @@ -139,12 +139,6 @@ public FileBasedAccessControl(CatalogName catalogName, AccessControlRules rules) @Override public void checkCanCreateSchema(ConnectorSecurityContext context, String schemaName, Map properties) - { - checkCanCreateSchema(context, schemaName); - } - - @Override - public void checkCanCreateSchema(ConnectorSecurityContext context, String schemaName) { if (!isSchemaOwner(context, schemaName)) { denyCreateSchema(schemaName); diff --git a/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/FileBasedSystemAccessControl.java b/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/FileBasedSystemAccessControl.java index 70ae2f8f3f6b..c59ab7368210 100644 --- a/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/FileBasedSystemAccessControl.java +++ b/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/FileBasedSystemAccessControl.java @@ -385,12 +385,6 @@ public Set filterCatalogs(SystemSecurityContext context, Set cat @Override public void checkCanCreateSchema(SystemSecurityContext context, CatalogSchemaName schema, Map properties) - { - checkCanCreateSchema(context, schema); - } - - @Override - public void checkCanCreateSchema(SystemSecurityContext context, CatalogSchemaName schema) { if (!isSchemaOwner(context, schema)) { denyCreateSchema(schema.toString()); diff --git a/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/ForwardingConnectorAccessControl.java b/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/ForwardingConnectorAccessControl.java index 4b41346ae086..4b0c2f49a5f6 100644 --- a/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/ForwardingConnectorAccessControl.java +++ b/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/ForwardingConnectorAccessControl.java @@ -55,12 +55,6 @@ public void checkCanCreateSchema(ConnectorSecurityContext context, String schema delegate().checkCanCreateSchema(context, schemaName, properties); } - @Override - public void checkCanCreateSchema(ConnectorSecurityContext context, String schemaName) - { - delegate().checkCanCreateSchema(context, schemaName); - } - @Override public void checkCanDropSchema(ConnectorSecurityContext context, String schemaName) { diff --git a/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/ForwardingSystemAccessControl.java b/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/ForwardingSystemAccessControl.java index 0a26debd559a..c13f9de1f930 100644 --- a/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/ForwardingSystemAccessControl.java +++ b/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/security/ForwardingSystemAccessControl.java @@ -145,12 +145,6 @@ public void checkCanCreateSchema(SystemSecurityContext context, CatalogSchemaNam delegate().checkCanCreateSchema(context, schema, properties); } - @Override - public void checkCanCreateSchema(SystemSecurityContext context, CatalogSchemaName schema) - { - delegate().checkCanCreateSchema(context, schema); - } - @Override public void checkCanDropSchema(SystemSecurityContext context, CatalogSchemaName schema) { diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/security/LegacyAccessControl.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/security/LegacyAccessControl.java index 409d09a11d0b..cb175ea34c10 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/security/LegacyAccessControl.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/security/LegacyAccessControl.java @@ -75,11 +75,6 @@ public void checkCanCreateSchema(ConnectorSecurityContext context, String schema { } - @Override - public void checkCanCreateSchema(ConnectorSecurityContext context, String schemaName) - { - } - @Override public void checkCanDropSchema(ConnectorSecurityContext context, String schemaName) { diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/security/SqlStandardAccessControl.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/security/SqlStandardAccessControl.java index a1c7905e321e..435ec58c4c68 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/security/SqlStandardAccessControl.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/security/SqlStandardAccessControl.java @@ -131,12 +131,6 @@ public SqlStandardAccessControl( @Override public void checkCanCreateSchema(ConnectorSecurityContext context, String schemaName, Map properties) - { - checkCanCreateSchema(context, schemaName); - } - - @Override - public void checkCanCreateSchema(ConnectorSecurityContext context, String schemaName) { if (!isAdmin(context)) { denyCreateSchema(schemaName);