Skip to content

Commit

Permalink
docs: adjust delete technical user documentation (#399)
Browse files Browse the repository at this point in the history
Refs: eclipse-tractusx/portal-backend#986
Reviewed-By: Norbert Truchsess <norbert.truchsess@t-online.de>
  • Loading branch information
Phil91 authored Sep 17, 2024
1 parent 6118718 commit ca3bcaa
Showing 1 changed file with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,23 @@ To delete an user, just open up the user details and click the "delete" button.

update technical user secret

### Delete Service Account
### Delete Technical User

Delete an existing service account
Only service accounts of the own company can get deleted.
Delete an existing technical user
Only technical users of the own company can get deleted.
Permission: "delete_tech_user_management"

As part of the deletion API, the following tasks get executed:

```mermaid
flowchart TD
A(API delete call) -->|Pass the service account id| B["`Receive service account
A(API delete call) -->|Pass the technical user id| B["`Receive technical user
for company`"]
B --> C{Service account exists is active and user has access}
C --> |true| D{"`Linked to active/pending connector`"}
C --> |false| E("Error 404 - serviceAccount {serviceAccountId} not found for company {companyId}")
B --> C{Check technical user}
C --> |existing & active| D{"`Linked to active/pending connector`"}
C --> |not existing| E("Error 404 - serviceAccount {serviceAccountId} does not exist")
C --> |technical user not active| P("Error 409 - technical user {serviceAccountId} is not status active")
C --> |technical user owned by other company| Q("Error 403 - Only provider or owner of the technical user are allowed to delete it")
D --> |false| F{"`Linked to active
offer subscription`"}
D --> |true| G("`Error 409 - Technical User is linked to an active connector. Change the link or deactivate the connector to delete the technical user.`")
Expand All @@ -48,7 +50,7 @@ Endpoint can be called via:

Validation:

- only owned or managed service account that are active can get deleted
- only owned or managed technical user that are active can get deleted
- the deletion is not possible if the user is linked to an `active` offer subscription or an connector in state `active` or `pending`

> **_NOTE:_** Technical user owner as well as provider (managed tech user owner) can run the delete endpoint.
Expand Down

0 comments on commit ca3bcaa

Please sign in to comment.