xunliu commented on code in PR #7062:
URL: https://github.com/apache/gravitino/pull/7062#discussion_r2061860751
##########
core/src/main/java/org/apache/gravitino/config/ConfigConstants.java:
##########
@@ -73,4 +73,7 @@ private ConfigConstants() {}
/** The version number for the 0.9.0 release. */
public static final String VERSION_0_9_0 = "0.9.0";
+
+ /** The version number for the 0.10.0 release. */
+ public static final String VERSION_0_10_0 = "0.10.0";
Review Comment:
Why do we need add these codes?
##########
server-common/src/test/java/org/apache/gravitino/server/authorization/TestIgnoreAuthorizer.java:
##########
@@ -15,14 +15,20 @@
* under the License.
*/
-package org.apache.gravitino.server.authorization.annotations;
+package org.apache.gravitino.server.authorization;
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
+import java.io.IOException;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
-/** This annotation identify which parameters in the request are to be used
for authorization. */
-@Target({ElementType.PARAMETER, ElementType.FIELD})
-@Retention(RetentionPolicy.RUNTIME)
-public @interface AuthorizeMetadata {}
+/** Test of {@link IgnoreAuthorizer} */
+public class TestIgnoreAuthorizer {
+
+ @Test
+ public void testAuthorize() throws IOException {
+ try (IgnoreAuthorizer ignoreAuthorizer = new IgnoreAuthorizer()) {
+ boolean result = ignoreAuthorizer.authorize(null, null, null, null);
+ Assertions.assertTrue(result, "Logic error in AllowAuthorizer");
Review Comment:
Pleas update `"Logic error in AllowAuthorizer"`
##########
server-common/src/test/java/org/apache/gravitino/server/authorization/TestGravitinoAuthorizerProvider.java:
##########
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.gravitino.server.authorization;
+
+import org.apache.gravitino.Configs;
+import org.apache.gravitino.server.ServerConfig;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
+
+/** Test of {@link GravitinoAuthorizerProvider} */
+public class TestGravitinoAuthorizerProvider {
+
+ @Test
+ public void testInitializeAllowAuthorizer() {
+ ServerConfig serverConfig = new ServerConfig();
+ serverConfig.set(Configs.AUTHORIZATION_MODE, "allow");
+ GravitinoAuthorizerProvider.getInstance().initialize(serverConfig);
Review Comment:
Pleaes update this configuration.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]