Skip to content

Commit

Permalink
feat(technicalUser): adjust technical user filter (#1255)
Browse files Browse the repository at this point in the history
* adjust view `CompanyLinkedTechnicalUsers` to include `PROVIDER_OWNED` technical users
* adjust logic of `GET: /api/administration/serviceaccount/owncompany/serviceaccounts` to filter out technical users of type 'PROVIDER_OWNED'

---------

Refs: #1211
Co-authored-by: Phil Schneider <[email protected]>
Reviewed-by: Phil Schneider <[email protected]>
  • Loading branch information
AnuragNagpure and Phil91 authored Jan 30, 2025
1 parent f4895b4 commit ea46301
Show file tree
Hide file tree
Showing 13 changed files with 10,433 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ public async Task<ServiceAccountDetails> UpdateOwnCompanyServiceAccountDetailsAs
page,
size,
15,
portalRepositories.GetInstance<ITechnicalUserRepository>().GetOwnTechnicalUsersUntracked(_identityData.CompanyId, clientId, isOwner, filterUserStatusIds));
portalRepositories.GetInstance<ITechnicalUserRepository>().GetOwnTechnicalUsers(_identityData.CompanyId, clientId, isOwner, filterUserStatusIds));
}

public async IAsyncEnumerable<UserRoleWithDescription> GetServiceAccountRolesAsync(string? languageShortName)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ TechnicalUser CreateTechnicalUser(Guid identityId,
Task<TechnicalUserWithRoleDataClientId?> GetTechnicalUserWithRoleDataClientIdAsync(Guid technicalUserId, Guid userCompanyId);
Task<OwnTechnicalUserData?> GetOwnTechnicalUserWithIamUserRolesAsync(Guid technicalUserId, Guid companyId, IEnumerable<ProcessStepTypeId> processStepsToFilter);
Task<TechnicalUserDetailedData?> GetOwnTechnicalUserDataUntrackedAsync(Guid technicalUserId, Guid companyId);
Func<int, int, Task<Pagination.Source<CompanyServiceAccountData>?>> GetOwnTechnicalUsersUntracked(Guid userCompanyId, string? clientId, bool? isOwner, IEnumerable<UserStatusId> userStatusIds);
Func<int, int, Task<Pagination.Source<CompanyServiceAccountData>?>> GetOwnTechnicalUsers(Guid userCompanyId, string? clientId, bool? isOwner, IEnumerable<UserStatusId> userStatusIds);
Task<bool> CheckActiveServiceAccountExistsForCompanyAsync(Guid technicalUserId, Guid companyId);
Task<(Guid IdentityId, Guid CompanyId)> GetTechnicalUserDataByClientId(string clientId);
void CreateExternalTechnicalUser(Guid technicalUserId, string authenticationServiceUrl, byte[] secret, byte[] initializationVector, int encryptionMode);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ public void AttachAndModifyTechnicalUser(
x.ExternalTechnicalUser.EncryptionMode)))
.SingleOrDefaultAsync();

public Func<int, int, Task<Pagination.Source<CompanyServiceAccountData>?>> GetOwnTechnicalUsersUntracked(Guid userCompanyId, string? clientId, bool? isOwner, IEnumerable<UserStatusId> userStatusIds) =>
public Func<int, int, Task<Pagination.Source<CompanyServiceAccountData>?>> GetOwnTechnicalUsers(Guid userCompanyId, string? clientId, bool? isOwner, IEnumerable<UserStatusId> userStatusIds) =>
(skip, take) => Pagination.CreateSourceQueryAsync(
skip,
take,
Expand Down
Loading

0 comments on commit ea46301

Please sign in to comment.