Skip to content

Commit 0481a5e

Browse files
authored
VCST-596: Extend SettingDescriptor with IsPublic property. (#2771)
feat: Extends SettingDescriptor with IsPublic property. The flag indicates that this setting is accessible for client applications via XAPI. By default, false.
1 parent 4052581 commit 0481a5e

File tree

5 files changed

+42
-39
lines changed

5 files changed

+42
-39
lines changed

src/VirtoCommerce.Platform.Core/Settings/ObjectSettingEntry.cs

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ public ObjectSettingEntry(SettingDescriptor descriptor)
2222
IsDictionary = descriptor.IsDictionary;
2323
IsLocalizable = descriptor.IsLocalizable;
2424
IsHidden = descriptor.IsHidden;
25+
IsPublic = descriptor.IsPublic;
2526
}
2627
public bool ItHasValues => Value != null || !AllowedValues.IsNullOrEmpty();
2728
/// <summary>

src/VirtoCommerce.Platform.Core/Settings/SettingDescriptor.cs

+5
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ public class SettingDescriptor : ValueObject, IEntity
3838
/// </summary>
3939
public bool IsHidden { get; set; }
4040

41+
/// <summary>
42+
/// Flag indicates that this settings is accessible for client application via XAPI. By default, false.
43+
/// </summary>
44+
public bool IsPublic { get; set; }
45+
4146
public SettingValueType ValueType { get; set; }
4247
public object[] AllowedValues { get; set; }
4348
public object DefaultValue { get; set; }
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
1-
# Entity Framework Core Commands
2-
```
3-
dotnet tool install --global dotnet-ef --version 6.0.13
4-
```
1+
# Generate Migrations
52

6-
## Generate PlatformDbContext Migrations
7-
```
8-
dotnet ef migrations add Update1 --context PlatformDbContext --output-dir Migrations/Data
3+
## Install CLI tools for Entity Framework Core
4+
```cmd
5+
dotnet tool install --global dotnet-ef --version 8.0.0
96
```
107

11-
## Generate SecurityDbContext Migrations
12-
```
13-
dotnet ef migrations add Update2 --context SecurityDbContext --output-dir Migrations/Security
8+
or update
9+
10+
```cmd
11+
dotnet tool update --global dotnet-ef --version 8.0.0
1412
```
1513

16-
## Apply Migrations**
14+
## Add Migration
15+
Select Data.<Provider> folder and run following command for each provider:
1716

18-
```
19-
dotnet ef database update
17+
```cmd
18+
dotnet ef migrations add <migration-name>
2019
```
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
1-
# Entity Framework Core Commands
2-
```
3-
dotnet tool install --global dotnet-ef --version 6.0.13
4-
```
1+
# Generate Migrations
52

6-
## Generate PlatformDbContext Migrations
7-
```
8-
dotnet ef migrations add Update1 --context PlatformDbContext --output-dir Migrations/Data
3+
## Install CLI tools for Entity Framework Core
4+
```cmd
5+
dotnet tool install --global dotnet-ef --version 8.0.0
96
```
107

11-
## Generate SecurityDbContext Migrations
12-
```
13-
dotnet ef migrations add Update2 --context SecurityDbContext --output-dir Migrations/Security
8+
or update
9+
10+
```cmd
11+
dotnet tool update --global dotnet-ef --version 8.0.0
1412
```
1513

16-
## Apply Migrations**
14+
## Add Migration
15+
Select Data.<Provider> folder and run following command for each provider:
1716

18-
```
19-
dotnet ef database update
17+
```cmd
18+
dotnet ef migrations add <migration-name>
2019
```
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
1-
# Entity Framework Core Commands
2-
```
3-
dotnet tool install --global dotnet-ef --version 6.0.13
4-
```
1+
# Generate Migrations
52

6-
## Generate PlatformDbContext Migrations
7-
```
8-
dotnet ef migrations add Update1 --context PlatformDbContext --output-dir Migrations/Data
3+
## Install CLI tools for Entity Framework Core
4+
```cmd
5+
dotnet tool install --global dotnet-ef --version 8.0.0
96
```
107

11-
## Generate SecurityDbContext Migrations
12-
```
13-
dotnet ef migrations add Update2 --context SecurityDbContext --output-dir Migrations/Security
8+
or update
9+
10+
```cmd
11+
dotnet tool update --global dotnet-ef --version 8.0.0
1412
```
1513

16-
## Apply Migrations**
14+
## Add Migration
15+
Select Data.<Provider> folder and run following command for each provider:
1716

18-
```
19-
dotnet ef database update
17+
```cmd
18+
dotnet ef migrations add <migration-name>
2019
```

0 commit comments

Comments
 (0)