Identity: remove GetTypedID (#91745)
This commit is contained in:
@@ -101,14 +101,9 @@ func (hs *HTTPServer) AddOrgInvite(c *contextmodel.ReqContext) response.Response
|
||||
cmd.Name = inviteDto.Name
|
||||
cmd.Status = tempuser.TmpUserInvitePending
|
||||
|
||||
namespace, identifier := c.SignedInUser.GetTypedID()
|
||||
var userID int64
|
||||
if namespace == identity.TypeUser || namespace == identity.TypeServiceAccount {
|
||||
var err error
|
||||
userID, err = strconv.ParseInt(identifier, 10, 64)
|
||||
if err != nil {
|
||||
return response.Error(http.StatusInternalServerError, "Unrecognized user", err)
|
||||
}
|
||||
if id, err := identity.UserIdentifier(c.SignedInUser.GetID()); err == nil {
|
||||
userID = id
|
||||
}
|
||||
|
||||
cmd.InvitedByUserID = userID
|
||||
|
||||
Reference in New Issue
Block a user