Search in sources :

Example 96 with IdentityUser

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

the class ImageCatalogV1Controller method createImageCatalog.

private ImageCatalogResponse createImageCatalog(ImageCatalogRequest imageCatalogRequest, boolean publicInAccount) {
    IdentityUser identityUser = authenticatedUserService.getCbUser();
    ImageCatalog imageCatalog = conversionService.convert(imageCatalogRequest, ImageCatalog.class);
    imageCatalog.setAccount(identityUser.getAccount());
    imageCatalog.setOwner(identityUser.getUserId());
    imageCatalog.setPublicInAccount(publicInAccount);
    imageCatalog = imageCatalogService.create(imageCatalog);
    return convert(imageCatalog);
}
Also used : IdentityUser(com.sequenceiq.cloudbreak.common.model.user.IdentityUser) ImageCatalog(com.sequenceiq.cloudbreak.domain.ImageCatalog)

Example 97 with IdentityUser

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

the class LdapController method getPrivate.

@Override
public LdapConfigResponse getPrivate(String name) {
    IdentityUser user = authenticatedUserService.getCbUser();
    LdapConfig config = ldapConfigService.getPrivateConfig(name, user);
    return conversionService.convert(config, LdapConfigResponse.class);
}
Also used : IdentityUser(com.sequenceiq.cloudbreak.common.model.user.IdentityUser) LdapConfig(com.sequenceiq.cloudbreak.domain.LdapConfig)

Example 98 with IdentityUser

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

the class LdapController method getPublic.

@Override
public LdapConfigResponse getPublic(String name) {
    IdentityUser user = authenticatedUserService.getCbUser();
    LdapConfig config = ldapConfigService.getPublicConfig(name, user);
    return conversionService.convert(config, LdapConfigResponse.class);
}
Also used : IdentityUser(com.sequenceiq.cloudbreak.common.model.user.IdentityUser) LdapConfig(com.sequenceiq.cloudbreak.domain.LdapConfig)

Example 99 with IdentityUser

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

the class LdapController method getPublics.

@Override
public Set<LdapConfigResponse> getPublics() {
    IdentityUser user = authenticatedUserService.getCbUser();
    Set<LdapConfig> configs = ldapConfigService.retrieveAccountConfigs(user);
    return toJsonSet(configs);
}
Also used : IdentityUser(com.sequenceiq.cloudbreak.common.model.user.IdentityUser) LdapConfig(com.sequenceiq.cloudbreak.domain.LdapConfig)

Example 100 with IdentityUser

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

the class NetworkController method getPrivate.

@Override
public NetworkResponse getPrivate(String name) {
    IdentityUser user = authenticatedUserService.getCbUser();
    Network network = networkService.getPrivateNetwork(name, user);
    return convert(network);
}
Also used : IdentityUser(com.sequenceiq.cloudbreak.common.model.user.IdentityUser) Network(com.sequenceiq.cloudbreak.domain.Network)

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