private async Task CreateUser(IDestination destination, UserDestinationModel userDestination) { List <string> existingUserGroups = await destination.ReadGroups(); userDestination.Groups = GetComparedUserGroups(existingUserGroups, userDestination.Groups).ToArray(); await destination.Save(userDestination); _logger.LogInformation($"{destination.GetType().Name}: User with name of '{userDestination.FullName}' was created"); }
private async Task DeleteUser(IDestination destination, UserDestinationModel userDestination, string[] args) { if (args.Contains("--force")) { await destination.Delete(userDestination); _logger.LogInformation($"{destination.GetType().Name}: User with name of '{userDestination.FullName}' was deleted"); } else { _logger.LogWarning($"The user to be deleted: {userDestination.Login}"); } }
public bool Equals(IDestination other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } if (other.GetType() != GetType()) { return(false); } return(StructuralCompare(other.As <Node>())); }
public bool Equals(IDestination other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } if (other.GetType() != GetType()) { return(false); } return(GetIdentity() == other.As <ILocalSocket <T> >() .GetIdentity()); }
private async Task UpdateUser(IDestination destination, UserDestinationModel userDestination) { await destination.Update(userDestination); _logger.LogInformation($"{destination.GetType().Name}: User with name of '{userDestination.FullName}' was updated"); }