Files: added thirdparty rooms connection
This commit is contained in:
parent
664e718fa0
commit
03eaaf4b19
@ -33,6 +33,7 @@ public class ThirdPartyRequestDto
|
||||
public string Password { get; set; }
|
||||
public string Token { get; set; }
|
||||
public bool IsCorporate { get; set; }
|
||||
public bool IsRoomsStorage { get; set; }
|
||||
public string CustomerTitle { get; set; }
|
||||
public string ProviderKey { get; set; }
|
||||
public string ProviderId { get; set; }
|
||||
|
@ -1369,12 +1369,17 @@ public class FileStorageService<T> //: IFileStorageService
|
||||
var folderDao = GetFolderDao();
|
||||
|
||||
ErrorIf(thirdPartyParams == null, FilesCommonResource.ErrorMassage_BadRequest);
|
||||
var parentFolder = await folderDaoInt.GetFolderAsync(thirdPartyParams.Corporate && !_coreBaseSettings.Personal ? await _globalFolderHelper.FolderCommonAsync : _globalFolderHelper.FolderMy);
|
||||
|
||||
var folderId = thirdPartyParams.Corporate && !_coreBaseSettings.Personal ? await _globalFolderHelper.FolderCommonAsync
|
||||
: thirdPartyParams.RoomsStorage && !_coreBaseSettings.DisableDocSpace ? await _globalFolderHelper.FolderVirtualRoomsAsync : _globalFolderHelper.FolderMy;
|
||||
|
||||
var parentFolder = await folderDaoInt.GetFolderAsync(folderId);
|
||||
|
||||
ErrorIf(!await _fileSecurity.CanCreateAsync(parentFolder), FilesCommonResource.ErrorMassage_SecurityException_Create);
|
||||
ErrorIf(!_filesSettingsHelper.EnableThirdParty, FilesCommonResource.ErrorMassage_SecurityException_Create);
|
||||
|
||||
var lostFolderType = FolderType.USER;
|
||||
var folderType = thirdPartyParams.Corporate ? FolderType.COMMON : FolderType.USER;
|
||||
var folderType = thirdPartyParams.Corporate ? FolderType.COMMON : thirdPartyParams.RoomsStorage ? FolderType.VirtualRooms : FolderType.USER;
|
||||
|
||||
int curProviderId;
|
||||
|
||||
|
@ -32,6 +32,7 @@ public class ThirdPartyParams
|
||||
public AuthData AuthData { get; set; }
|
||||
|
||||
public bool Corporate { get; set; }
|
||||
public bool RoomsStorage { get; set; }
|
||||
|
||||
[JsonPropertyName("customer_title")]
|
||||
public string CustomerTitle { get; set; }
|
||||
|
@ -281,7 +281,8 @@ public class ThirdpartyController : ApiControllerBase
|
||||
var thirdPartyParams = new ThirdPartyParams
|
||||
{
|
||||
AuthData = new AuthData(inDto.Url, inDto.Login, inDto.Password, inDto.Token),
|
||||
Corporate = inDto.IsCorporate,
|
||||
Corporate = inDto.IsRoomsStorage ? false : inDto.IsCorporate,
|
||||
RoomsStorage = inDto.IsCorporate ? false : inDto.IsRoomsStorage,
|
||||
CustomerTitle = inDto.CustomerTitle,
|
||||
ProviderId = inDto.ProviderId,
|
||||
ProviderKey = inDto.ProviderKey,
|
||||
|
Loading…
Reference in New Issue
Block a user