@@ -43,9 +43,9 @@ func (hs *HTTPServer) isDashboardStarredByUser(c *contextmodel.ReqContext, dashI
4343 return false , nil
4444 }
4545
46- namespaceID , userIDstr := c .SignedInUser .GetNamespacedID ()
46+ namespaceID , userIDstr := c .SignedInUser .GetTypedID ()
4747
48- if namespaceID != identity .NamespaceUser {
48+ if namespaceID != identity .TypeUser {
4949 return false , nil
5050 }
5151
@@ -436,7 +436,7 @@ func (hs *HTTPServer) deleteDashboard(c *contextmodel.ReqContext) response.Respo
436436 return response .Error (http .StatusBadRequest , "Use folders endpoint for deleting folders." , nil )
437437 }
438438
439- namespaceID , userIDStr := c .SignedInUser .GetNamespacedID ()
439+ namespaceID , userIDStr := c .SignedInUser .GetTypedID ()
440440
441441 // disconnect all library elements for this dashboard
442442 err = hs .LibraryElementService .DisconnectElementsFromDashboard (c .Req .Context (), dash .ID )
@@ -513,8 +513,8 @@ func (hs *HTTPServer) postDashboard(c *contextmodel.ReqContext, cmd dashboards.S
513513 var err error
514514
515515 userID := int64 (0 )
516- namespaceID , userIDstr := c .SignedInUser .GetNamespacedID ()
517- if namespaceID != identity .NamespaceUser && namespaceID != identity .NamespaceServiceAccount {
516+ namespaceID , userIDstr := c .SignedInUser .GetTypedID ()
517+ if namespaceID != identity .TypeUser && namespaceID != identity .TypeServiceAccount {
518518 hs .log .Debug ("User does not belong to a user or service account namespace" , "namespaceID" , namespaceID , "userID" , userIDstr )
519519 } else {
520520 userID , err = identity .IntIdentifier (namespaceID , userIDstr )
@@ -631,8 +631,8 @@ func (hs *HTTPServer) postDashboard(c *contextmodel.ReqContext, cmd dashboards.S
631631func (hs * HTTPServer ) GetHomeDashboard (c * contextmodel.ReqContext ) response.Response {
632632 userID := int64 (0 )
633633 var err error
634- namespaceID , userIDstr := c .SignedInUser .GetNamespacedID ()
635- if namespaceID != identity .NamespaceUser && namespaceID != identity .NamespaceServiceAccount {
634+ namespaceID , userIDstr := c .SignedInUser .GetTypedID ()
635+ if namespaceID != identity .TypeUser && namespaceID != identity .TypeServiceAccount {
636636 hs .log .Debug ("User does not belong to a user or service account namespace" , "namespaceID" , namespaceID , "userID" , userIDstr )
637637 } else {
638638 userID , err = identity .IntIdentifier (namespaceID , userIDstr )
@@ -1083,8 +1083,8 @@ func (hs *HTTPServer) RestoreDashboardVersion(c *contextmodel.ReqContext) respon
10831083 }
10841084
10851085 userID := int64 (0 )
1086- namespaceID , userIDstr := c .SignedInUser .GetNamespacedID ()
1087- if namespaceID != identity .NamespaceUser && namespaceID != identity .NamespaceServiceAccount {
1086+ namespaceID , userIDstr := c .SignedInUser .GetTypedID ()
1087+ if namespaceID != identity .TypeUser && namespaceID != identity .TypeServiceAccount {
10881088 hs .log .Warn ("User does not belong to a user or service account namespace" , "namespaceID" , namespaceID , "userID" , userIDstr )
10891089 } else {
10901090 userID , err = identity .IntIdentifier (namespaceID , userIDstr )
0 commit comments