-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add support for access packages in policy editor (#13921)
- Loading branch information
Showing
69 changed files
with
1,789 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#nullable enable | ||
|
||
namespace PolicyAdmin.Models | ||
{ | ||
public class AccessPackageArea | ||
{ | ||
public required string Id { get; set; } | ||
|
||
public required string Urn { get; set; } | ||
|
||
public required string Name { get; set; } | ||
|
||
public string? Description { get; set; } | ||
|
||
public string? Icon { get; set; } | ||
|
||
public string? AreaGroup { get; set; } | ||
|
||
public IEnumerable<AccessPackageOption> Packages { get; set; } = []; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
namespace PolicyAdmin.Models | ||
{ | ||
public class AccessPackageAreaGroup | ||
{ | ||
public required string Id { get; set; } | ||
|
||
public required string Urn { get; set; } | ||
|
||
public required string Name { get; set; } | ||
|
||
public string? Description { get; set; } | ||
|
||
public string? Type { get; set; } | ||
|
||
public IEnumerable<AccessPackageArea> Areas { get; set; } = []; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
namespace PolicyAdmin.Models | ||
{ | ||
public class AccessPackageOption | ||
{ | ||
public required string Id { get; set; } | ||
|
||
public required string Urn { get; set; } | ||
|
||
public required string Name { get; set; } | ||
|
||
public string? Description { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
using System.Collections.Generic; | ||
|
||
namespace Altinn.Studio.Designer.Models | ||
{ | ||
public class AccessPackageService | ||
{ | ||
public string Identifier { get; set; } | ||
|
||
public Dictionary<string, string> Title { get; set; } | ||
|
||
public CompetentAuthority HasCompetentAuthority { get; set; } | ||
|
||
public string LogoUrl { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
using System.ComponentModel.DataAnnotations; | ||
|
||
namespace Altinn.Studio.Designer.Models | ||
{ | ||
/// <summary> | ||
/// This model describes a pair of AttributeId and AttributeValue for use in matching in XACML policies, for instance a resource, a user, a party or an action. | ||
/// </summary> | ||
public class AttributeMatchV2 | ||
{ | ||
/// <summary> | ||
/// Gets or sets the attribute id for the match | ||
/// </summary> | ||
[Required] | ||
public required string Type { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the attribute value for the match | ||
/// </summary> | ||
[Required] | ||
public required string Value { get; set; } | ||
|
||
/// <summary> | ||
/// The urn for the attribute | ||
/// </summary> | ||
[Required] | ||
public required string Urn { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
using System.Collections.Generic; | ||
|
||
namespace Altinn.Studio.Designer.Models.Dto | ||
{ | ||
public class SubjectResourcesDto | ||
{ | ||
public List<SubjectResources> Data { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#nullable enable | ||
using System.Collections.Generic; | ||
|
||
namespace Altinn.Studio.Designer.Models | ||
{ | ||
/// <summary> | ||
/// Defines resources that a given subject have access to | ||
/// </summary> | ||
public class SubjectResources | ||
{ | ||
/// <summary> | ||
/// The subject | ||
/// </summary> | ||
public required AttributeMatchV2 Subject { get; set; } | ||
|
||
/// <summary> | ||
/// List of resources that the given subject has access to | ||
/// </summary> | ||
public required List<AttributeMatchV2> Resources { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.