/*
 * Copyright © 2023 by Data Virtuality GmbH
 */
package org.teiid.query.util;

import com.datavirtuality.dv.core.services.DVService;
import java.util.Map;
import org.teiid.adminapi.impl.SessionMetadata;
import org.teiid.dqp.internal.process.UserLimits;

import java.util.List;
import java.util.Set;

/**
 * @author Roman Pedchenko
 * @date 2023.04.17
 */
public interface DVUsersHandlerIntf extends DVService {
    boolean isAdminOrSystemOrHasRoles(SessionMetadata session);

    boolean hasUser(String username);

    Map<String, Exception> addMappedRoles(Set<String> roleSet);

    String normalizeUserName(String username);

    List<String> getDomainOrUserRoleNames(String username);

    UserLimits getUserLimits(String username);

    String getUserTimezone(String username);

    List<String> getUserTypeDomains();

    Boolean isLoginAllowed(String username);

    Void resurrectInvalidatedPermissions(boolean validateCurrentUser, boolean distribute);

    Void invalidatePermissions();
}
