diff --git a/.drone.star b/.drone.star index 2c9885d2b3c..a93145542e9 100644 --- a/.drone.star +++ b/.drone.star @@ -146,7 +146,7 @@ config = { "federationServer": True, "extraServerEnvironment": { "OCIS_ADD_RUN_SERVICES": "ocm", - "GRAPH_INCLUDE_OCM_SHAREES": True, + "OCIS_ENABLE_OCM": True, "OCM_OCM_INVITE_MANAGER_INSECURE": True, "OCM_OCM_SHARE_PROVIDER_INSECURE": True, "OCM_OCM_STORAGE_PROVIDER_INSECURE": True, diff --git a/.vscode/launch.json b/.vscode/launch.json index 245bb816660..cbe767ab9e0 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -88,18 +88,14 @@ "OCM_OCM_INVITE_MANAGER_INSECURE": "true", "OCM_OCM_SHARE_PROVIDER_INSECURE": "true", "OCM_OCM_STORAGE_PROVIDER_INSECURE": "true", - "FRONTEND_OCS_INCLUDE_OCM_SHAREES": "true", "OCIS_BASE_DATA_PATH": "${env:HOME}/.ocis-10200", "OCIS_CONFIG_DIR": "${env:HOME}/.ocis-10200/config", "OCIS_EVENTS_ENDPOINT": "127.0.0.1:10233", "OCIS_LDAP_URI": "ldaps://localhost:10235", "OCIS_RUNTIME_PORT": "10250", "OCIS_URL": "https://federation-ocis-server:10200", - "FRONTEND_OCS_LIST_OCM_SHARES": "true", - "FRONTEND_ENABLE_FEDERATED_SHARING_INCOMING": "true", - "FRONTEND_ENABLE_FEDERATED_SHARING_OUTGOING": "true", "OCIS_ADD_RUN_SERVICES": "ocm", - "GRAPH_INCLUDE_OCM_SHAREES": "true", + "OCIS_ENABLE_OCM": "true", "APP_PROVIDER_DEBUG_ADDR": "127.0.0.1:10165", "APP_PROVIDER_GRPC_ADDR": "127.0.0.1:10164", "APP_REGISTRY_DEBUG_ADDR": "127.0.0.1:10243", diff --git a/changelog/unreleased/add-enable-ocm-variable.md b/changelog/unreleased/add-enable-ocm-variable.md new file mode 100644 index 00000000000..70e7ad709c5 --- /dev/null +++ b/changelog/unreleased/add-enable-ocm-variable.md @@ -0,0 +1,5 @@ +Enhancement: Add OCIS_ENABLE_OCM env var + +We added a new `OCIS_ENABLE_OCM` env var that will enable all ocm flags. + +https://github.com/owncloud/ocis/pull/9784 diff --git a/docs/ocis/development/testing.md b/docs/ocis/development/testing.md index 933c6969fe4..7955b9b2d83 100644 --- a/docs/ocis/development/testing.md +++ b/docs/ocis/development/testing.md @@ -556,10 +556,7 @@ in the `/etc/hosts` file # run oCIS OCIS_URL="https://ocis-server:9200" \ PROXY_ENABLE_BASIC_AUTH=true \ -GRAPH_INCLUDE_OCM_SHAREES=true \ -OCM_OCM_INVITE_MANAGER_INSECURE=true \ -OCM_OCM_SHARE_PROVIDER_INSECURE=true \ -OCM_OCM_STORAGE_PROVIDER_INSECURE=true \ +OCIS_ENABLE_OCM=true \ OCM_OCM_PROVIDER_AUTHORIZER_PROVIDERS_FILE="${workspaceFolder}/tests/config/drone/providers.json" \ OCIS_ADD_RUN_SERVICES="ocm" \ ocis/bin/ocis server @@ -584,12 +581,8 @@ The second oCIS instance should be available at: https://federation-ocis-server: {{< hint info >}} To enable ocm in the web interface, you need to set the following envs: -`FRONTEND_OCS_INCLUDE_OCM_SHAREES=true` \ -`FRONTEND_OCS_LIST_OCM_SHARES=true` \ -`FRONTEND_ENABLE_FEDERATED_SHARING_INCOMING=true` \ -`FRONTEND_ENABLE_FEDERATED_SHARING_OUTGOING=true` \ - -and put `ocm` to apps https://github.com/owncloud/ocis/blob/master/services/web/pkg/config/defaults/defaultconfig.go#L101 +`OCIS_ENABLE_OCM="true"` +`OCIS_ADD_RUN_SERVICES="ocm"` {{< /hint>}} #### Run the Acceptance Test diff --git a/services/frontend/pkg/config/config.go b/services/frontend/pkg/config/config.go index ed0f43d0069..0ccc7cf997d 100644 --- a/services/frontend/pkg/config/config.go +++ b/services/frontend/pkg/config/config.go @@ -31,8 +31,8 @@ type Config struct { UploadMaxChunkSize int `yaml:"upload_max_chunk_size" env:"FRONTEND_UPLOAD_MAX_CHUNK_SIZE" desc:"Sets the max chunk sizes in bytes for uploads via the clients." introductionVersion:"pre5.0"` UploadHTTPMethodOverride string `yaml:"upload_http_method_override" env:"FRONTEND_UPLOAD_HTTP_METHOD_OVERRIDE" desc:"Advise TUS to replace PATCH requests by POST requests." introductionVersion:"pre5.0"` DefaultUploadProtocol string `yaml:"default_upload_protocol" env:"FRONTEND_DEFAULT_UPLOAD_PROTOCOL" desc:"The default upload protocol to use in clients. Currently only 'tus' is available. See the developer API documentation for more details about TUS." introductionVersion:"pre5.0"` - EnableFederatedSharingIncoming bool `yaml:"enable_federated_sharing_incoming" env:"FRONTEND_ENABLE_FEDERATED_SHARING_INCOMING" desc:"Changing this value is NOT supported. Enables support for incoming federated sharing for clients. The backend behaviour is not changed." introductionVersion:"pre5.0"` - EnableFederatedSharingOutgoing bool `yaml:"enable_federated_sharing_outgoing" env:"FRONTEND_ENABLE_FEDERATED_SHARING_OUTGOING" desc:"Changing this value is NOT supported. Enables support for outgoing federated sharing for clients. The backend behaviour is not changed." introductionVersion:"pre5.0"` + EnableFederatedSharingIncoming bool `yaml:"enable_federated_sharing_incoming" env:"OCIS_ENABLE_OCM;FRONTEND_ENABLE_FEDERATED_SHARING_INCOMING" desc:"Changing this value is NOT supported. Enables support for incoming federated sharing for clients. The backend behaviour is not changed." introductionVersion:"pre5.0"` + EnableFederatedSharingOutgoing bool `yaml:"enable_federated_sharing_outgoing" env:"OCIS_ENABLE_OCM;FRONTEND_ENABLE_FEDERATED_SHARING_OUTGOING" desc:"Changing this value is NOT supported. Enables support for outgoing federated sharing for clients. The backend behaviour is not changed." introductionVersion:"pre5.0"` SearchMinLength int `yaml:"search_min_length" env:"FRONTEND_SEARCH_MIN_LENGTH" desc:"Minimum number of characters to enter before a client should start a search for Share receivers. This setting can be used to customize the user experience if e.g too many results are displayed." introductionVersion:"pre5.0"` Edition string `yaml:"edition" env:"OCIS_EDITION;FRONTEND_EDITION" desc:"Edition of oCIS. Used for branding purposes." introductionVersion:"pre5.0"` DisableSSE bool `yaml:"disable_sse" env:"OCIS_DISABLE_SSE;FRONTEND_DISABLE_SSE" desc:"When set to true, clients are informed that the Server-Sent Events endpoint is not accessible." introductionVersion:"pre5.0"` @@ -141,10 +141,10 @@ type OCS struct { CacheWarmupDriver string `yaml:"cache_warmup_driver,omitempty"` // not supported by the oCIS product, therefore not part of docs CacheWarmupDrivers CacheWarmupDrivers `yaml:"cache_warmup_drivers,omitempty"` // not supported by the oCIS product, therefore not part of docs EnableDenials bool `yaml:"enable_denials" env:"FRONTEND_OCS_ENABLE_DENIALS" desc:"EXPERIMENTAL: enable the feature to deny access on folders." introductionVersion:"pre5.0"` - ListOCMShares bool `yaml:"list_ocm_shares" env:"FRONTEND_OCS_LIST_OCM_SHARES" desc:"Include OCM shares when listing shares. See the OCM service documentation for more details." introductionVersion:"5.0"` + ListOCMShares bool `yaml:"list_ocm_shares" env:"OCIS_ENABLE_OCM;FRONTEND_OCS_LIST_OCM_SHARES" desc:"Include OCM shares when listing shares. See the OCM service documentation for more details." introductionVersion:"5.0"` + IncludeOCMSharees bool `yaml:"include_ocm_sharees" env:"OCIS_ENABLE_OCM;FRONTEND_OCS_INCLUDE_OCM_SHAREES" desc:"Include OCM sharees when listing sharees." introductionVersion:"5.0"` PublicShareMustHavePassword bool `yaml:"public_sharing_share_must_have_password" env:"OCIS_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD;FRONTEND_OCS_PUBLIC_SHARE_MUST_HAVE_PASSWORD" desc:"Set this to true if you want to enforce passwords on all public shares." introductionVersion:"5.0"` WriteablePublicShareMustHavePassword bool `yaml:"public_sharing_writeableshare_must_have_password" env:"OCIS_SHARING_PUBLIC_WRITEABLE_SHARE_MUST_HAVE_PASSWORD;FRONTEND_OCS_PUBLIC_WRITEABLE_SHARE_MUST_HAVE_PASSWORD" desc:"Set this to true if you want to enforce passwords for writable shares. Only effective if the setting for 'passwords on all public shares' is set to false." introductionVersion:"5.0"` - IncludeOCMSharees bool `yaml:"include_ocm_sharees" env:"FRONTEND_OCS_INCLUDE_OCM_SHAREES" desc:"Include OCM sharees when listing sharees." introductionVersion:"5.0"` ShowUserEmailInResults bool `yaml:"show_email_in_results" env:"OCIS_SHOW_USER_EMAIL_IN_RESULTS" desc:"Include user email addresses in responses. If absent or set to false emails will be omitted from results. Please note that admin users can always see all email addresses." introductionVersion:"6.0.0"` } diff --git a/services/graph/pkg/config/config.go b/services/graph/pkg/config/config.go index f99b5e40e2c..31a9ce39b66 100644 --- a/services/graph/pkg/config/config.go +++ b/services/graph/pkg/config/config.go @@ -28,7 +28,7 @@ type Config struct { Application Application `yaml:"application"` Spaces Spaces `yaml:"spaces"` Identity Identity `yaml:"identity"` - IncludeOCMSharees bool `yaml:"include_ocm_sharees" env:"GRAPH_INCLUDE_OCM_SHAREES" desc:"Include OCM sharees when listing users." introductionVersion:"5.0"` + IncludeOCMSharees bool `yaml:"include_ocm_sharees" env:"OCIS_ENABLE_OCM;GRAPH_INCLUDE_OCM_SHAREES" desc:"Include OCM sharees when listing users." introductionVersion:"5.0"` Events Events `yaml:"events"` Keycloak Keycloak `yaml:"keycloak"` diff --git a/tests/config/drone/.env-federation b/tests/config/drone/.env-federation index 6e381baaac6..760aed4cbce 100644 --- a/tests/config/drone/.env-federation +++ b/tests/config/drone/.env-federation @@ -2,18 +2,14 @@ export OCM_OCM_PROVIDER_AUTHORIZER_PROVIDERS_FILE=tests/config/drone/providers.j export OCM_OCM_INVITE_MANAGER_INSECURE=true export OCM_OCM_SHARE_PROVIDER_INSECURE=true export OCM_OCM_STORAGE_PROVIDER_INSECURE=true -export FRONTEND_OCS_INCLUDE_OCM_SHAREES=true export OCIS_BASE_DATA_PATH=${HOME}/.ocis-10200 export OCIS_CONFIG_DIR=${HOME}/.ocis-10200/config export OCIS_EVENTS_ENDPOINT=127.0.0.1:10233 export OCIS_LDAP_URI=ldaps://localhost:10235 export OCIS_RUNTIME_PORT=10250 export OCIS_URL=https://federation-ocis-server:10200 -export FRONTEND_OCS_LIST_OCM_SHARES=true -export FRONTEND_ENABLE_FEDERATED_SHARING_INCOMING=true -export FRONTEND_ENABLE_FEDERATED_SHARING_OUTGOING=true export OCIS_ADD_RUN_SERVICES=ocm -export GRAPH_INCLUDE_OCM_SHAREES=true +export OCIS_ENABLE_OCM=true export APP_PROVIDER_DEBUG_ADDR=127.0.0.1:10165 export APP_PROVIDER_GRPC_ADDR=127.0.0.1:10164 export APP_REGISTRY_DEBUG_ADDR=127.0.0.1:10243