add username to our trip

This commit is contained in:
mr
2024-12-04 12:14:55 +01:00
parent fd01f535a1
commit 1fcbc7c08a
10 changed files with 43 additions and 18 deletions

View File

@@ -1,8 +1,6 @@
package workspace
import (
"fmt"
"cloud.o-forge.io/core/oc-lib/models/collaborative_area/shallow_collaborative_area"
"cloud.o-forge.io/core/oc-lib/models/resources"
"cloud.o-forge.io/core/oc-lib/models/utils"
@@ -23,7 +21,6 @@ func (d *Workspace) GetAccessor(username string, peerID string, groups []string,
}
func (ao *Workspace) VerifyAuth(username string, peerID string, groups []string) bool {
fmt.Println("Workspace.VerifyAuth", ao.Shared)
if ao.Shared != "" {
shared, code, _ := shallow_collaborative_area.New(tools.COLLABORATIVE_AREA, username, peerID, groups, nil).LoadOne(ao.Shared)
if code != 200 || shared == nil {
@@ -31,5 +28,5 @@ func (ao *Workspace) VerifyAuth(username string, peerID string, groups []string)
}
return shared.VerifyAuth(username, peerID, groups)
}
return true
return ao.AbstractObject.VerifyAuth(username, peerID, groups)
}