List serviceaccounts (#43672)

* Serviceaccounts: feat - tabview for serviceaccounts

* WIP

* feat: listing all service accounts

* refactor: needed to remove showInvitees as not present in serviceaccounts

* add token column in the list

* add token to orgserviceaccount

* Update pkg/services/serviceaccounts/api/api.go
This commit is contained in:
Eric Leijonmarck
2022-01-12 13:23:00 +01:00
committed by GitHub
parent c1a9a36bd2
commit 6409e761b5
9 changed files with 41 additions and 41 deletions
+2 -2
View File
@@ -109,7 +109,7 @@ func (ss *SQLStore) GetOrgUsers(ctx context.Context, query *models.GetOrgUsersQu
// TODO: add to chore, for cleaning up after we have created
// service accounts table in the modelling
whereConditions = append(whereConditions, fmt.Sprintf("%s.is_service_account = false", x.Dialect().Quote("user")))
whereConditions = append(whereConditions, fmt.Sprintf("%s.is_service_account = %t", x.Dialect().Quote("user"), query.IsServiceAccount))
if query.Query != "" {
queryWithWildcards := "%" + query.Query + "%"
@@ -163,7 +163,7 @@ func (ss *SQLStore) SearchOrgUsers(ctx context.Context, query *models.SearchOrgU
// TODO: add to chore, for cleaning up after we have created
// service accounts table in the modelling
whereConditions = append(whereConditions, fmt.Sprintf("%s.is_service_account = false", x.Dialect().Quote("user")))
whereConditions = append(whereConditions, fmt.Sprintf("%s.is_service_account = %t", x.Dialect().Quote("user"), query.IsServiceAccount))
if query.Query != "" {
queryWithWildcards := "%" + query.Query + "%"