diff --git a/services/collaboration/pkg/config/app.go b/services/collaboration/pkg/config/app.go index d22e0d43c57..7477c8a2b87 100644 --- a/services/collaboration/pkg/config/app.go +++ b/services/collaboration/pkg/config/app.go @@ -6,7 +6,6 @@ type App struct { Product string `yaml:"product" env:"COLLABORATION_APP_PRODUCT" desc:"The WebOffice app, either Collabora, OnlyOffice, Microsoft365 or MicrosoftOfficeOnline" introductionVersion:"%%NEXT%%"` Description string `yaml:"description" env:"COLLABORATION_APP_DESCRIPTION" desc:"App description" introductionVersion:"6.0.0"` Icon string `yaml:"icon" env:"COLLABORATION_APP_ICON" desc:"Icon for the app" introductionVersion:"6.0.0"` - LockName string `yaml:"lockname" env:"COLLABORATION_APP_LOCKNAME" desc:"Name for the app lock" introductionVersion:"6.0.0"` Addr string `yaml:"addr" env:"COLLABORATION_APP_ADDR" desc:"The URL where the WOPI app is located, such as https://127.0.0.1:8080." introductionVersion:"6.0.0"` Insecure bool `yaml:"insecure" env:"COLLABORATION_APP_INSECURE" desc:"Skip TLS certificate verification when connecting to the WOPI app" introductionVersion:"6.0.0"` diff --git a/services/collaboration/pkg/config/defaults/defaultconfig.go b/services/collaboration/pkg/config/defaults/defaultconfig.go index 8287fcd00f8..1b22b43480d 100644 --- a/services/collaboration/pkg/config/defaults/defaultconfig.go +++ b/services/collaboration/pkg/config/defaults/defaultconfig.go @@ -27,7 +27,6 @@ func DefaultConfig() *config.Config { Product: "Collabora", Description: "Open office documents with Collabora", Icon: "image-edit", - LockName: "com.github.owncloud.collaboration", Addr: "https://127.0.0.1:9980", Insecure: false, ProofKeys: config.ProofKeys{ diff --git a/services/collaboration/pkg/connector/fileconnector.go b/services/collaboration/pkg/connector/fileconnector.go index 073a18daf1f..0a5bc618f21 100644 --- a/services/collaboration/pkg/connector/fileconnector.go +++ b/services/collaboration/pkg/connector/fileconnector.go @@ -209,7 +209,7 @@ func (f *FileConnector) Lock(ctx context.Context, lockID, oldLockID string) (*Co Ref: wopiContext.FileReference, Lock: &providerv1beta1.Lock{ LockId: lockID, - AppName: f.cfg.App.LockName + "." + f.cfg.App.Name, + AppName: f.cfg.App.Name, Type: providerv1beta1.LockType_LOCK_TYPE_WRITE, Expiration: &typesv1beta1.Timestamp{ Seconds: uint64(time.Now().Add(lockDuration).Unix()), @@ -235,7 +235,7 @@ func (f *FileConnector) Lock(ctx context.Context, lockID, oldLockID string) (*Co Ref: wopiContext.FileReference, Lock: &providerv1beta1.Lock{ LockId: lockID, - AppName: f.cfg.App.LockName + "." + f.cfg.App.Name, + AppName: f.cfg.App.Name, Type: providerv1beta1.LockType_LOCK_TYPE_WRITE, Expiration: &typesv1beta1.Timestamp{ Seconds: uint64(time.Now().Add(lockDuration).Unix()), @@ -378,7 +378,7 @@ func (f *FileConnector) RefreshLock(ctx context.Context, lockID string) (*Connec Ref: wopiContext.FileReference, Lock: &providerv1beta1.Lock{ LockId: lockID, - AppName: f.cfg.App.LockName + "." + f.cfg.App.Name, + AppName: f.cfg.App.Name, Type: providerv1beta1.LockType_LOCK_TYPE_WRITE, Expiration: &typesv1beta1.Timestamp{ Seconds: uint64(time.Now().Add(lockDuration).Unix()), @@ -518,7 +518,7 @@ func (f *FileConnector) UnLock(ctx context.Context, lockID string) (*ConnectorRe Ref: wopiContext.FileReference, Lock: &providerv1beta1.Lock{ LockId: lockID, - AppName: f.cfg.App.LockName + "." + f.cfg.App.Name, + AppName: f.cfg.App.Name, }, } diff --git a/services/collaboration/pkg/connector/fileconnector_test.go b/services/collaboration/pkg/connector/fileconnector_test.go index b0f48586f59..48af17915f3 100644 --- a/services/collaboration/pkg/connector/fileconnector_test.go +++ b/services/collaboration/pkg/connector/fileconnector_test.go @@ -46,9 +46,8 @@ var _ = Describe("FileConnector", func() { OcisURL: "https://ocis.example.prv", }, App: config.App{ - LockName: "testName_for_unittests", // Only the LockName is used - Name: "test", - Product: "Microsoft", + Name: "test", + Product: "Microsoft", }, Wopi: config.Wopi{ WopiSrc: "https://ocis.server.prv",