Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Azure Blob Storage, Azure File Share and SharePoint Online Connector Apps #23225

Open
wants to merge 40 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 33 commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
7584061
Initial commit
IceOnly May 3, 2023
6ecfacc
Add File Browser
IceOnly May 4, 2023
25bc19c
Add File System Codeunit
IceOnly May 5, 2023
959f05e
Add documentation and small changes
IceOnly May 5, 2023
4bb4080
Fix up action
IceOnly May 5, 2023
4acb5f1
Remove all indataset
IceOnly Oct 6, 2023
74c5ece
Store Assisted Setup Image in a locked label
IceOnly Oct 6, 2023
f7af2e7
Add review changes
IceOnly Oct 6, 2023
c4cd06b
Add pagination support
IceOnly Oct 6, 2023
24725be
Rename Module
IceOnly Oct 6, 2023
763a7a0
Add directory support to Storage Blob Implementation
IceOnly Oct 6, 2023
e67351e
Use actionref in Account Browser
IceOnly Oct 6, 2023
ac6c08e
Add permissions
IceOnly Oct 6, 2023
4d88e2c
Add permission sets
IceOnly Oct 6, 2023
c5fc386
Fix application area
IceOnly Oct 6, 2023
248542b
Add namespace and disclaimer to all files
IceOnly Oct 9, 2023
3a5573f
Merge branch 'main' of https://github.com/microsoft/ALAppExtensions i…
IceOnly Oct 9, 2023
06d382a
Fix version
IceOnly Oct 9, 2023
32793d8
Remove system apps
IceOnly Feb 29, 2024
d256d81
Remove app.json
IceOnly Feb 29, 2024
5965d1b
Update app.json
IceOnly Feb 29, 2024
4bda136
Fix app.json
IceOnly Feb 29, 2024
7c10d31
Update to BC24
IceOnly Feb 29, 2024
a02efa8
Rename app
IceOnly Feb 29, 2024
1008fbd
Add file share connector
IceOnly Feb 29, 2024
474d088
Add both auth types
IceOnly Mar 1, 2024
bfca361
Apply interface changes
IceOnly Mar 1, 2024
d399759
Fix auth case type
IceOnly Mar 1, 2024
b82e490
Fix File Exists
IceOnly Mar 1, 2024
5864984
Add SharePoint Connector
IceOnly Mar 1, 2024
3b82bc0
Fix sharepoint connector
IceOnly Mar 1, 2024
e6e5ec9
Add review suggestions
IceOnly Mar 3, 2024
56d5525
Remove nondebuggable from SecretText Get And Set procedures
IceOnly Mar 5, 2024
7a31007
Remove old analyse variables
IceOnly Apr 10, 2024
64c59a4
Update application and platform versions to 25.0.0.0; modify SetReady…
IceOnly Dec 15, 2024
192a487
Refactor InitOptionalParameters to remove unused Path parameter
IceOnly Dec 15, 2024
579b36a
Update application and platform versions to 25.0.0.0; modify BlobStor…
IceOnly Dec 15, 2024
1c8430f
Update application and platform versions to 25.0.0.0 in app.json
IceOnly Dec 15, 2024
2704e74
Refactor namespaces from System.FileSystem to System.ExternalFileStor…
IceOnly Dec 17, 2024
abdb1e3
Refactor ListFiles, ListDirectories, GetAccounts, RegisterAccount, an…
IceOnly Dec 19, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
31 changes: 31 additions & 0 deletions Apps/W1/File - Azure Blob Service Connector/app/app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"id": "c9ce86fe-cb70-4b79-be03-d21856b1a4ca",
"name": "File - Azure Blob Service Connector",
"publisher": "Microsoft",
"brief": "Enable all users to use a Azure Blob Storage to save files from Business Central.",
"description": "This app enables all users to store files in the smae azure blob storage in Business Central.",
"version": "25.0.0.0",
"privacyStatement": "https://go.microsoft.com/fwlink/?linkid=724009",
"EULA": "https://go.microsoft.com/fwlink/?linkid=2009120",
"help": "https://go.microsoft.com/fwlink/?linkid=2134520",
"url": "https://go.microsoft.com/fwlink/?linkid=724011",
"logo": "ExtensionLogo.png",
"application": "24.0.0.0",
"internalsVisibleTo": [],
"dependencies": [],
"screenshots": [],
"platform": "24.0.0.0",
"idRanges": [
{
"from": 80100,
"to": 80199
}
],
"target": "OnPrem",
"resourceExposurePolicy": {
"allowDebugging": false,
"allowDownloadingSource": true,
"includeSourceInSymbolFile": true
},
"contextSensitiveHelpUrl": "https://go.microsoft.com/fwlink/?linkid=2134520"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// ------------------------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// ------------------------------------------------------------------------------------------------

namespace System.FileSystem;

permissionset 80102 "Blob Stor. - Edit"
{
Assignable = false;
Access = Public;
Caption = 'Blob Storage - Edit';

IncludedPermissionSets = "Blob Stor. - Read";

Permissions =
tabledata "Blob Storage Account" = imd;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// ------------------------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// ------------------------------------------------------------------------------------------------

namespace System.FileSystem;

permissionset 80100 "Blob Stor. - Objects"
{
Assignable = false;
Access = Public;
Caption = 'Blob Storage - Objects';

Permissions =
table "Blob Storage Account" = X,
codeunit "Blob Storage Connector Impl." = X,
page "Blob Storage Account Wizard" = X,
page "Blob Storage Container Lookup" = X,
page "Blob Storage Account" = X;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// ------------------------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// ------------------------------------------------------------------------------------------------

namespace System.FileSystem;

permissionset 80101 "Blob Stor. - Read"
{
Assignable = false;
Access = Public;
Caption = 'Blob Storage - Read';

IncludedPermissionSets = "Blob Stor. - Objects";

Permissions =
tabledata "Blob Storage Account" = r;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// ------------------------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// ------------------------------------------------------------------------------------------------

namespace System.FileSystem;

permissionsetextension 80100 "File System - Admin - Blob Stor." extends "File System - Admin"
{
IncludedPermissionSets = "Blob Stor. - Edit";
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
// ------------------------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// ------------------------------------------------------------------------------------------------

namespace System.FileSystem;

/// <summary>
/// Displays an account that was registered via the Blob Storage connector.
/// </summary>
page 80100 "Blob Storage Account"
{
SourceTable = "Blob Storage Account";
Caption = 'Azure Blob Storage Account';
Permissions = tabledata "Blob Storage Account" = rimd;
PageType = Card;
Extensible = false;
InsertAllowed = false;
DataCaptionExpression = Rec.Name;

layout
{
area(Content)
{
field(NameField; Rec.Name)
{
ApplicationArea = All;
Caption = 'Account Name';
ToolTip = 'Specifies the name of the Storage account connection.';
ShowMandatory = true;
NotBlank = true;
}

field(StorageAccountNameField; Rec."Storage Account Name")
{
ApplicationArea = All;
Caption = 'Storage Account Name';
ToolTip = 'Specifies the Azure Storage name.';
}

field("Authorization Type"; Rec."Authorization Type")
{
ApplicationArea = All;
ToolTip = 'The way of authorizing used to access the Blob Storage.';
}

field(SecretField; Secret)
{
ApplicationArea = All;
Caption = 'Password';
Editable = SecretEditable;
ExtendedDatatype = Masked;
ToolTip = 'Specifies the Shared access signature Token or SharedKey.';

trigger OnValidate()
begin
Rec.SetSecret(Secret);
end;
}

field(ContainerNameField; Rec."Container Name")
{
ApplicationArea = All;
Caption = 'Container Name';
ToolTip = 'Specifies the Azure Storage Container name.';

trigger OnLookup(var Text: Text): Boolean
var
BlobStorageConnectorImpl: Codeunit "Blob Storage Connector Impl.";
begin
CurrPage.Update();
BlobStorageConnectorImpl.LookUpContainer(Rec, Rec."Authorization Type", Rec.GetSecret(Rec."Secret Key"), Text);
exit(true);
end;
}
}
}

var
SecretEditable: Boolean;
[NonDebuggable]
Secret: Text;

trigger OnOpenPage()
begin
Rec.SetCurrentKey(Name);

if not IsNullGuid(Rec."Secret Key") then
Secret := '***';
end;

trigger OnAfterGetCurrRecord()
begin
SecretEditable := CurrPage.Editable();
end;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
// ------------------------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// ------------------------------------------------------------------------------------------------

namespace System.FileSystem;

/// <summary>
/// Holds the information for all file accounts that are registered via the Blob Storage connector
/// </summary>
table 80100 "Blob Storage Account"
{
Access = Internal;

Caption = 'Azure Blob Storage Account';

fields
{
field(1; "Id"; Guid)
{
DataClassification = SystemMetadata;
Caption = 'Primary Key';
}

field(2; Name; Text[250])
{
DataClassification = CustomerContent;
Caption = 'Name of account';
}
field(3; "Storage Account Name"; Text[2048])
{
Caption = 'Storage Account Name';
}
field(4; "Container Name"; Text[2048])
{
Caption = 'Container Name';
}
field(7; "Authorization Type"; Enum "Blob Storage Auth. Type")
{
Caption = 'Authorization Type';
}
field(8; "Secret Key"; Guid)
{
DataClassification = SystemMetadata;
}
}

keys
{
key(PK; Id)
{
Clustered = true;
}
}

var
UnableToGetSecretMsg: Label 'Unable to get Blob Storage secret.';
UnableToSetSecretMsg: Label 'Unable to set Blob Storage secret.';

trigger OnDelete()
begin
if not IsNullGuid(Rec."Secret Key") then
if IsolatedStorage.Delete(Rec."Secret Key") then;
end;

procedure SetSecret(Secret: Text)
begin
if IsNullGuid(Rec."Secret Key") then
Rec."Secret Key" := CreateGuid();

if not IsolatedStorage.Set(Format(Rec."Secret Key"), Secret, DataScope::Company) then
Error(UnableToSetSecretMsg);
end;

procedure GetSecret(SecretKey: Guid) Secret: SecretText
begin
if not IsolatedStorage.Get(Format(SecretKey), DataScope::Company, Secret) then
Error(UnableToGetSecretMsg);
end;
}
Loading
Loading