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);
}
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);
}
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);
}
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);
}
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);
}
Aggregations