Cleanup on node pairing tests
This commit is contained in:
@@ -506,7 +506,7 @@ func (svc node) fetchFederatedUser(ctx context.Context, n *types.Node) (*sysType
|
||||
//
|
||||
// Four parts are collected from the given URI:
|
||||
// 1) node host from URI's host
|
||||
// 2) shared node ID (rom URI's username
|
||||
// 2) shared node ID from URI's username
|
||||
// 3) shared token from URI's password
|
||||
// 4) name of the node from query string param "name" (optional)
|
||||
func (node) decodePairingURI(uri string) (*types.Node, error) {
|
||||
|
||||
@@ -8,7 +8,6 @@ import (
|
||||
|
||||
"github.com/cortezaproject/corteza-server/federation/types"
|
||||
"github.com/cortezaproject/corteza-server/pkg/auth"
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
@@ -131,7 +130,6 @@ func (w *syncWorkerStructure) Watch(ctx context.Context, delay time.Duration, li
|
||||
default:
|
||||
}
|
||||
s, _ := url.Url.String()
|
||||
spew.Dump("URL", s)
|
||||
meta := url.Meta.(*structureProcesser)
|
||||
|
||||
// use the authToken from node pairing
|
||||
|
||||
@@ -29,7 +29,7 @@ func Federation() (o *FederationOpt) {
|
||||
o = &FederationOpt{
|
||||
Enabled: false,
|
||||
Label: "Federation label",
|
||||
Host: "Federation host",
|
||||
Host: "local.cortezaproject.org",
|
||||
StructureMonitorInterval: time.Minute * 2,
|
||||
StructurePageSize: 1,
|
||||
DataMonitorInterval: time.Second * 60,
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
name: federation
|
||||
|
||||
imports:
|
||||
- time
|
||||
|
||||
@@ -18,7 +16,7 @@ props:
|
||||
|
||||
- name: Host
|
||||
type: string
|
||||
default: "Federation host"
|
||||
default: "local.cortezaproject.org"
|
||||
env: FEDERATION_HOST
|
||||
description: Host that is used during node pairing, also included in invitation
|
||||
|
||||
|
||||
@@ -92,7 +92,6 @@ func NewService(logger *zap.Logger, s rbacRulesStore) (svc *service) {
|
||||
// When not explicitly allowed through rules or fallbacks, function will return FALSE.
|
||||
func (svc service) Can(roles []uint64, res Resource, op Operation, ff ...CheckAccessFunc) bool {
|
||||
// Checking rules
|
||||
// spew.Dump("checking rules", res.RBACResource(), roles, svc.Check(res.RBACResource(), op, roles...), "end checking rules")
|
||||
var v = svc.Check(res.RBACResource(), op, roles...)
|
||||
if v != Inherit {
|
||||
return v == Allow
|
||||
|
||||
Reference in New Issue
Block a user