Search in sources :

Example 91 with IdentityUser

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

the class CredentialController method getPrivate.

@Override
public CredentialResponse getPrivate(String name) {
    IdentityUser user = authenticatedUserService.getCbUser();
    Credential credentials = credentialService.getPrivateCredential(name, user);
    return convert(credentials);
}
Also used : IdentityUser(com.sequenceiq.cloudbreak.common.model.user.IdentityUser) Credential(com.sequenceiq.cloudbreak.domain.Credential)

Example 92 with IdentityUser

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

the class FlexSubscriptionController method deletePublic.

@Override
public void deletePublic(String name) {
    IdentityUser cbUser = authenticatedUserService.getCbUser();
    FlexSubscription subscription = flexService.findByNameInAccount(name, cbUser.getUserId(), cbUser.getAccount());
    flexService.delete(subscription);
}
Also used : IdentityUser(com.sequenceiq.cloudbreak.common.model.user.IdentityUser) FlexSubscription(com.sequenceiq.cloudbreak.domain.FlexSubscription)

Example 93 with IdentityUser

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

the class FlexSubscriptionController method setUsedForControllerInAccount.

@Override
public void setUsedForControllerInAccount(Long id) {
    IdentityUser identityUser = authenticatedUserService.getCbUser();
    FlexSubscription flexSubscription = flexService.findOneById(id);
    flexService.setUsedForControllerFlexSubscription(flexSubscription.getName(), identityUser);
}
Also used : IdentityUser(com.sequenceiq.cloudbreak.common.model.user.IdentityUser) FlexSubscription(com.sequenceiq.cloudbreak.domain.FlexSubscription)

Example 94 with IdentityUser

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

the class FlexSubscriptionController method setUsedForControllerInAccount.

@Override
public void setUsedForControllerInAccount(String name) {
    IdentityUser identityUser = authenticatedUserService.getCbUser();
    flexService.setUsedForControllerFlexSubscription(name, identityUser);
}
Also used : IdentityUser(com.sequenceiq.cloudbreak.common.model.user.IdentityUser)

Example 95 with IdentityUser

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

the class FlexSubscriptionController method getPublic.

@Override
public FlexSubscriptionResponse getPublic(String name) {
    IdentityUser identityUser = authenticatedUserService.getCbUser();
    FlexSubscription subscription = flexService.findByNameInAccount(name, identityUser.getUserId(), identityUser.getAccount());
    return toJsonConverter.convert(subscription);
}
Also used : IdentityUser(com.sequenceiq.cloudbreak.common.model.user.IdentityUser) FlexSubscription(com.sequenceiq.cloudbreak.domain.FlexSubscription)

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