XN137 commented on code in PR #2533:
URL: https://github.com/apache/polaris/pull/2533#discussion_r2336461806


##########
runtime/service/src/main/java/org/apache/polaris/service/admin/PolarisServiceImpl.java:
##########
@@ -99,57 +89,21 @@ public class PolarisServiceImpl
         PolarisPrincipalsApiService,
         PolarisPrincipalRolesApiService {
   private static final Logger LOGGER = 
LoggerFactory.getLogger(PolarisServiceImpl.class);
-  private final PolarisDiagnostics diagnostics;
-  private final ResolutionManifestFactory resolutionManifestFactory;
-  private final PolarisAuthorizer polarisAuthorizer;
-  private final MetaStoreManagerFactory metaStoreManagerFactory;
-  private final UserSecretsManagerFactory userSecretsManagerFactory;
-  private final CallContext callContext;
   private final RealmConfig realmConfig;
   private final ReservedProperties reservedProperties;
   private final PolarisEventListener polarisEventListener;
+  private final PolarisAdminService adminService;
 
   @Inject
   public PolarisServiceImpl(
-      PolarisDiagnostics diagnostics,
-      ResolutionManifestFactory resolutionManifestFactory,
-      MetaStoreManagerFactory metaStoreManagerFactory,
-      UserSecretsManagerFactory userSecretsManagerFactory,
-      PolarisAuthorizer polarisAuthorizer,
-      CallContext callContext,
+      RealmConfig realmConfig,
       ReservedProperties reservedProperties,
-      PolarisEventListener polarisEventListener) {
-    this.diagnostics = diagnostics;
-    this.resolutionManifestFactory = resolutionManifestFactory;
-    this.metaStoreManagerFactory = metaStoreManagerFactory;
-    this.userSecretsManagerFactory = userSecretsManagerFactory;
-    this.polarisAuthorizer = polarisAuthorizer;
-    this.callContext = callContext;
-    this.realmConfig = callContext.getRealmConfig();
+      PolarisEventListener polarisEventListener,
+      PolarisAdminService adminService) {
+    this.realmConfig = realmConfig;
     this.reservedProperties = reservedProperties;
     this.polarisEventListener = polarisEventListener;
-  }
-
-  private PolarisAdminService newAdminService(
-      RealmContext realmContext, SecurityContext securityContext) {
-    PolarisPrincipal authenticatedPrincipal = (PolarisPrincipal) 
securityContext.getUserPrincipal();
-    if (authenticatedPrincipal == null) {

Review Comment:
   note that this checks happens in `PolarisAdminService` ctor already



-- 
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]

Reply via email to