K8s/Folders: Fix mode 2 folder creation (#94796)
* Use user UID as identifier instead of ID * Remove malformed error
This commit is contained in:
@@ -674,6 +674,12 @@ func (s *Service) Create(ctx context.Context, cmd *folder.CreateFolderCommand) (
|
||||
}
|
||||
|
||||
if s.features.IsEnabled(ctx, featuremgmt.FlagKubernetesFolders) {
|
||||
// #TODO is some kind of intermediate conversion required as is the case with user id where
|
||||
// it gets parsed using UserIdentifier(). Also is there some kind of validation taking place as
|
||||
// part of the parsing?
|
||||
f.CreatedByUID = user.GetUID()
|
||||
f.UpdatedByUID = user.GetUID()
|
||||
|
||||
if f.ParentUID == "" {
|
||||
return f, nil
|
||||
}
|
||||
|
||||
@@ -48,6 +48,8 @@ type Folder struct {
|
||||
URL string
|
||||
UpdatedBy int64
|
||||
CreatedBy int64
|
||||
UpdatedByUID string
|
||||
CreatedByUID string
|
||||
HasACL bool
|
||||
Fullpath string `xorm:"fullpath"`
|
||||
FullpathUIDs string `xorm:"fullpath_uids"`
|
||||
|
||||
Reference in New Issue
Block a user