mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
feat: creation of service account (#44913)
* feat: creation of service account * added back button for the details page * refactor: remove unused file, renamed fields * oppps
This commit is contained in:
@@ -27,9 +27,10 @@ func NewServiceAccountsStore(store *sqlstore.SQLStore) *ServiceAccountsStoreImpl
|
||||
|
||||
func (s *ServiceAccountsStoreImpl) CreateServiceAccount(ctx context.Context, sa *serviceaccounts.CreateServiceaccountForm) (user *models.User, err error) {
|
||||
// create a new service account - "user" with empty permissions
|
||||
generatedLogin := "Service-Account-" + uuid.New().String()
|
||||
cmd := models.CreateUserCommand{
|
||||
Login: "Service-Account-" + uuid.New().String(),
|
||||
Name: sa.Name + "-Service-Account-" + uuid.New().String(),
|
||||
Login: generatedLogin,
|
||||
Name: sa.Name,
|
||||
OrgId: sa.OrgID,
|
||||
IsServiceAccount: true,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user