This commit is contained in:
mr 2024-12-03 11:57:51 +01:00
parent ea55c94c73
commit 4b88da8ff6
2 changed files with 5 additions and 0 deletions

View File

@ -108,6 +108,8 @@ func (ao *Workflow) VerifyAuth(peerID string, groups []string) bool {
} }
isAuthorized = shared.VerifyAuth(peerID, groups) isAuthorized = shared.VerifyAuth(peerID, groups)
} }
} else {
isAuthorized = true
} }
return isAuthorized return isAuthorized
} }

View File

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