Search in sources :

Example 1 with RoleAssignment

use of com.microsoft.azure.management.graphrbac.RoleAssignment in project cloudbreak by hortonworks.

the class AzureClient method checkIdentityRoleAssignement.

public boolean checkIdentityRoleAssignement(String identityId, String scopeId) {
    Identity identity = getIdentityById(identityId);
    PagedList<RoleAssignment> roleAssignments = listRoleAssignmentsByScope(scopeId);
    return roleAssignments.stream().anyMatch(roleAssignment -> roleAssignment.principalId() != null && roleAssignment.principalId().equalsIgnoreCase(identity.principalId()));
}
Also used : RoleAssignment(com.microsoft.azure.management.graphrbac.RoleAssignment) EncryptionSetIdentity(com.microsoft.azure.management.compute.EncryptionSetIdentity) Identity(com.microsoft.azure.management.msi.Identity)

Aggregations

EncryptionSetIdentity (com.microsoft.azure.management.compute.EncryptionSetIdentity)1 RoleAssignment (com.microsoft.azure.management.graphrbac.RoleAssignment)1 Identity (com.microsoft.azure.management.msi.Identity)1