Skip to content

Commit

Permalink
Fix cell edition again
Browse files Browse the repository at this point in the history
  • Loading branch information
cdujeu committed Oct 2, 2018
1 parent 83973ab commit d758b73
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion idm/share/rest/rest.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ func (h *SharesHandler) PutCell(req *restful.Request, rsp *restful.Response) {
service.RestError500(req, rsp, err)
return
}
log.Logger(ctx).Debug("Received Share.Cell API request", zap.Any("input", &shareRequest))
log.Logger(ctx).Info("Received Share.Cell API request", zap.Any("input", &shareRequest))

// Init Root Nodes and check permissions
err, createdCellNode, readonly := h.ParseRootNodes(ctx, &shareRequest)
Expand All @@ -99,6 +99,8 @@ func (h *SharesHandler) PutCell(req *restful.Request, rsp *restful.Response) {
return
}

log.Logger(ctx).Info("Share.Cell - After ParseRootNodes", zap.Any("input", &shareRequest))

workspace, wsCreated, err := h.GetOrCreateWorkspace(ctx, shareRequest.Room.Uuid, idm.WorkspaceScope_ROOM, shareRequest.Room.Label, shareRequest.Room.Description, false)
if err != nil {
service.RestError500(req, rsp, err)
Expand Down Expand Up @@ -834,6 +836,10 @@ func (h *SharesHandler) ParseRootNodes(ctx context.Context, shareRequest *rest.P
if e != nil {
return e, nil, false
}
// If the virtual root is responded, it may miss the UUID ! Set up manually here
if r.Node.Uuid == "" {
r.Node.Uuid = n.Uuid
}
shareRequest.Room.RootNodes[i] = r.Node
}
if shareRequest.CreateEmptyRoot {
Expand Down

0 comments on commit d758b73

Please sign in to comment.