public async Task RemoveDefaultAsync(string objectName)
{
if (!this.SkipValidation)
{
if (!this.Validated)
{
await this.ValidateAsync(AccessTypeEnum.CreateFilter, this.LoginId, this.Database, false).ConfigureAwait(false);
}
if (!this.HasAccess)
{
Log.Information("Access to delete default filter for {ObjectName} was denied to the user with Login ID {LoginId}.", objectName, this.LoginId);
throw new UnauthorizedException("Access is denied.");
}
}
const string sql = "UPDATE config.filters SET is_default=false WHERE object_name=@0;";
await Factory.NonQueryAsync(this.Database, sql, objectName).ConfigureAwait(false);
}
}