Skip to content

Commit

Permalink
fix example compile
Browse files Browse the repository at this point in the history
  • Loading branch information
jakelandis committed May 3, 2024
1 parent fd3aa53 commit ada5834
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import org.elasticsearch.xpack.core.security.authz.accesscontrol.IndicesAccessControl;
import org.elasticsearch.xpack.core.security.authz.accesscontrol.IndicesAccessControl.IndexAccessControl;
import org.elasticsearch.xpack.core.security.authz.permission.FieldPermissions;
import org.elasticsearch.xpack.core.security.authz.permission.RemoteClusterPermissions;
import org.elasticsearch.xpack.core.security.authz.permission.ResourcePrivileges;
import org.elasticsearch.xpack.core.security.authz.privilege.ApplicationPrivilegeDescriptor;
import org.elasticsearch.xpack.core.security.authz.privilege.ConfigurableClusterPrivilege;
Expand Down Expand Up @@ -220,7 +221,8 @@ private GetUserPrivilegesResponse getUserPrivilegesResponse(boolean isSuperuser)
RoleDescriptor.ApplicationResourcePrivileges.builder().application("*").privileges("*").resources("*").build()) :
Collections.emptySet();
final Set<String> runAs = isSuperuser ? Collections.singleton("*") : Collections.emptySet();
return new GetUserPrivilegesResponse(cluster, conditionalCluster, indices, application, runAs, Set.of());
return new GetUserPrivilegesResponse(cluster, conditionalCluster, indices, application, runAs, Set.of(),
RemoteClusterPermissions.NONE);
}

public static class CustomAuthorizationInfo implements AuthorizationInfo {
Expand Down

0 comments on commit ada5834

Please sign in to comment.