use of com.bakdata.conquery.models.auth.permissions.Authorized in project conquery by bakdata.
the class TokenScopedUser method isPermitted.
@Override
public boolean[] isPermitted(List<? extends Authorized> authorized, Ability ability) {
final EnumSet<Ability> abilitySet = EnumSet.of(ability);
boolean[] ret = new boolean[authorized.size()];
for (int i = 0; i < ret.length; i++) {
Authorized object = authorized.get(i);
ret[i] = tokenContext.isCoveredByScopes(object.createPermission(abilitySet)) && delegate.isPermitted(object, ability);
}
return ret;
}
Aggregations