fix: management api remove otp (#1010)

* fix: management api remove otp

* add postinstall

* remove mgmt otp

Co-authored-by: Max Peintner <max@caos.ch>
This commit is contained in:
Fabi
2020-11-24 12:06:46 +01:00
committed by GitHub
parent 855725c3c0
commit 75bf0409c4
7 changed files with 71 additions and 2 deletions

View File

@@ -221,6 +221,11 @@ func (s *Server) GetUserMfas(ctx context.Context, userID *management.UserID) (*m
return &management.UserMultiFactors{Mfas: mfasFromModel(mfas)}, nil
}
func (s *Server) RemoveMfaOTP(ctx context.Context, userID *management.UserID) (*empty.Empty, error) {
err := s.user.RemoveOTP(ctx, userID.Id)
return &empty.Empty{}, err
}
func (s *Server) SearchUserMemberships(ctx context.Context, in *management.UserMembershipSearchRequest) (*management.UserMembershipSearchResponse, error) {
request := userMembershipSearchRequestsToModel(in)
request.AppendUserIDQuery(in.UserId)