Skip to content

Commit

Permalink
[#5993] refacor: Move the JdbcAuthorizationPlugin to authorization-co…
Browse files Browse the repository at this point in the history
…mmon module
  • Loading branch information
jerqi committed Dec 25, 2024
1 parent c2d1b1e commit 7892e92
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 107 deletions.
1 change: 1 addition & 0 deletions authorizations/authorization-common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ dependencies {
}
implementation(libs.bundles.log4j)
implementation(libs.commons.lang3)
implementation(libs.commons.dbcp2)
implementation(libs.guava)
implementation(libs.javax.jaxb.api) {
exclude("*")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.gravitino.authorization.jdbc;
package org.apache.gravitino.authorization.common;

import com.google.common.annotations.VisibleForTesting;
import com.google.common.collect.Lists;
Expand All @@ -40,7 +40,6 @@
import org.apache.gravitino.authorization.RoleChange;
import org.apache.gravitino.authorization.SecurableObject;
import org.apache.gravitino.authorization.User;
import org.apache.gravitino.authorization.common.JdbcAuthorizationProperties;
import org.apache.gravitino.connector.authorization.AuthorizationPlugin;
import org.apache.gravitino.exceptions.AuthorizationPluginException;
import org.apache.gravitino.meta.AuditInfo;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.gravitino.authorization.jdbc;
package org.apache.gravitino.authorization.common;

import java.util.List;
import org.apache.gravitino.MetadataObject;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.gravitino.authorization.jdbc;
package org.apache.gravitino.authorization.common;

import com.google.common.base.Preconditions;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.gravitino.authorization.jdbc;
package org.apache.gravitino.authorization.common;

import org.apache.gravitino.authorization.AuthorizationPrivilege;
import org.apache.gravitino.authorization.Privilege;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.gravitino.authorization.jdbc;
package org.apache.gravitino.authorization.common;

import java.util.List;
import org.apache.gravitino.MetadataObject;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.gravitino.authorization.jdbc;
package org.apache.gravitino.authorization.common;

import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.gravitino.authorization.jdbc;
package org.apache.gravitino.authorization.common;

import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Lists;
Expand All @@ -34,15 +34,14 @@
import org.apache.gravitino.authorization.SecurableObject;
import org.apache.gravitino.authorization.SecurableObjects;
import org.apache.gravitino.authorization.User;
import org.apache.gravitino.authorization.common.JdbcAuthorizationProperties;
import org.apache.gravitino.meta.AuditInfo;
import org.apache.gravitino.meta.GroupEntity;
import org.apache.gravitino.meta.RoleEntity;
import org.apache.gravitino.meta.UserEntity;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

public class JdbcAuthorizationPluginTest {
public class TestJdbcAuthorizationPlugin {
private static List<String> expectSQLs = Lists.newArrayList();
private static List<MetadataObject.Type> expectTypes = Lists.newArrayList();
private static List<String> expectObjectNames = Lists.newArrayList();
Expand Down
96 changes: 0 additions & 96 deletions authorizations/authorization-jdbc/build.gradle.kts

This file was deleted.

2 changes: 1 addition & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ if (gradle.startParameter.projectProperties["enableFuse"]?.toBoolean() == true)
}
include("iceberg:iceberg-common")
include("iceberg:iceberg-rest-server")
include("authorizations:authorization-ranger", "authorizations:authorization-jdbc", "authorizations:authorization-common", "authorizations:authorization-chain")
include("authorizations:authorization-ranger", "authorizations:authorization-common", "authorizations:authorization-chain")
include("trino-connector:trino-connector", "trino-connector:integration-test")
include("spark-connector:spark-common")
// kyuubi hive connector doesn't support 2.13 for Spark3.3
Expand Down

0 comments on commit 7892e92

Please sign in to comment.