diff --git a/commonspace/object/acl/list/aclstate.go b/commonspace/object/acl/list/aclstate.go index 86f86416..0459928b 100644 --- a/commonspace/object/acl/list/aclstate.go +++ b/commonspace/object/acl/list/aclstate.go @@ -196,6 +196,10 @@ func (st *AclState) Invites() []crypto.PubKey { return invites } +func (st *AclState) Key() crypto.PrivKey { + return st.key +} + func (st *AclState) InviteIds() []string { var invites []string for invId := range st.inviteKeys { diff --git a/commonspace/spaceservice.go b/commonspace/spaceservice.go index 6288fd24..c2ebdb98 100644 --- a/commonspace/spaceservice.go +++ b/commonspace/spaceservice.go @@ -66,8 +66,9 @@ type SpaceService interface { } type Deps struct { - SyncStatus syncstatus.StatusUpdater - TreeSyncer treesyncer.TreeSyncer + SyncStatus syncstatus.StatusUpdater + TreeSyncer treesyncer.TreeSyncer + AccountService accountservice.Service } type spaceService struct { @@ -176,6 +177,9 @@ func (s *spaceService) NewSpace(ctx context.Context, id string, deps Deps) (Spac return nil, err } spaceApp := s.app.ChildApp() + if deps.AccountService != nil { + spaceApp.Register(deps.AccountService) + } spaceApp.Register(state). Register(deps.SyncStatus). Register(peerManager).