Skip to content

Commit 063d954

Browse files
authored
v5.16.2 (#263)
- *Fixed:* `Operation.AuthEntity` and `Operation.AuthOperation` updated to code-gen the `Manager`-based authorization (`ExecutionContent.UserIsAuthorized`) invocation. - *Fixed:* Code-generation logging/auditing of endpoints updated to also include the authorization configuration. - *Fixed:* `CreateProperty` statement within generated entity updated to use the correct name for reference data properties.
1 parent 65af953 commit 063d954

60 files changed

Lines changed: 223 additions & 113 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
Represents the **NuGet** versions.
44

5+
## v5.16.2
6+
- *Fixed:* `Operation.AuthEntity` and `Operation.AuthOperation` updated to code-gen the `Manager`-based authorization (`ExecutionContent.UserIsAuthorized`) invocation.
7+
- *Fixed:* Code-generation logging/auditing of endpoints updated to also include the authorization configuration.
8+
- *Fixed:* `CreateProperty` statement within generated entity updated to use the correct name for reference data properties.
9+
510
## v5.16.1
611
- *Fixed:* Upgraded dependencies related to `System.Text.Json`; resolve [Microsoft Security Advisory CVE-2024-43485](https://github.com/advisories/GHSA-8g4q-xg66-9fp4).
712

Common.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project>
22
<PropertyGroup>
3-
<Version>5.16.1</Version>
3+
<Version>5.16.2</Version>
44
<LangVersion>preview</LangVersion>
55
<Authors>Avanade</Authors>
66
<Company>Avanade</Company>

docs/Entity-Entity-Config.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,9 @@ Provides the _Authorization_ configuration.
138138

139139
Property | Description
140140
-|-
141-
**`authRole`** | The role (permission) used by the `ExecutionContext.IsInRole(role)` for each `Operation`.<br/>&dagger; Used where not overridden specifically for an `Operation`; i.e. acts as the default.
141+
`authPermission` | The permission used by the `ExecutionContext.UserIsAuthorized(AuthPermission)` to determine whether the user is authorized.
142+
`authEntity` | The permission used by the `ExecutionContext.UserIsAuthorized(AuthEntity, AuthAction)` to determine whether the user is authorized.
143+
**`authRole`** | The role (permission) used by the `ExecutionContext.UserIsInRole(role)` for each `Operation`.<br/>&dagger; Used where not overridden specifically for an `Operation`; i.e. acts as the default.
142144

143145
<br/>
144146

docs/Entity-Operation-Config.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,10 @@ Provides the _Authorization_ configuration.
8484

8585
Property | Description
8686
-|-
87-
`authPermission` | The permission used by the `ExecutionContext.IsAuthorized(AuthPermission)` to determine whether the user is authorized.
88-
`authRole` | The permission used by the `ExecutionContext.IsInRole(AuthRole)` to determine whether the user is authorized.
87+
`authPermission` | The permission used by the `ExecutionContext.UserIsAuthorized(AuthPermission)` to determine whether the user is authorized.
88+
`authEntity` | The permission used by the `ExecutionContext.UserIsAuthorized(AuthEntity, AuthAction)` to determine whether the user is authorized. Defaults to `Entity.AuthEntity`. Both the `AuthEntity` and `AuthAction` are required for code-generation.
89+
`authAction` | The permission used by the `ExecutionContext.UserIsAuthorized(AuthEntity, AuthAction)` to determine whether the user is authorized. Both the `AuthEntity` and `AuthAction` are required for code-generation.
90+
`authRole` | The permission used by the `ExecutionContext.UserIsInRole(AuthRole)` to determine whether the user is authorized.
8991

9092
<br/>
9193

samples/Cdr.Banking/Cdr.Banking.Api/Cdr.Banking.Api.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
<ImplicitUsings>true</ImplicitUsings>
66
</PropertyGroup>
77
<ItemGroup>
8-
<PackageReference Include="CoreEx.AspNetCore" Version="3.27.0" />
9-
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerGen" Version="6.8.1" />
8+
<PackageReference Include="CoreEx.AspNetCore" Version="3.27.1" />
9+
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerGen" Version="6.9.0" />
1010
</ItemGroup>
1111
<ItemGroup>
1212
<ProjectReference Include="..\Cdr.Banking.Business\Cdr.Banking.Business.csproj" />

samples/Cdr.Banking/Cdr.Banking.Business/Cdr.Banking.Business.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
<Folder Include="DataSvc\" />
1313
</ItemGroup>
1414
<ItemGroup>
15-
<PackageReference Include="CoreEx.AspNetCore" Version="3.27.0" />
16-
<PackageReference Include="CoreEx.Cosmos" Version="3.27.0" />
17-
<PackageReference Include="CoreEx.Validation" Version="3.27.0" />
15+
<PackageReference Include="CoreEx.AspNetCore" Version="3.27.1" />
16+
<PackageReference Include="CoreEx.Cosmos" Version="3.27.1" />
17+
<PackageReference Include="CoreEx.Validation" Version="3.27.1" />
1818
</ItemGroup>
1919
</Project>

samples/Cdr.Banking/Cdr.Banking.Business/Entities/Generated/Account.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,10 @@ protected override IEnumerable<IPropertyValue> GetPropertyValues()
8888
yield return CreateProperty(nameof(CreationDate), CreationDate, v => CreationDate = v);
8989
yield return CreateProperty(nameof(DisplayName), DisplayName, v => DisplayName = v);
9090
yield return CreateProperty(nameof(Nickname), Nickname, v => Nickname = v);
91-
yield return CreateProperty(nameof(OpenStatusSid), OpenStatusSid, v => OpenStatusSid = v);
91+
yield return CreateProperty(nameof(OpenStatus), OpenStatusSid, v => OpenStatusSid = v);
9292
yield return CreateProperty(nameof(IsOwned), IsOwned, v => IsOwned = v);
9393
yield return CreateProperty(nameof(MaskedNumber), MaskedNumber, v => MaskedNumber = v);
94-
yield return CreateProperty(nameof(ProductCategorySid), ProductCategorySid, v => ProductCategorySid = v);
94+
yield return CreateProperty(nameof(ProductCategory), ProductCategorySid, v => ProductCategorySid = v);
9595
yield return CreateProperty(nameof(ProductName), ProductName, v => ProductName = v);
9696
}
9797
}

samples/Cdr.Banking/Cdr.Banking.Business/Entities/Generated/AccountArgs.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ public partial class AccountArgs : EntityBase
4848
/// <inheritdoc/>
4949
protected override IEnumerable<IPropertyValue> GetPropertyValues()
5050
{
51-
yield return CreateProperty(nameof(ProductCategorySid), ProductCategorySid, v => ProductCategorySid = v);
52-
yield return CreateProperty(nameof(OpenStatusSid), OpenStatusSid, v => OpenStatusSid = v);
51+
yield return CreateProperty(nameof(ProductCategory), ProductCategorySid, v => ProductCategorySid = v);
52+
yield return CreateProperty(nameof(OpenStatus), OpenStatusSid, v => OpenStatusSid = v);
5353
yield return CreateProperty(nameof(IsOwned), IsOwned, v => IsOwned = v);
5454
}
5555
}

samples/Cdr.Banking/Cdr.Banking.Business/Entities/Generated/AccountDetail.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ protected override IEnumerable<IPropertyValue> GetPropertyValues()
6363
yield return CreateProperty(nameof(Bsb), Bsb, v => Bsb = v);
6464
yield return CreateProperty(nameof(AccountNumber), AccountNumber, v => AccountNumber = v);
6565
yield return CreateProperty(nameof(BundleName), BundleName, v => BundleName = v);
66-
yield return CreateProperty(nameof(SpecificAccountUTypeSid), SpecificAccountUTypeSid, v => SpecificAccountUTypeSid = v);
66+
yield return CreateProperty(nameof(SpecificAccountUType), SpecificAccountUTypeSid, v => SpecificAccountUTypeSid = v);
6767
yield return CreateProperty(nameof(TermDeposit), TermDeposit, v => TermDeposit = v);
6868
yield return CreateProperty(nameof(CreditCard), CreditCard, v => CreditCard = v);
6969
}

samples/Cdr.Banking/Cdr.Banking.Business/Entities/Generated/TermDepositAccount.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,6 @@ protected override IEnumerable<IPropertyValue> GetPropertyValues()
5555
yield return CreateProperty(nameof(MaturityDate), MaturityDate, v => MaturityDate = v);
5656
yield return CreateProperty(nameof(MaturityAmount), MaturityAmount, v => MaturityAmount = v);
5757
yield return CreateProperty(nameof(MaturityCurrency), MaturityCurrency, v => MaturityCurrency = v);
58-
yield return CreateProperty(nameof(MaturityInstructionsSid), MaturityInstructionsSid, v => MaturityInstructionsSid = v);
58+
yield return CreateProperty(nameof(MaturityInstructions), MaturityInstructionsSid, v => MaturityInstructionsSid = v);
5959
}
6060
}

0 commit comments

Comments
 (0)