Search in sources :

Example 71 with IdentityUser

use of com.sequenceiq.cloudbreak.common.model.user.IdentityUser in project cloudbreak by hortonworks.

the class ImageCatalogService method get.

public ImageCatalog get(String name) {
    ImageCatalog imageCatalog;
    if (isEnvDefault(name)) {
        imageCatalog = getCloudbreakDefaultImageCatalog();
    } else {
        IdentityUser user = authenticatedUserService.getCbUser();
        imageCatalog = imageCatalogRepository.findByName(name, user.getUserId(), user.getAccount());
    }
    return imageCatalog;
}
Also used : IdentityUser(com.sequenceiq.cloudbreak.common.model.user.IdentityUser) ImageCatalog(com.sequenceiq.cloudbreak.domain.ImageCatalog)

Example 72 with IdentityUser

use of com.sequenceiq.cloudbreak.common.model.user.IdentityUser in project cloudbreak by hortonworks.

the class NotificationController method executeAndNotify.

protected final void executeAndNotify(Consumer<IdentityUser> consumer, ResourceEvent resourceEvent) {
    IdentityUser user = authenticatedUserService.getCbUser();
    consumer.accept(user);
    notify(user, resourceEvent);
}
Also used : IdentityUser(com.sequenceiq.cloudbreak.common.model.user.IdentityUser)

Example 73 with IdentityUser

use of com.sequenceiq.cloudbreak.common.model.user.IdentityUser in project cloudbreak by hortonworks.

the class ProxyConfigController method getPrivates.

@Override
public Set<ProxyConfigResponse> getPrivates() {
    IdentityUser user = authenticatedUserService.getCbUser();
    Set<ProxyConfig> proxyConfigs = proxyConfigService.retrievePrivateProxyConfigs(user);
    return proxyConfigMapper.mapEntityToResponse(proxyConfigs);
}
Also used : IdentityUser(com.sequenceiq.cloudbreak.common.model.user.IdentityUser) ProxyConfig(com.sequenceiq.cloudbreak.domain.ProxyConfig)

Example 74 with IdentityUser

use of com.sequenceiq.cloudbreak.common.model.user.IdentityUser in project cloudbreak by hortonworks.

the class ProxyConfigController method getPublics.

@Override
public Set<ProxyConfigResponse> getPublics() {
    IdentityUser user = authenticatedUserService.getCbUser();
    Set<ProxyConfig> proxyConfigs = proxyConfigService.retrieveAccountProxyConfigs(user);
    return proxyConfigMapper.mapEntityToResponse(proxyConfigs);
}
Also used : IdentityUser(com.sequenceiq.cloudbreak.common.model.user.IdentityUser) ProxyConfig(com.sequenceiq.cloudbreak.domain.ProxyConfig)

Example 75 with IdentityUser

use of com.sequenceiq.cloudbreak.common.model.user.IdentityUser in project cloudbreak by hortonworks.

the class ProxyConfigController method getPublic.

@Override
public ProxyConfigResponse getPublic(String name) {
    IdentityUser user = authenticatedUserService.getCbUser();
    ProxyConfig proxyConfig = proxyConfigService.getPublicProxyConfig(name, user);
    return proxyConfigMapper.mapEntityToResponse(proxyConfig);
}
Also used : IdentityUser(com.sequenceiq.cloudbreak.common.model.user.IdentityUser) ProxyConfig(com.sequenceiq.cloudbreak.domain.ProxyConfig)

Aggregations

IdentityUser (com.sequenceiq.cloudbreak.common.model.user.IdentityUser)133 Test (org.junit.Test)14 Stack (com.sequenceiq.cloudbreak.domain.Stack)13 UserFilterField (com.sequenceiq.cloudbreak.common.service.user.UserFilterField)9 Async (org.springframework.scheduling.annotation.Async)9 Blueprint (com.sequenceiq.cloudbreak.domain.Blueprint)8 Credential (com.sequenceiq.cloudbreak.domain.Credential)8 FlexSubscription (com.sequenceiq.cloudbreak.domain.FlexSubscription)8 Cluster (com.sequenceiq.cloudbreak.domain.Cluster)7 LdapConfig (com.sequenceiq.cloudbreak.domain.LdapConfig)7 ProxyConfig (com.sequenceiq.cloudbreak.domain.ProxyConfig)7 ImageCatalog (com.sequenceiq.cloudbreak.domain.ImageCatalog)6 RDSConfig (com.sequenceiq.cloudbreak.domain.RDSConfig)6 Before (org.junit.Before)6 TestingAuthenticationToken (org.springframework.security.authentication.TestingAuthenticationToken)6 UpdateStackJson (com.sequenceiq.cloudbreak.api.model.UpdateStackJson)5 Template (com.sequenceiq.cloudbreak.domain.Template)5 ConstraintTemplate (com.sequenceiq.cloudbreak.domain.ConstraintTemplate)4 Network (com.sequenceiq.cloudbreak.domain.Network)4 Recipe (com.sequenceiq.cloudbreak.domain.Recipe)4