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