Identity: Remove typed id (#91801)

* Refactor identity struct to store type in separate field

* Update ResolveIdentity to take string representation of typedID

* Add IsIdentityType to requester interface

* Use IsIdentityType from interface

* Remove usage of TypedID

* Remote typedID struct

* fix GetInternalID
This commit is contained in:
Karl Persson
2024-08-13 10:18:28 +02:00
committed by GitHub
parent 0258842f87
commit 8bcd9c2594
72 changed files with 530 additions and 521 deletions
+2 -2
View File
@@ -44,11 +44,11 @@ func (hs *HTTPServer) isDashboardStarredByUser(c *contextmodel.ReqContext, dashI
return false, nil
}
if !identity.IsIdentityType(c.SignedInUser.GetID(), claims.TypeUser) {
if !c.SignedInUser.IsIdentityType(claims.TypeUser) {
return false, nil
}
userID, err := identity.UserIdentifier(c.SignedInUser.GetID())
userID, err := c.SignedInUser.GetInternalID()
if err != nil {
return false, err
}