io.permit.sdk.enforcement.GetUserPermissionsQuery Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of permit-sdk-java Show documentation
Show all versions of permit-sdk-java Show documentation
Java SDK for Permit.io: fullstack permissions for cloud native applications
package io.permit.sdk.enforcement;
import io.permit.sdk.util.Context;
import java.util.ArrayList;
import java.util.List;
public final class GetUserPermissionsQuery {
public final User user;
public final List tenants;
public final List resource_types;
public final List resources;
public final Context context;
/**
* input to get user permissions api
*
* @param user the user we'd like to get a list of permissions for.
* @param tenants filter only permissions granted on specific tenants.
* @param resource_types filter permissions based on resource type.
* @param resources filter permissions based on resource instance key.
* @param context The context for the authorization check.
*/
public GetUserPermissionsQuery(User user, List tenants, List resource_types, List resources, Context context) {
this.user = user;
this.tenants = tenants;
this.resource_types = resource_types;
this.resources = resources;
this.context = context;
}
public GetUserPermissionsQuery(User user, List tenants, List resource_types, List resources) {
this(user, tenants, resource_types, resources, new Context());
}
public GetUserPermissionsQuery(User user, List tenants, List resource_types) {
this(user, tenants, resource_types, null);
}
public GetUserPermissionsQuery(User user, List tenants) {
this(user, tenants, null);
}
public GetUserPermissionsQuery(User user) {
this(user, null);
}
}