Add non-deletable service user (#1311)

* Add non-deletable flag for service users

* fix non deletable service user created as deletable

* Exclude non deletable service users in service users api response

* Fix broken tests

* Add test for non deletable service user

* Add handling for non-deletable service users in tests

* Remove non-deletable service users when fetching all users

* Ensure non-deletable users are filtered out when fetching all user data
This commit is contained in:
Bethuel Mmbaga
2023-11-15 18:22:00 +03:00
committed by GitHub
parent fb42fedb58
commit e7d063126d
5 changed files with 83 additions and 29 deletions

View File

@@ -211,6 +211,7 @@ type UserInfo struct {
Status string `json:"-"`
IsServiceUser bool `json:"is_service_user"`
IsBlocked bool `json:"is_blocked"`
NonDeletable bool `json:"non_deletable"`
LastLogin time.Time `json:"last_login"`
Issued string `json:"issued"`
IntegrationReference IntegrationReference `json:"-"`