Identity: Rename "namespace" to "type" in the requester interface (#90567)
This commit is contained in:
@@ -109,10 +109,10 @@ func (s *ImportDashboardService) ImportDashboard(ctx context.Context, req *dashb
|
||||
req.FolderUid = folder.UID
|
||||
}
|
||||
|
||||
namespace, identifier := req.User.GetNamespacedID()
|
||||
namespace, identifier := req.User.GetTypedID()
|
||||
userID := int64(0)
|
||||
|
||||
if namespace == identity.NamespaceUser || namespace == identity.NamespaceServiceAccount {
|
||||
if namespace == identity.TypeUser || namespace == identity.TypeServiceAccount {
|
||||
userID, _ = identity.IntIdentifier(namespace, identifier)
|
||||
}
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@ func TestImportDashboardService(t *testing.T) {
|
||||
require.NotNil(t, resp)
|
||||
require.Equal(t, "UDdpyzz7z", resp.UID)
|
||||
|
||||
userID, err := identity.IntIdentifier(importDashboardArg.User.GetNamespacedID())
|
||||
userID, err := identity.IntIdentifier(importDashboardArg.User.GetTypedID())
|
||||
require.NoError(t, err)
|
||||
|
||||
require.NotNil(t, importDashboardArg)
|
||||
@@ -149,7 +149,7 @@ func TestImportDashboardService(t *testing.T) {
|
||||
require.NotNil(t, resp)
|
||||
require.Equal(t, "UDdpyzz7z", resp.UID)
|
||||
|
||||
userID, err := identity.IntIdentifier(importDashboardArg.User.GetNamespacedID())
|
||||
userID, err := identity.IntIdentifier(importDashboardArg.User.GetTypedID())
|
||||
require.NoError(t, err)
|
||||
|
||||
require.NotNil(t, importDashboardArg)
|
||||
|
||||
Reference in New Issue
Block a user