debug
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package workspace
|
||||
|
||||
import (
|
||||
"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"
|
||||
"cloud.o-forge.io/core/oc-lib/tools"
|
||||
@@ -18,3 +19,14 @@ type Workspace struct {
|
||||
func (d *Workspace) GetAccessor(peerID string, groups []string, caller *tools.HTTPCaller) utils.Accessor {
|
||||
return New(tools.WORKSPACE, peerID, groups, caller) // Create a new instance of the accessor
|
||||
}
|
||||
|
||||
func (ao *Workspace) VerifyAuth(peerID string, groups []string) bool {
|
||||
if ao.Shared != "" {
|
||||
shared, code, _ := shallow_collaborative_area.New(tools.COLLABORATIVE_AREA, peerID, groups, nil).LoadOne(ao.Shared)
|
||||
if code != 200 || shared == nil {
|
||||
return false
|
||||
}
|
||||
return shared.VerifyAuth(peerID, groups)
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
Reference in New Issue
Block a user