Skip to content

Commit

Permalink
Use general Client
Browse files Browse the repository at this point in the history
Signed-off-by: Craig Perkins <[email protected]>
  • Loading branch information
cwperks committed Jan 8, 2025
1 parent ad3fbb6 commit 9439a0e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.mgt.SecurityManager;
import org.opensearch.client.Client;
import org.opensearch.client.FilterClient;
import org.opensearch.client.node.NodeClient;
import org.opensearch.cluster.metadata.IndexNameExpressionResolver;
import org.opensearch.cluster.service.ClusterService;
Expand Down Expand Up @@ -141,7 +140,7 @@ public void handleRequest(RestRequest request, RestChannel channel, NodeClient c
}
}

public FilterClient getRunAsClient(Plugin plugin) {
public Client getRunAsClient(Plugin plugin) {
return new RunAsSystemClient(client);

Check warning on line 144 in plugins/identity-shiro/src/main/java/org/opensearch/identity/shiro/ShiroIdentityPlugin.java

View check run for this annotation

Codecov / codecov/patch

plugins/identity-shiro/src/main/java/org/opensearch/identity/shiro/ShiroIdentityPlugin.java#L144

Added line #L144 was not covered by tests
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
package org.opensearch.identity.noop;

import org.opensearch.client.Client;
import org.opensearch.client.FilterClient;
import org.opensearch.identity.Subject;
import org.opensearch.identity.tokens.TokenManager;
import org.opensearch.plugins.IdentityPlugin;
Expand Down Expand Up @@ -49,7 +48,7 @@ public TokenManager getTokenManager() {
}

@Override
public FilterClient getRunAsClient(Plugin plugin) {
public Client getRunAsClient(Plugin plugin) {
return new RunAsSystemClient(client);

Check warning on line 52 in server/src/main/java/org/opensearch/identity/noop/NoopIdentityPlugin.java

View check run for this annotation

Codecov / codecov/patch

server/src/main/java/org/opensearch/identity/noop/NoopIdentityPlugin.java#L52

Added line #L52 was not covered by tests
}
}

0 comments on commit 9439a0e

Please sign in to comment.