add username to our trip

This commit is contained in:
mr
2024-12-04 11:33:08 +01:00
parent 6681c455d8
commit fd01f535a1
30 changed files with 129 additions and 113 deletions

View File

@@ -38,7 +38,7 @@ func (r *ResourceSet) Clear() {
r.WorkflowResources = nil
}
func (r *ResourceSet) Fill(peerID string, groups []string) {
func (r *ResourceSet) Fill(username string, peerID string, groups []string) {
for k, v := range map[utils.DBObject][]string{
(&DataResource{}): r.Datas,
(&ComputeResource{}): r.Computes,
@@ -47,7 +47,7 @@ func (r *ResourceSet) Fill(peerID string, groups []string) {
(&WorkflowResource{}): r.Workflows,
} {
for _, id := range v {
d, _, e := k.GetAccessor(peerID, groups, nil).LoadOne(id)
d, _, e := k.GetAccessor(username, peerID, groups, nil).LoadOne(id)
if e == nil {
switch k.(type) {
case *DataResource: