You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@syncope.apache.org by GitBox <gi...@apache.org> on 2022/07/08 08:36:36 UTC

[GitHub] [syncope] github-code-scanning[bot] commented on a diff in pull request #359: [SYNCOPE-1688] Manage and reuse saved FIQL queries from Console

github-code-scanning[bot] commented on code in PR #359:
URL: https://github.com/apache/syncope/pull/359#discussion_r916593245


##########
client/idrepo/console/src/main/java/org/apache/syncope/client/console/ConsoleProperties.java:
##########
@@ -69,6 +71,14 @@
 
     private final Topology topology = new Topology();
 
+    public String getAdminUser() {

Review Comment:
   ## Missing Override annotation
   
   This method overrides [CommonUIProperties.getAdminUser](1); it is advisable to add an Override annotation.
   
   [Show more details](https://github.com/apache/syncope/security/code-scanning/1065)



##########
client/idrepo/console/src/main/java/org/apache/syncope/client/console/notifications/NotificationWizardBuilder.java:
##########
@@ -321,7 +321,7 @@
         }
     }
 
-    public static class Recipients extends WizardStep {
+    public class Recipients extends WizardStep {

Review Comment:
   ## Inner class could be static
   
   Recipients could be made static, since the enclosing instance is used only in its constructor.
   
   [Show more details](https://github.com/apache/syncope/security/code-scanning/1066)



##########
common/idrepo/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/FIQLQueryService.java:
##########
@@ -0,0 +1,124 @@
+/*
+ * 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.syncope.common.rest.api.service;
+
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.enums.ParameterIn;
+import io.swagger.v3.oas.annotations.headers.Header;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.responses.ApiResponse;
+import io.swagger.v3.oas.annotations.responses.ApiResponses;
+import io.swagger.v3.oas.annotations.security.SecurityRequirement;
+import io.swagger.v3.oas.annotations.security.SecurityRequirements;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import java.util.List;
+import javax.validation.constraints.NotNull;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.DELETE;
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.PUT;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.QueryParam;
+import javax.ws.rs.core.HttpHeaders;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+import org.apache.syncope.common.lib.to.FIQLQueryTO;
+import org.apache.syncope.common.rest.api.RESTHeaders;
+
+/**
+ * REST operations for FIQL queries.
+ */
+@Tag(name = "FIQLQueries")
+@SecurityRequirements({
+    @SecurityRequirement(name = "BasicAuthentication"),
+    @SecurityRequirement(name = "Bearer") })
+@Path("fiqlQueries")
+public interface FIQLQueryService extends JAXRSService {

Review Comment:
   ## Constant interface anti-pattern
   
   Type FIQLQueryService implements constant interface [JAXRSService](1).
   
   [Show more details](https://github.com/apache/syncope/security/code-scanning/1072)



##########
client/am/console/src/main/java/org/apache/syncope/client/console/wizards/AuthModuleWizardBuilder.java:
##########
@@ -160,16 +160,17 @@
         }
     }
 
-    protected static class Configuration extends WizardStep {
+    protected class Configuration extends WizardStep {

Review Comment:
   ## Inner class could be static
   
   Configuration could be made static, since the enclosing instance is used only in its constructor.
   
   [Show more details](https://github.com/apache/syncope/security/code-scanning/1070)



##########
client/am/console/src/main/java/org/apache/syncope/client/console/wizards/AttrRepoWizardBuilder.java:
##########
@@ -155,12 +155,12 @@
         }
     }
 
-    protected static class Configuration extends WizardStep {
+    protected class Configuration extends WizardStep {

Review Comment:
   ## Inner class could be static
   
   Configuration could be made static, since the enclosing instance is used only in its constructor.
   
   [Show more details](https://github.com/apache/syncope/security/code-scanning/1069)



##########
client/idrepo/console/src/main/java/org/apache/syncope/client/console/policies/PolicyRuleWizardBuilder.java:
##########
@@ -171,7 +171,7 @@
         }
     }
 
-    public static class Configuration extends WizardStep {
+    public class Configuration extends WizardStep {

Review Comment:
   ## Inner class could be static
   
   Configuration could be made static, since the enclosing instance is used only in its constructor.
   
   [Show more details](https://github.com/apache/syncope/security/code-scanning/1067)



##########
client/idrepo/console/src/main/java/org/apache/syncope/client/console/reports/ReportletWizardBuilder.java:
##########
@@ -127,7 +126,7 @@
         }
     }
 
-    public static class Configuration extends WizardStep {
+    public class Configuration extends WizardStep {

Review Comment:
   ## Inner class could be static
   
   Configuration could be made static, since the enclosing instance is used only in its constructor.
   
   [Show more details](https://github.com/apache/syncope/security/code-scanning/1068)



##########
client/idrepo/console/src/main/java/org/apache/syncope/client/console/ConsoleProperties.java:
##########
@@ -69,6 +71,14 @@
 
     private final Topology topology = new Topology();
 
+    public String getAdminUser() {
+        return adminUser;
+    }
+
+    public void setAdminUser(final String adminUser) {

Review Comment:
   ## Missing Override annotation
   
   This method overrides [CommonUIProperties.setAdminUser](1); it is advisable to add an Override annotation.
   
   [Show more details](https://github.com/apache/syncope/security/code-scanning/1064)



##########
client/am/console/src/main/java/org/apache/syncope/client/console/wizards/AuthModuleWizardBuilder.java:
##########
@@ -160,16 +160,17 @@
         }
     }
 
-    protected static class Configuration extends WizardStep {
+    protected class Configuration extends WizardStep {
 
         private static final long serialVersionUID = -785981096328637758L;
 
         Configuration(final AuthModuleTO authModule) {
-            add(new BeanPanel<>("bean", new PropertyModel<>(authModule, "conf"), "ldap").setRenderBodyOnly(true));
+            add(new BeanPanel<>(
+                    "bean", new PropertyModel<>(authModule, "conf"), pageRef, "ldap").setRenderBodyOnly(true));
         }
     }
 
-    protected static class GoogleMfaAuthModuleConfLDAP extends WizardStep implements WizardModel.ICondition {
+    protected class GoogleMfaAuthModuleConfLDAP extends WizardStep implements WizardModel.ICondition {

Review Comment:
   ## Inner class could be static
   
   GoogleMfaAuthModuleConfLDAP could be made static, since the enclosing instance is used only in its constructor.
   
   [Show more details](https://github.com/apache/syncope/security/code-scanning/1071)



-- 
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: dev-unsubscribe@syncope.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org