Thirdparty: Fix Token can't be null on WebDav (login/password issue)
This commit is contained in:
parent
ca819a930c
commit
56997c5cb8
@ -1225,7 +1225,7 @@ namespace ASC.Web.Files.Services.WCFService
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw GenerateException(e);
|
||||
throw GenerateException(e.InnerException ?? e);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -367,7 +367,9 @@ namespace ASC.Files.Thirdparty
|
||||
{
|
||||
Id = id,
|
||||
Title = customerTitle,
|
||||
Token = EncryptPassword(authData.Token),
|
||||
Token = EncryptPassword(authData.Token),
|
||||
Url = authData.Url,
|
||||
UserName = authData.Login,
|
||||
Password = EncryptPassword(authData.Password),
|
||||
UserId = owner,
|
||||
FolderType = type,
|
||||
@ -390,10 +392,11 @@ namespace ASC.Files.Thirdparty
|
||||
var createOn = TenantUtil.DateTimeFromUtc(input.CreateOn);
|
||||
var authData = new AuthData(input.Url, input.UserName, DecryptPassword(input.Password), token);
|
||||
|
||||
if (string.IsNullOrEmpty(token)) throw new ArgumentException("Token can't be null");
|
||||
|
||||
if (key == ProviderTypes.Box)
|
||||
{
|
||||
{
|
||||
if (string.IsNullOrEmpty(token))
|
||||
throw new ArgumentException("Token can't be null");
|
||||
|
||||
var box = ServiceProvider.GetService<BoxProviderInfo>();
|
||||
box.ID = id;
|
||||
box.CustomerTitle = providerTitle;
|
||||
@ -406,7 +409,10 @@ namespace ASC.Files.Thirdparty
|
||||
}
|
||||
|
||||
if (key == ProviderTypes.DropboxV2)
|
||||
{
|
||||
{
|
||||
if (string.IsNullOrEmpty(token))
|
||||
throw new ArgumentException("Token can't be null");
|
||||
|
||||
var drop = ServiceProvider.GetService<DropboxProviderInfo>();
|
||||
drop.ID = id;
|
||||
drop.CustomerTitle = providerTitle;
|
||||
@ -436,7 +442,10 @@ namespace ASC.Files.Thirdparty
|
||||
}
|
||||
|
||||
if (key == ProviderTypes.GoogleDrive)
|
||||
{
|
||||
{
|
||||
if (string.IsNullOrEmpty(token))
|
||||
throw new ArgumentException("Token can't be null");
|
||||
|
||||
var gd = ServiceProvider.GetService<GoogleDriveProviderInfo>();
|
||||
gd.ID = id;
|
||||
gd.CustomerTitle = providerTitle;
|
||||
@ -450,7 +459,10 @@ namespace ASC.Files.Thirdparty
|
||||
}
|
||||
|
||||
if (key == ProviderTypes.OneDrive)
|
||||
{
|
||||
{
|
||||
if (string.IsNullOrEmpty(token))
|
||||
throw new ArgumentException("Token can't be null");
|
||||
|
||||
var od = ServiceProvider.GetService<OneDriveProviderInfo>();
|
||||
od.ID = id;
|
||||
od.CustomerTitle = providerTitle;
|
||||
|
Loading…
Reference in New Issue
Block a user