Simplify access to system user service
This commit is contained in:
parent
d8d48c2cfe
commit
d21cd72f7c
@ -65,7 +65,7 @@ func (Record) New() *Record {
|
||||
ac: service.DefaultAccessControl,
|
||||
|
||||
// See comment at DefaultSystemUser definition
|
||||
userFinder: service.DefaultSystemUser,
|
||||
userFinder: systemService.DefaultUser,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -39,9 +39,7 @@ type (
|
||||
func Notification() *notification {
|
||||
return ¬ification{
|
||||
actionlog: DefaultActionlog,
|
||||
|
||||
// See comment at DefaultSystemUser definition
|
||||
users: DefaultSystemUser,
|
||||
users: systemService.DefaultUser,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -16,7 +16,6 @@ import (
|
||||
"github.com/cortezaproject/corteza-server/pkg/options"
|
||||
"github.com/cortezaproject/corteza-server/pkg/permissions"
|
||||
"github.com/cortezaproject/corteza-server/store"
|
||||
systemService "github.com/cortezaproject/corteza-server/system/service"
|
||||
"go.uber.org/zap"
|
||||
"strconv"
|
||||
"time"
|
||||
@ -66,14 +65,6 @@ var (
|
||||
DefaultAttachment AttachmentService
|
||||
DefaultNotification *notification
|
||||
|
||||
// DefaultSystemUser is a bridge to users in a system service
|
||||
// @todo this is ad-hoc solution that connects compose to system it breaks microservice
|
||||
// architecture and service separation and should be refactored properly
|
||||
// (that is, if we want to continue with microservice architecture)
|
||||
DefaultSystemUser systemService.UserService
|
||||
//DefaultSystemUser *systemUser
|
||||
//DefaultSystemRole *systemRole
|
||||
|
||||
// wrapper around time.Now() that will aid service testing
|
||||
now = func() *time.Time {
|
||||
c := time.Now()
|
||||
@ -159,8 +150,6 @@ func Initialize(ctx context.Context, log *zap.Logger, s store.Storer, c Config)
|
||||
DefaultNamespace = Namespace()
|
||||
DefaultModule = Module()
|
||||
|
||||
DefaultSystemUser = systemService.DefaultUser
|
||||
|
||||
DefaultImportSession = ImportSession()
|
||||
DefaultRecord = Record()
|
||||
DefaultPage = Page()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user