fix: Inituser (#386)

* fix: init user only create change pw event if pw set

* fix: init user only create change pw event if pw set

* fix: tests
This commit is contained in:
Fabi
2020-07-08 09:53:09 +02:00
committed by GitHub
parent c0f85c2733
commit a5bfd085a1
5 changed files with 12 additions and 5 deletions

View File

@@ -47,6 +47,9 @@ func (repo *UserGrantRepo) SearchMyZitadelPermissions(ctx context.Context) ([]st
return nil, err
}
if grant == nil {
return []string{}, nil
}
permissions := &grant_model.Permissions{Permissions: []string{}}
for _, role := range grant.Roles {
roleName, ctxID := auth.SplitPermission(role)