-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Can delete access package delegation from info modal (#1184)
* created new revoke endpoint * delete on button click and remember opened areas * fixed bug with modal closing on delete * bff tests * change tag name * Update backend/src/Altinn.AccessManagement.UI/Altinn.AccessManagement.UI.Core/Services/Interfaces/IAccessPackageService.cs Co-authored-by: Sondre Wittek <[email protected]> * fixed mix in parameters --------- Co-authored-by: Vedeler <[email protected]> Co-authored-by: Sondre Wittek <[email protected]>
- Loading branch information
1 parent
0bf7310
commit e345a9d
Showing
27 changed files
with
789 additions
and
566 deletions.
There are no files selected for viewing
351 changes: 180 additions & 171 deletions
351
...Management.UI/Altinn.AccessManagement.UI.Core/ClientInterfaces/IAccessManagementClient.cs
Large diffs are not rendered by default.
Oops, something went wrong.
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
67 changes: 38 additions & 29 deletions
67
...anagement.UI/Altinn.AccessManagement.UI.Core/Services/Interfaces/IAccessPackageService.cs
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 |
---|---|---|
@@ -1,38 +1,47 @@ | ||
using Altinn.AccessManagement.UI.Core.Models; | ||
using Altinn.AccessManagement.UI.Core.Models.AccessPackage; | ||
using Altinn.AccessManagement.UI.Core.Models.AccessPackage.Frontend; | ||
|
||
namespace Altinn.AccessManagement.UI.Core.Services.Interfaces | ||
{ | ||
/// <summary> | ||
/// Servoice for access package logic | ||
/// </summary> | ||
public interface IAccessPackageService | ||
{ | ||
/// <summary> | ||
/// Performs a search for access packages based on the provided parameters and sorts them into a list of areas for frontend to display | ||
/// Servoice for access package logic | ||
/// </summary> | ||
/// <param name="languageCode">languageCode.</param> | ||
/// <param name="searchString">searchString.</param> | ||
/// <returns>the resources that match the filters and search string corresponding to the provided page.</returns> | ||
Task<List<AccessAreaFE>> GetSearch(string languageCode, string searchString); | ||
public interface IAccessPackageService | ||
{ | ||
/// <summary> | ||
/// Performs a search for access packages based on the provided parameters and sorts them into a list of areas for frontend to display | ||
/// </summary> | ||
/// <param name="languageCode">languageCode.</param> | ||
/// <param name="searchString">searchString.</param> | ||
/// <returns>the resources that match the filters and search string corresponding to the provided page.</returns> | ||
Task<List<AccessAreaFE>> GetSearch(string languageCode, string searchString); | ||
|
||
/// <summary> | ||
/// Gets all access package delegations a specified right holder has on behalf of a specified party | ||
/// </summary> | ||
/// <param name="rightHolderUuid">the uuid of one who has received the delegated access</param> | ||
/// <param name="rightOwnerUuid">The uuid of the party whose rights have been delegated to the right holder</param> | ||
/// <param name="languageCode">The code of the language on which texts are to be returned</param> | ||
/// <returns>A dictionary of lists (sorted by access area) containing all access package delegations that the right holder has on behalf of the specified right owner</returns> | ||
Task<Dictionary<string, List<AccessPackageDelegation>>> GetDelegationsToRightHolder(Guid rightHolderUuid, Guid rightOwnerUuid, string languageCode); | ||
/// <summary> | ||
/// Gets all access package delegations a specified right holder has on behalf of a specified party | ||
/// </summary> | ||
/// <param name="rightHolderUuid">the uuid of one who has received the delegated access</param> | ||
/// <param name="rightOwnerUuid">The uuid of the party whose rights have been delegated to the right holder</param> | ||
/// <param name="languageCode">The code of the language on which texts are to be returned</param> | ||
/// <returns>A dictionary of lists (sorted by access area) containing all access package delegations that the right holder has on behalf of the specified right owner</returns> | ||
Task<Dictionary<string, List<AccessPackageDelegation>>> GetDelegationsToRightHolder(Guid rightHolderUuid, Guid rightOwnerUuid, string languageCode); | ||
|
||
/// <summary> | ||
/// Creates a new delegation of an access package | ||
/// </summary> | ||
/// <param name="party">Identifies the selected party the authenticated user is acting on behalf of.</param> | ||
/// <param name="to">The id of the right holder that will recieve the delegation</param> | ||
/// <param name="packageId">The id of the package to be delegated</param> | ||
/// <param name="languageCode">The code of the language on which texts are to be returned</param> | ||
/// <returns></returns> | ||
Task<HttpResponseMessage> CreateDelegation(string party, Guid to, string packageId, string languageCode); | ||
} | ||
/// <summary> | ||
/// Revokes access to a given package for a right holder (to) on behalf of a party (from) | ||
/// </summary> | ||
/// <param name="from">The party which has granted access to the package to the right holder</param> | ||
/// <param name="to">The right holder which currently has access to the access package</param> | ||
/// <param name="packageId">The access package which the right holder is to lose access to on behalf of the given party (from)</param> | ||
/// <returns>A HttpResponseMessage denoting whether or not the action was successfull.</returns> | ||
Task<HttpResponseMessage> RevokeAccessPackage(Guid from, Guid to, string packageId); | ||
|
||
/// <summary> | ||
/// Creates a new delegation of an access package | ||
/// </summary> | ||
/// <param name="party">Identifies the selected party the authenticated user is acting on behalf of.</param> | ||
/// <param name="to">The id of the right holder that will recieve the delegation</param> | ||
/// <param name="packageId">The id of the package to be delegated</param> | ||
/// <param name="languageCode">The code of the language on which texts are to be returned</param> | ||
/// <returns></returns> | ||
Task<HttpResponseMessage> CreateDelegation(string party, Guid to, string packageId, string languageCode); | ||
} | ||
} |
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
68 changes: 34 additions & 34 deletions
68
...ment.UI.Mocks/Data/AccessPackage/GetDelegations/5c0656db-cf51-43a4-bd64-6a91c8caacfb.json
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
4 changes: 4 additions & 0 deletions
4
...UI/Altinn.AccessManagement.UI.Mocks/Data/AccessPackage/RevokeDelegation/annleggadmin.json
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,4 @@ | ||
{ | ||
"packageId": "annleggadmin", | ||
"success": true | ||
} |
4 changes: 4 additions & 0 deletions
4
...UI/Altinn.AccessManagement.UI.Mocks/Data/AccessPackage/RevokeDelegation/eiendom_kjop.json
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,4 @@ | ||
{ | ||
"packageId": "annleggadmin", | ||
"success": true | ||
} |
Oops, something went wrong.