Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c2e9f73afc | ||
|
|
e505ae98f1 |
No files matched your search
@@ -447,7 +447,7 @@ jobs:
|
||||
e2e-tests:
|
||||
name: e2e-${{ matrix.suite }}-k8s
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 120
|
||||
timeout-minutes: 60
|
||||
|
||||
if: >-
|
||||
github.event_name == 'schedule' ||
|
||||
@@ -459,38 +459,7 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
# - suite: part-1
|
||||
# args: "--type playwright --total-parts 4 --xsuites search,app-provider,ocm,keycloak,mfa,oidc,vault-storage --run-part 1"
|
||||
- suite: part-2
|
||||
args: "--type playwright --total-parts 4 --xsuites search,app-provider,ocm,keycloak,mfa,oidc,vault-storage --run-part 2"
|
||||
# - suite: part-3
|
||||
# args: "--type playwright --total-parts 4 --xsuites search,app-provider,ocm,keycloak,mfa,oidc,vault-storage --run-part 3"
|
||||
# - suite: part-4
|
||||
# args: "--type playwright --total-parts 4 --xsuites search,app-provider,ocm,keycloak,mfa,oidc,vault-storage --run-part 4"
|
||||
# - suite: search
|
||||
# args: "--type playwright --suites search"
|
||||
# tika: true
|
||||
# - suite: keycloak
|
||||
# args: "--type playwright --suites journeys,keycloak"
|
||||
# keycloak: true
|
||||
# - suite: mfa
|
||||
# args: "--type playwright --suites mfa"
|
||||
# mfa: true
|
||||
- suite: oidc
|
||||
args: "--type playwright specs/oidc/refreshToken.spec.ts"
|
||||
oidc: true
|
||||
- suite: oidc-iframe
|
||||
args: "--type playwright specs/oidc/iframeTokenRenewal.spec.ts"
|
||||
oidc_iframe: true
|
||||
# - suite: app-provider
|
||||
# args: "--type playwright --suites app-provider"
|
||||
# collaboration: true
|
||||
# - suite: ocm
|
||||
# args: "--type playwright --suites ocm"
|
||||
# federated: true
|
||||
# - suite: vault-storage
|
||||
# args: "--type playwright --suites vault-storage"
|
||||
# vault_storage: true
|
||||
- suite: smoke
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
@@ -615,11 +584,9 @@ jobs:
|
||||
|
||||
- name: Run e2e ${{ matrix.suite }} tests
|
||||
env:
|
||||
E2E_ARGS: "${{ matrix.args }}"
|
||||
E2E_ARGS: "--suites ${{ matrix.suite }}"
|
||||
K8S: ${{ env.K8S }}
|
||||
TEST_SERVER_URL: ${{ env.TEST_SERVER_URL }}
|
||||
OIDC_NEEDED: ${{ matrix.oidc == true && 'true' || 'false' }}
|
||||
OIDC_IFRAME_NEEDED: ${{ matrix.oidc_iframe == true && 'true' || 'false' }}
|
||||
run: python3 tests/acceptance/run-e2e.py
|
||||
|
||||
- name: Upload Playwright traces
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
Bugfix: Fix AuthApp and basic auth requests with custom PROXY_USER_OIDC_CLAIM
|
||||
|
||||
We fixed AuthApp (app password) and HTTP basic auth requests returning an
|
||||
internal server error whenever PROXY_USER_OIDC_CLAIM was set to anything
|
||||
other than its default value. Both authenticators put the already
|
||||
authenticated user directly into the request context instead of faking
|
||||
incomplete claims for the account resolver to re-resolve. We also made sure
|
||||
a user who only ever authenticates this way still gets a default role
|
||||
assigned, and that these requests keep getting rejected on deployments with
|
||||
multiple instances enabled, since neither carries tenant-membership
|
||||
information.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/13107
|
||||
@@ -1,20 +0,0 @@
|
||||
Bugfix: Record the acting user in the audit log's User field
|
||||
|
||||
The audit log's `User` field is documented as the UID of the user performing
|
||||
the action, but the file and folder converters filled it from the event's
|
||||
`Owner`, which reva does not set, so the field was empty on every upload,
|
||||
download, move, delete, restore and version restore. Where an event did carry
|
||||
an owner, `User` named the owner rather than the person acting, for example a
|
||||
share recipient uploading into a shared folder. Space, user and group events
|
||||
hard-coded the field to an empty string although every one of those events
|
||||
carries the actor.
|
||||
|
||||
`User` is now taken from the event's `Executant` for all of these events. The
|
||||
`Owner` field of file events is unchanged. The failed public-link access event
|
||||
still has no actor and keeps an empty `User`.
|
||||
|
||||
While adding tests for the user and group events, the group member added and
|
||||
removed messages turned out to pass the user and group ids in the wrong order,
|
||||
naming the group as the user and the user as the group; that is fixed too.
|
||||
|
||||
https://github.com/owncloud/ocis/issues/4789
|
||||
@@ -1,25 +0,0 @@
|
||||
Bugfix: Fix the LDAP master-ID filter when the base filter is empty
|
||||
|
||||
The function `EnhanceFilterWithMasterID` in `ocis-pkg/ldap/filter.go` adds a
|
||||
master-ID clause to an LDAP filter with OR. An empty filter means "no
|
||||
restriction". Before this fix, the function replaced an empty filter with a
|
||||
master-ID-only filter. This action restricted an unrestricted search to
|
||||
master-ID users only.
|
||||
|
||||
The bug broke the search for a user on another instance in multi-instance
|
||||
deployments. This search uses the Graph API endpoint `/graph/v1.0/users`.
|
||||
Multi-instance deployments use this search to find a user to share a resource
|
||||
with.
|
||||
|
||||
Now the function keeps an empty filter unchanged. The function still adds a
|
||||
master-ID clause to a filter that is not empty.
|
||||
|
||||
The `graph`, `auth-basic`, `users`, and `groups` services also use this
|
||||
function to compute their default LDAP user filter when
|
||||
`OCIS_MULTI_INSTANCE_MASTER_ID` is set. An empty user filter now means these
|
||||
services resolve or authenticate every user in the shared LDAP directory,
|
||||
not only master-ID users. Each of these services now rejects startup when
|
||||
`OCIS_MULTI_INSTANCE_MASTER_ID` is set and its own user filter is empty.
|
||||
Set an explicit `OCIS_LDAP_USER_FILTER` for every multi-instance deployment.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/13100
|
||||
@@ -1,8 +0,0 @@
|
||||
Bugfix: Stop logging "no user in context" for data gateway requests
|
||||
|
||||
The proxy's create-home middleware logged an error for every request that
|
||||
carried a reva token but no user. reva's internal downloads through the data
|
||||
gateway (`/data`) are such requests, so every file download added an
|
||||
error-level line. These requests are now passed on with a debug-level log.
|
||||
|
||||
https://github.com/owncloud/ocis/issues/13101
|
||||
@@ -1,10 +0,0 @@
|
||||
Bugfix: Show an error instead of "no deleted files" for inaccessible trash
|
||||
|
||||
Members of a space who are not allowed to list its trash, for example members
|
||||
with the "Can edit" role, were told that the space has no deleted files, even
|
||||
though files had been deleted. The trash view now tells the user that the
|
||||
deleted files could not be loaded and that they might lack the permission to
|
||||
view them. A trash that is really empty still shows the "no deleted files"
|
||||
message.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/13105
|
||||
@@ -1,13 +0,0 @@
|
||||
Change: Remove the MFA session extension popup in vault mode
|
||||
|
||||
In vault mode, the web UI showed a popup shortly before the multi-factor
|
||||
authentication session was about to expire, offering to extend or dismiss it.
|
||||
Extending only reset a timer in the browser and did not renew anything on the
|
||||
server, so the popup has been removed.
|
||||
|
||||
The frontend service no longer exposes the MFA session duration in its
|
||||
capabilities, and its `session_duration` setting has been removed. The
|
||||
`OCIS_MFA_SESSION_DURATION` environment variable is still used by the proxy
|
||||
service.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/13085
|
||||
@@ -1,12 +0,0 @@
|
||||
Enhancement: Record tag changes in the audit log
|
||||
|
||||
Adding or removing tags on a file or folder left no trace in the audit log.
|
||||
The graph service already publishes `TagsAdded` and `TagsRemoved` events for
|
||||
every change, but only the search service listened to them.
|
||||
|
||||
The audit service now records both: `file_tags_add` and `file_tags_remove`
|
||||
entries carry the acting user, the file id and path, the space owner and the
|
||||
tags concerned. The graph service also sets the timestamp on the two events,
|
||||
which it left empty before.
|
||||
|
||||
https://github.com/owncloud/ocis/issues/13054
|
||||
@@ -1,11 +0,0 @@
|
||||
Enhancement: Default 30-day expiration for vault shares
|
||||
|
||||
When a user or group share of a vault file or folder is created without an
|
||||
expiration date, the server now preconfigures a default expiration (30 days
|
||||
by default, configurable via `GRAPH_DEFAULT_VAULT_SHARE_EXPIRATION_DAYS`) to
|
||||
encourage data minimization. The sharer can override or shorten this value.
|
||||
|
||||
Non-vault shares and space memberships are exempt and stay unbounded, as
|
||||
space memberships represent a permanent organizational role.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/12988
|
||||
@@ -1,13 +0,0 @@
|
||||
Enhancement: Add a --timeout flag to the search index command
|
||||
|
||||
`ocis search index` called the search service with a fixed 10 minute request
|
||||
timeout. The service walks the whole space inside that request, so once the
|
||||
timeout expired the walk was cancelled with "error walking the tree: context
|
||||
canceled" and everything after that point stayed unindexed. A space whose
|
||||
walk takes longer than ten minutes, for example because the content extractor
|
||||
is slow on a few files, could never be fully indexed from the command line.
|
||||
|
||||
The timeout is now a flag. `--timeout` takes a duration (default `10m`, so the
|
||||
behaviour is unchanged out of the box); `0` waits indefinitely.
|
||||
|
||||
https://github.com/owncloud/ocis/issues/13052
|
||||
@@ -67,7 +67,7 @@ require (
|
||||
github.com/open-policy-agent/opa v1.21.1
|
||||
github.com/orcaman/concurrent-map v1.0.0
|
||||
github.com/owncloud/libre-graph-api-go v1.0.5-0.20260216101009-eeac018af245
|
||||
github.com/owncloud/reva/v2 v2.0.0-20261007144855-b8082819aa39
|
||||
github.com/owncloud/reva/v2 v2.0.0-20261007080847-2cb387523ac7
|
||||
github.com/pkg/errors v0.9.1
|
||||
github.com/pkg/xattr v0.4.12
|
||||
github.com/prometheus/client_golang v1.24.1
|
||||
|
||||
@@ -736,8 +736,8 @@ github.com/orcaman/concurrent-map v1.0.0 h1:I/2A2XPCb4IuQWcQhBhSwGfiuybl/J0ev9HD
|
||||
github.com/orcaman/concurrent-map v1.0.0/go.mod h1:Lu3tH6HLW3feq74c2GC+jIMS/K2CFcDWnWD9XkenwhI=
|
||||
github.com/owncloud/libre-graph-api-go v1.0.5-0.20260216101009-eeac018af245 h1:JRidLTAKhnvyLMRtVtSF4lhBa0NSAOs6fof+d6JnKII=
|
||||
github.com/owncloud/libre-graph-api-go v1.0.5-0.20260216101009-eeac018af245/go.mod h1:z61VMGAJRtR1nbgXWiNoCkxUXP1B3Je9rMuJbnGd+Og=
|
||||
github.com/owncloud/reva/v2 v2.0.0-20261007144855-b8082819aa39 h1:lC5Y4C3/i0uDhMLA53+kfDJg919gNbjSe2+FiViP3XM=
|
||||
github.com/owncloud/reva/v2 v2.0.0-20261007144855-b8082819aa39/go.mod h1:cgqg+UTe4ekjMbJj8hgoXSTxQ9fQramKcOUdvsFUrzc=
|
||||
github.com/owncloud/reva/v2 v2.0.0-20261007080847-2cb387523ac7 h1:wIL6E2Lu4hVcU44qa1rjo+dp90++/aQeUe4tAjifRAg=
|
||||
github.com/owncloud/reva/v2 v2.0.0-20261007080847-2cb387523ac7/go.mod h1:cgqg+UTe4ekjMbJj8hgoXSTxQ9fQramKcOUdvsFUrzc=
|
||||
github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c h1:rp5dCmg/yLR3mgFuSOe4oEnDDmGLROTvMragMUXpTQw=
|
||||
github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c/go.mod h1:X07ZCGwUbLaax7L0S3Tw4hpejzu63ZrrQiUe6W0hcy0=
|
||||
github.com/pablodz/inotifywaitgo v0.0.12 h1:DVJJTFMDlSAdO46yisPF2vzozs/r+4k6ih8MVghq78M=
|
||||
|
||||
+11
-6
@@ -7,13 +7,14 @@ import (
|
||||
"github.com/go-ldap/ldap/v3"
|
||||
)
|
||||
|
||||
// EnhanceFilterWithMasterID adds master-ID match clauses to the given LDAP filter with OR.
|
||||
// An empty filter means "no restriction". Do not OR an empty filter with a master-ID clause.
|
||||
// This action would restrict an unrestricted search to the master ID only.
|
||||
// The function returns the filter without a change when masterID is empty, when both
|
||||
// attributes are empty, or when filter is empty.
|
||||
// EnhanceFilterWithMasterID OR's the given LDAP filter with master-id match clauses.
|
||||
// Returns filter unchanged when masterID is empty or both attributes are empty.
|
||||
func EnhanceFilterWithMasterID(filter, masterID, memberAttr, guestAttr string) string {
|
||||
if masterID == "" || (memberAttr == "" && guestAttr == "") || filter == "" {
|
||||
if masterID == "" {
|
||||
return filter
|
||||
}
|
||||
|
||||
if memberAttr == "" && guestAttr == "" {
|
||||
return filter
|
||||
}
|
||||
|
||||
@@ -34,5 +35,9 @@ func EnhanceFilterWithMasterID(filter, masterID, memberAttr, guestAttr string) s
|
||||
masterIDFilter = fmt.Sprintf("(|%s)", strings.Join(masterIDParts, ""))
|
||||
}
|
||||
|
||||
if filter == "" {
|
||||
return masterIDFilter
|
||||
}
|
||||
|
||||
return fmt.Sprintf("(|%s%s)", filter, masterIDFilter)
|
||||
}
|
||||
@@ -54,12 +54,12 @@ func TestEnhanceFilterWithMasterID(t *testing.T) {
|
||||
expectedFilter: "(|(ownCloudGuestOf=instance-1)(ownCloudGuestOf=0000-0000-000-0000))",
|
||||
},
|
||||
{
|
||||
name: "empty existing filter stays unrestricted",
|
||||
name: "empty existing filter",
|
||||
filter: "",
|
||||
masterID: "0000-0000-000-0000",
|
||||
memberAttr: "ownCloudMemberOf",
|
||||
guestAttr: "ownCloudGuestOf",
|
||||
expectedFilter: "",
|
||||
expectedFilter: "(|(ownCloudMemberOf=0000-0000-000-0000)(ownCloudGuestOf=0000-0000-000-0000))",
|
||||
},
|
||||
{
|
||||
name: "LDAP injection protection",
|
||||
|
||||
@@ -46,13 +46,6 @@ func MissingLDAPBindPassword(service string) error {
|
||||
service, defaults.BaseConfigPath())
|
||||
}
|
||||
|
||||
func MissingLDAPUserFilterForMasterID(service string) error {
|
||||
return fmt.Errorf("The ldap user_filter has not been set for %s, but OCIS_MULTI_INSTANCE_MASTER_ID is set. "+
|
||||
"Set an explicit user_filter to scope this instance to its own users. "+
|
||||
"Without a user_filter, every user in the shared LDAP directory can access this instance.",
|
||||
service)
|
||||
}
|
||||
|
||||
func MissingServiceUserPassword(service, serviceUser string) error {
|
||||
return fmt.Errorf("The password of service user %s has not been set properly in your config for %s. "+
|
||||
"Make sure your %s config contains the proper values "+
|
||||
|
||||
@@ -54,8 +54,8 @@ type GRPCClientOptions struct {
|
||||
// which read them independently of each other but apply the same rules, so both behave
|
||||
// identically for every input. Keepalive is off unless the time is set to a duration that
|
||||
// parses; a value without a unit suffix leaves the clients without pings.
|
||||
GRPCClientKeepaliveTime time.Duration `yaml:"grpc_client_keepalive_time" env:"GRPC_CLIENT_KEEPALIVE_TIME" desc:"How long a grpc client connection with an ongoing request may stay silent before the server is pinged to check whether it is still answering. Set a duration like '20s' to enable detection of unresponsive peers. Leaving it unset, or at '0', sends no pings at all, which is grpc's own default. Values below '10s' are raised to '10s' by grpc. Make sure to include the unit suffix, a bare number is not a valid duration." introductionVersion:"9.0.0"`
|
||||
GRPCClientKeepaliveTimeout time.Duration `yaml:"grpc_client_keepalive_timeout" env:"GRPC_CLIENT_KEEPALIVE_TIMEOUT" desc:"How long a grpc client waits for the answer to a keepalive ping before it considers the connection dead and fails all requests on it. Defaults to '10s'. Has no effect unless GRPC_CLIENT_KEEPALIVE_TIME is set. See GRPC_CLIENT_KEEPALIVE_TIME." introductionVersion:"9.0.0"`
|
||||
GRPCClientKeepaliveTime time.Duration `yaml:"grpc_client_keepalive_time" env:"GRPC_CLIENT_KEEPALIVE_TIME" desc:"How long a grpc client connection with an ongoing request may stay silent before the server is pinged to check whether it is still answering. Set a duration like '20s' to enable detection of unresponsive peers. Leaving it unset, or at '0', sends no pings at all, which is grpc's own default. Values below '10s' are raised to '10s' by grpc. Make sure to include the unit suffix, a bare number is not a valid duration." introductionVersion:"8.3.0"`
|
||||
GRPCClientKeepaliveTimeout time.Duration `yaml:"grpc_client_keepalive_timeout" env:"GRPC_CLIENT_KEEPALIVE_TIMEOUT" desc:"How long a grpc client waits for the answer to a keepalive ping before it considers the connection dead and fails all requests on it. Defaults to '10s'. Has no effect unless GRPC_CLIENT_KEEPALIVE_TIME is set. See GRPC_CLIENT_KEEPALIVE_TIME." introductionVersion:"8.3.0"`
|
||||
}
|
||||
|
||||
type GRPCServiceTLS struct {
|
||||
@@ -80,9 +80,9 @@ type Cache struct {
|
||||
DisablePersistence bool `yaml:"disable_persistence" env:"OCIS_CACHE_DISABLE_PERSISTENCE" desc:"Disables persistence of the cache. Only applies when store type 'nats-js-kv' is configured. Defaults to false." introductionVersion:"5.0"`
|
||||
AuthUsername string `yaml:"auth_username" env:"OCIS_CACHE_AUTH_USERNAME" desc:"The username to use for authentication. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"pre5.0"`
|
||||
AuthPassword string `yaml:"auth_password" env:"OCIS_CACHE_AUTH_PASSWORD" desc:"The password to use for authentication. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"pre5.0"`
|
||||
EnableTLS bool `yaml:"enable_tls" env:"OCIS_CACHE_ENABLE_TLS" desc:"Activate TLS for the connection to the NATS store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"9.0.0"`
|
||||
TLSInsecure bool `yaml:"tls_insecure" env:"OCIS_CACHE_TLS_INSECURE" desc:"Disable TLS certificate verification for the NATS store connection. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"9.0.0"`
|
||||
TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OCIS_CACHE_TLS_ROOT_CA_CERTIFICATE" desc:"Path to the PEM-encoded root CA certificate used to validate the NATS store TLS certificate. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"9.0.0"`
|
||||
EnableTLS bool `yaml:"enable_tls" env:"OCIS_CACHE_ENABLE_TLS" desc:"Activate TLS for the connection to the NATS store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
|
||||
TLSInsecure bool `yaml:"tls_insecure" env:"OCIS_CACHE_TLS_INSECURE" desc:"Disable TLS certificate verification for the NATS store connection. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
|
||||
TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OCIS_CACHE_TLS_ROOT_CA_CERTIFICATE" desc:"Path to the PEM-encoded root CA certificate used to validate the NATS store TLS certificate. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
|
||||
}
|
||||
|
||||
// Commons holds configuration that are common to all extensions. Each extension can then decide whether
|
||||
|
||||
@@ -55,9 +55,9 @@ type Store struct {
|
||||
TTL time.Duration `yaml:"ttl" env:"OCIS_PERSISTENT_STORE_TTL;ACTIVITYLOG_STORE_TTL" desc:"Time to live for events in the store. See the Environment Variable Types description for more details." introductionVersion:"pre5.0"`
|
||||
AuthUsername string `yaml:"username" env:"OCIS_PERSISTENT_STORE_AUTH_USERNAME;ACTIVITYLOG_STORE_AUTH_USERNAME" desc:"The username to authenticate with the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"5.0"`
|
||||
AuthPassword string `yaml:"password" env:"OCIS_PERSISTENT_STORE_AUTH_PASSWORD;ACTIVITYLOG_STORE_AUTH_PASSWORD" desc:"The password to authenticate with the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"5.0"`
|
||||
EnableTLS bool `yaml:"enable_tls" env:"OCIS_PERSISTENT_STORE_ENABLE_TLS;ACTIVITYLOG_STORE_ENABLE_TLS" desc:"Activate TLS for the connection to the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"9.0.0"`
|
||||
TLSInsecure bool `yaml:"tls_insecure" env:"OCIS_PERSISTENT_STORE_TLS_INSECURE;ACTIVITYLOG_STORE_TLS_INSECURE" desc:"Disable TLS certificate verification for the store connection. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"9.0.0"`
|
||||
TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OCIS_PERSISTENT_STORE_TLS_ROOT_CA_CERTIFICATE;ACTIVITYLOG_STORE_TLS_ROOT_CA_CERTIFICATE" desc:"Path to the PEM-encoded root CA certificate for the store TLS connection. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"9.0.0"`
|
||||
EnableTLS bool `yaml:"enable_tls" env:"OCIS_PERSISTENT_STORE_ENABLE_TLS;ACTIVITYLOG_STORE_ENABLE_TLS" desc:"Activate TLS for the connection to the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
|
||||
TLSInsecure bool `yaml:"tls_insecure" env:"OCIS_PERSISTENT_STORE_TLS_INSECURE;ACTIVITYLOG_STORE_TLS_INSECURE" desc:"Disable TLS certificate verification for the store connection. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
|
||||
TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OCIS_PERSISTENT_STORE_TLS_ROOT_CA_CERTIFICATE;ACTIVITYLOG_STORE_TLS_ROOT_CA_CERTIFICATE" desc:"Path to the PEM-encoded root CA certificate for the store TLS connection. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
|
||||
}
|
||||
|
||||
// ServiceAccount is the configuration for the used service account
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
|
||||
The audit service logs all events of the system as an audit log. Per default, it will be logged to standard out, but can also be configured to a file output. Supported log formats are json or a minimal human-readable format.
|
||||
|
||||
Besides shares, links, files, spaces, users and groups, tag changes are recorded: adding tags to a file or folder is logged as `file_tags_add` and removing them as `file_tags_remove`, each with the acting user, the file id and the tags as requested. The request is recorded as made: a tag that was already present (or, for a removal, absent) is still listed, so repeated requests remain visible.
|
||||
|
||||
With audit logs, you are able to prove compliance with corporate guidelines as well as to enable reporting and auditing of operations. The audit service takes note of actions conducted by users and administrators.
|
||||
|
||||
Example minimal format:
|
||||
|
||||
@@ -83,10 +83,6 @@ func StartAuditLogger(ctx context.Context, ch <-chan events.Event, log log.Logge
|
||||
auditEvent = types.ItemRestored(ev)
|
||||
case events.FileVersionRestored:
|
||||
auditEvent = types.FileVersionRestored(ev)
|
||||
case events.TagsAdded:
|
||||
auditEvent = types.TagsAdded(ev)
|
||||
case events.TagsRemoved:
|
||||
auditEvent = types.TagsRemoved(ev)
|
||||
case events.SpaceCreated:
|
||||
auditEvent = types.SpaceCreated(ev)
|
||||
case events.SpaceRenamed:
|
||||
|
||||
@@ -325,7 +325,7 @@ var testCases = []struct {
|
||||
Event: events.FileUploaded{
|
||||
Executant: userID("uid-123"),
|
||||
Ref: reference("pro-1", "sto-123", "iid-123", "./item"),
|
||||
Owner: userID("uid-owner"),
|
||||
Owner: userID("uid-123"), // NOTE: owner not yet implemented in reva
|
||||
},
|
||||
},
|
||||
CheckAuditEvent: func(t *testing.T, b []byte) {
|
||||
@@ -335,7 +335,7 @@ var testCases = []struct {
|
||||
// AuditEvent fields
|
||||
checkBaseAuditEvent(t, ev.AuditEvent, "uid-123", "", "user 'uid-123' created file 'pro-1$sto-123!iid-123/item'", "file_create")
|
||||
// AuditEventSharing fields
|
||||
checkFilesAuditEvent(t, ev.AuditEventFiles, "pro-1$sto-123!iid-123/item", "uid-owner", "./item")
|
||||
checkFilesAuditEvent(t, ev.AuditEventFiles, "pro-1$sto-123!iid-123/item", "uid-123", "./item")
|
||||
},
|
||||
}, {
|
||||
Alias: "File read",
|
||||
@@ -343,7 +343,7 @@ var testCases = []struct {
|
||||
Event: events.FileDownloaded{
|
||||
Executant: userID("uid-123"),
|
||||
Ref: reference("pro-1", "sto-123", "iid-123", "./item"),
|
||||
Owner: userID("uid-owner"),
|
||||
Owner: userID("uid-123"), // NOTE: owner not yet implemented in reva
|
||||
},
|
||||
},
|
||||
CheckAuditEvent: func(t *testing.T, b []byte) {
|
||||
@@ -353,7 +353,7 @@ var testCases = []struct {
|
||||
// AuditEvent fields
|
||||
checkBaseAuditEvent(t, ev.AuditEvent, "uid-123", "", "user 'uid-123' read file 'pro-1$sto-123!iid-123/item'", "file_read")
|
||||
// AuditEventSharing fields
|
||||
checkFilesAuditEvent(t, ev.AuditEventFiles, "pro-1$sto-123!iid-123/item", "uid-owner", "./item")
|
||||
checkFilesAuditEvent(t, ev.AuditEventFiles, "pro-1$sto-123!iid-123/item", "uid-123", "./item")
|
||||
},
|
||||
}, {
|
||||
Alias: "File trashed",
|
||||
@@ -361,7 +361,7 @@ var testCases = []struct {
|
||||
Event: events.ItemTrashed{
|
||||
Executant: userID("uid-123"),
|
||||
Ref: reference("pro-1", "sto-123", "iid-123", "./item"),
|
||||
Owner: userID("uid-owner"),
|
||||
Owner: userID("uid-123"), // NOTE: owner not yet implemented in reva
|
||||
},
|
||||
},
|
||||
CheckAuditEvent: func(t *testing.T, b []byte) {
|
||||
@@ -371,7 +371,7 @@ var testCases = []struct {
|
||||
// AuditEvent fields
|
||||
checkBaseAuditEvent(t, ev.AuditEvent, "uid-123", "", "user 'uid-123' trashed file 'pro-1$sto-123!iid-123/item'", "file_delete")
|
||||
// AuditEventSharing fields
|
||||
checkFilesAuditEvent(t, ev.AuditEventFiles, "pro-1$sto-123!iid-123/item", "uid-owner", "./item")
|
||||
checkFilesAuditEvent(t, ev.AuditEventFiles, "pro-1$sto-123!iid-123/item", "uid-123", "./item")
|
||||
},
|
||||
}, {
|
||||
Alias: "File renamed",
|
||||
@@ -380,7 +380,7 @@ var testCases = []struct {
|
||||
Executant: userID("uid-123"),
|
||||
Ref: reference("pro-1", "sto-123", "iid-123", "./item"),
|
||||
OldReference: reference("pro-1", "sto-123", "iid-123", "./anotheritem"),
|
||||
Owner: userID("uid-owner"),
|
||||
Owner: userID("uid-123"), // NOTE: owner not yet implemented in reva
|
||||
},
|
||||
},
|
||||
CheckAuditEvent: func(t *testing.T, b []byte) {
|
||||
@@ -390,7 +390,7 @@ var testCases = []struct {
|
||||
// AuditEvent fields
|
||||
checkBaseAuditEvent(t, ev.AuditEvent, "uid-123", "", "user 'uid-123' moved file 'pro-1$sto-123!iid-123/item' from './anotheritem' to './item'", "file_rename")
|
||||
// AuditEventSharing fields
|
||||
checkFilesAuditEvent(t, ev.AuditEventFiles, "pro-1$sto-123!iid-123/item", "uid-owner", "./item")
|
||||
checkFilesAuditEvent(t, ev.AuditEventFiles, "pro-1$sto-123!iid-123/item", "uid-123", "./item")
|
||||
// AuditEventFileRenamed fields
|
||||
require.Equal(t, "./anotheritem", ev.OldPath)
|
||||
|
||||
@@ -401,7 +401,7 @@ var testCases = []struct {
|
||||
Event: events.ItemPurged{
|
||||
Executant: userID("uid-123"),
|
||||
Ref: reference("pro-1", "sto-123", "iid-123", "./item"),
|
||||
Owner: userID("uid-owner"),
|
||||
Owner: userID("uid-123"), // NOTE: owner not yet implemented in reva
|
||||
},
|
||||
},
|
||||
CheckAuditEvent: func(t *testing.T, b []byte) {
|
||||
@@ -411,7 +411,7 @@ var testCases = []struct {
|
||||
// AuditEvent fields
|
||||
checkBaseAuditEvent(t, ev.AuditEvent, "uid-123", "", "user 'uid-123' removed file 'pro-1$sto-123!iid-123/item' from trashbin", "file_trash_delete")
|
||||
// AuditEventSharing fields
|
||||
checkFilesAuditEvent(t, ev.AuditEventFiles, "pro-1$sto-123!iid-123/item", "uid-owner", "./item")
|
||||
checkFilesAuditEvent(t, ev.AuditEventFiles, "pro-1$sto-123!iid-123/item", "uid-123", "./item")
|
||||
},
|
||||
}, {
|
||||
Alias: "File restored",
|
||||
@@ -419,7 +419,7 @@ var testCases = []struct {
|
||||
Event: events.ItemRestored{
|
||||
Executant: userID("uid-123"),
|
||||
Ref: reference("pro-1", "sto-123", "iid-123", "./item"),
|
||||
Owner: userID("uid-owner"),
|
||||
Owner: userID("uid-123"), // NOTE: owner not yet implemented in reva
|
||||
OldReference: reference("pro-1", "sto-123", "sto-123!iid-123/item", "./oldpath"),
|
||||
Key: "",
|
||||
},
|
||||
@@ -431,7 +431,7 @@ var testCases = []struct {
|
||||
// AuditEvent fields
|
||||
checkBaseAuditEvent(t, ev.AuditEvent, "uid-123", "", "user 'uid-123' restored file 'pro-1$sto-123!iid-123/item' from trashbin to './item'", "file_trash_restore")
|
||||
// AuditEventSharing fields
|
||||
checkFilesAuditEvent(t, ev.AuditEventFiles, "pro-1$sto-123!iid-123/item", "uid-owner", "./item")
|
||||
checkFilesAuditEvent(t, ev.AuditEventFiles, "pro-1$sto-123!iid-123/item", "uid-123", "./item")
|
||||
// AuditEventFileRestored fields
|
||||
require.Equal(t, "./oldpath", ev.OldPath)
|
||||
|
||||
@@ -442,7 +442,7 @@ var testCases = []struct {
|
||||
Event: events.FileVersionRestored{
|
||||
Executant: userID("uid-123"),
|
||||
Ref: reference("pro-1", "sto-123", "iid-123", "./item"),
|
||||
Owner: userID("uid-owner"),
|
||||
Owner: userID("uid-123"), // NOTE: owner not yet implemented in reva
|
||||
Key: "v1",
|
||||
},
|
||||
},
|
||||
@@ -453,7 +453,7 @@ var testCases = []struct {
|
||||
// AuditEvent fields
|
||||
checkBaseAuditEvent(t, ev.AuditEvent, "uid-123", "", "user 'uid-123' restored file 'pro-1$sto-123!iid-123/item' in version 'v1'", "file_version_restore")
|
||||
// AuditEventSharing fields
|
||||
checkFilesAuditEvent(t, ev.AuditEventFiles, "pro-1$sto-123!iid-123/item", "uid-owner", "./item")
|
||||
checkFilesAuditEvent(t, ev.AuditEventFiles, "pro-1$sto-123!iid-123/item", "uid-123", "./item")
|
||||
// AuditEventFileRestored fields
|
||||
require.Equal(t, "v1", ev.Key)
|
||||
|
||||
@@ -464,7 +464,7 @@ var testCases = []struct {
|
||||
Event: events.SpaceCreated{
|
||||
Executant: userID("uid-123"),
|
||||
ID: &provider.StorageSpaceId{OpaqueId: "storage-1$space-123"},
|
||||
Owner: userID("uid-owner"),
|
||||
Owner: userID("uid-123"),
|
||||
Root: resourceID("pro-1", "sto-123", "iid-123"),
|
||||
Name: "test-space",
|
||||
Type: "project",
|
||||
@@ -477,11 +477,11 @@ var testCases = []struct {
|
||||
require.NoError(t, json.Unmarshal(b, &ev))
|
||||
|
||||
// AuditEvent fields
|
||||
checkBaseAuditEvent(t, ev.AuditEvent, "uid-123", "2286-11-20T17:46:40Z", "user 'uid-123' created a space 'space-123' with name 'test-space' (storage: 'storage-1')", "space_created")
|
||||
checkBaseAuditEvent(t, ev.AuditEvent, "", "2286-11-20T17:46:40Z", "user 'uid-123' created a space 'space-123' with name 'test-space' (storage: 'storage-1')", "space_created")
|
||||
// AuditEventSpaces fields
|
||||
checkSpacesAuditEvent(t, ev.AuditEventSpaces, "storage-1$space-123")
|
||||
// AuditEventFileRestored fields
|
||||
require.Equal(t, "uid-owner", ev.Owner)
|
||||
require.Equal(t, "uid-123", ev.Owner)
|
||||
require.Equal(t, "pro-1$sto-123!iid-123", ev.RootItem)
|
||||
require.Equal(t, "test-space", ev.Name)
|
||||
require.Equal(t, "project", ev.Type)
|
||||
@@ -492,7 +492,7 @@ var testCases = []struct {
|
||||
Event: events.SpaceRenamed{
|
||||
Executant: userID("uid-123"),
|
||||
ID: &provider.StorageSpaceId{OpaqueId: "storage-1$space-123"},
|
||||
Owner: userID("uid-owner"),
|
||||
Owner: userID("uid-123"),
|
||||
Name: "new-name",
|
||||
},
|
||||
},
|
||||
@@ -501,7 +501,7 @@ var testCases = []struct {
|
||||
require.NoError(t, json.Unmarshal(b, &ev))
|
||||
|
||||
// AuditEvent fields
|
||||
checkBaseAuditEvent(t, ev.AuditEvent, "uid-123", "", "user 'uid-123' renamed space 'space-123' to 'new-name' (storage: 'storage-1')", "space_renamed")
|
||||
checkBaseAuditEvent(t, ev.AuditEvent, "", "", "user 'uid-123' renamed space 'space-123' to 'new-name' (storage: 'storage-1')", "space_renamed")
|
||||
// AuditEventSpaces fields
|
||||
checkSpacesAuditEvent(t, ev.AuditEventSpaces, "storage-1$space-123")
|
||||
// AuditEventSpaceRenamed fields
|
||||
@@ -520,7 +520,7 @@ var testCases = []struct {
|
||||
require.NoError(t, json.Unmarshal(b, &ev))
|
||||
|
||||
// AuditEvent fields
|
||||
checkBaseAuditEvent(t, ev.AuditEvent, "uid-123", "0001-01-01T00:00:00Z", "user 'uid-123' disabled the space 'space-123' (storage: 'storage-1')", "space_disabled")
|
||||
checkBaseAuditEvent(t, ev.AuditEvent, "", "0001-01-01T00:00:00Z", "user 'uid-123' disabled the space 'space-123' (storage: 'storage-1')", "space_disabled")
|
||||
// AuditEventSpaces fields
|
||||
checkSpacesAuditEvent(t, ev.AuditEventSpaces, "storage-1$space-123")
|
||||
},
|
||||
@@ -537,7 +537,7 @@ var testCases = []struct {
|
||||
require.NoError(t, json.Unmarshal(b, &ev))
|
||||
|
||||
// AuditEvent fields
|
||||
checkBaseAuditEvent(t, ev.AuditEvent, "uid-123", "", "user 'uid-123' (re-) enabled the space 'space-123' (storage: 'storage-1')", "space_enabled")
|
||||
checkBaseAuditEvent(t, ev.AuditEvent, "", "", "user 'uid-123' (re-) enabled the space 'space-123' (storage: 'storage-1')", "space_enabled")
|
||||
// AuditEventSpaces fields
|
||||
checkSpacesAuditEvent(t, ev.AuditEventSpaces, "storage-1$space-123")
|
||||
},
|
||||
@@ -555,7 +555,7 @@ var testCases = []struct {
|
||||
require.NoError(t, json.Unmarshal(b, &ev))
|
||||
|
||||
// AuditEvent fields
|
||||
checkBaseAuditEvent(t, ev.AuditEvent, "uid-123", "0001-01-01T00:00:00Z", "user 'uid-123' deleted the space 'space-123' with name 'test-space' (storage: 'storage-1')", "space_deleted")
|
||||
checkBaseAuditEvent(t, ev.AuditEvent, "", "0001-01-01T00:00:00Z", "user 'uid-123' deleted the space 'space-123' with name 'test-space' (storage: 'storage-1')", "space_deleted")
|
||||
// AuditEventSpaces fields
|
||||
checkSpacesAuditEvent(t, ev.AuditEventSpaces, "storage-1$space-123")
|
||||
},
|
||||
@@ -587,92 +587,6 @@ var testCases = []struct {
|
||||
require.Equal(t, "http://ocis.test/invite", ev.InviteLink)
|
||||
},
|
||||
},
|
||||
{
|
||||
Alias: "User created",
|
||||
SystemEvent: events.Event{
|
||||
Event: events.UserCreated{
|
||||
Executant: userID("uid-admin"),
|
||||
UserID: "uid-new",
|
||||
Timestamp: timestamp(10e8),
|
||||
},
|
||||
},
|
||||
CheckAuditEvent: func(t *testing.T, b []byte) {
|
||||
ev := types.AuditEventUserCreated{}
|
||||
require.NoError(t, json.Unmarshal(b, &ev))
|
||||
|
||||
// AuditEvent fields: User is the actor, not the affected user
|
||||
checkBaseAuditEvent(t, ev.AuditEvent, "uid-admin", "2001-09-09T01:46:40Z", "user 'uid-admin' created the user 'uid-new'", "user_created")
|
||||
// AuditEventUserCreated fields
|
||||
require.Equal(t, "uid-new", ev.UserID)
|
||||
},
|
||||
},
|
||||
{
|
||||
Alias: "Group member added",
|
||||
SystemEvent: events.Event{
|
||||
Event: events.GroupMemberAdded{
|
||||
Executant: userID("uid-admin"),
|
||||
GroupID: "gid-123",
|
||||
UserID: "uid-member",
|
||||
Timestamp: timestamp(10e8),
|
||||
},
|
||||
},
|
||||
CheckAuditEvent: func(t *testing.T, b []byte) {
|
||||
ev := types.AuditEventGroupMemberAdded{}
|
||||
require.NoError(t, json.Unmarshal(b, &ev))
|
||||
|
||||
// AuditEvent fields: User is the actor, not the member
|
||||
checkBaseAuditEvent(t, ev.AuditEvent, "uid-admin", "2001-09-09T01:46:40Z", "user 'uid-admin' added user 'uid-member' was added to group 'gid-123'", "group_member_added")
|
||||
// AuditEventGroupMemberAdded fields
|
||||
require.Equal(t, "gid-123", ev.GroupID)
|
||||
require.Equal(t, "uid-member", ev.UserID)
|
||||
},
|
||||
},
|
||||
{
|
||||
Alias: "Tags added",
|
||||
SystemEvent: events.Event{
|
||||
Event: events.TagsAdded{
|
||||
Executant: userID("uid-123"),
|
||||
SpaceOwner: userID("uid-owner"),
|
||||
Ref: reference("pro-1", "sto-123", "iid-123", "./item"),
|
||||
Tags: "holiday,family",
|
||||
Timestamp: timestamp(10e8),
|
||||
},
|
||||
},
|
||||
CheckAuditEvent: func(t *testing.T, b []byte) {
|
||||
ev := types.AuditEventTagsAdded{}
|
||||
require.NoError(t, json.Unmarshal(b, &ev))
|
||||
|
||||
// AuditEvent fields: User is the actor, Owner the space owner
|
||||
checkBaseAuditEvent(t, ev.AuditEvent, "uid-123", "2001-09-09T01:46:40Z", "user 'uid-123' added tags 'holiday,family' to file 'pro-1$sto-123!iid-123/item'", "file_tags_add")
|
||||
// AuditEventFiles fields
|
||||
checkFilesAuditEvent(t, ev.AuditEventFiles, "pro-1$sto-123!iid-123/item", "uid-owner", "./item")
|
||||
// AuditEventTagsAdded fields
|
||||
require.Equal(t, "holiday,family", ev.Tags)
|
||||
},
|
||||
},
|
||||
{
|
||||
Alias: "Tags removed",
|
||||
SystemEvent: events.Event{
|
||||
Event: events.TagsRemoved{
|
||||
Executant: userID("uid-123"),
|
||||
SpaceOwner: userID("uid-owner"),
|
||||
Ref: reference("pro-1", "sto-123", "iid-123", "./item"),
|
||||
Tags: "holiday",
|
||||
Timestamp: timestamp(10e8),
|
||||
},
|
||||
},
|
||||
CheckAuditEvent: func(t *testing.T, b []byte) {
|
||||
ev := types.AuditEventTagsRemoved{}
|
||||
require.NoError(t, json.Unmarshal(b, &ev))
|
||||
|
||||
// AuditEvent fields: User is the actor, Owner the space owner
|
||||
checkBaseAuditEvent(t, ev.AuditEvent, "uid-123", "2001-09-09T01:46:40Z", "user 'uid-123' removed tags 'holiday' from file 'pro-1$sto-123!iid-123/item'", "file_tags_remove")
|
||||
// AuditEventFiles fields
|
||||
checkFilesAuditEvent(t, ev.AuditEventFiles, "pro-1$sto-123!iid-123/item", "uid-owner", "./item")
|
||||
// AuditEventTagsRemoved fields
|
||||
require.Equal(t, "holiday", ev.Tags)
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
func TestAuditLogging(t *testing.T) {
|
||||
|
||||
@@ -247,7 +247,7 @@ func FilesAuditEvent(base AuditEvent, itemid, owner, path string) AuditEventFile
|
||||
// ContainerCreated converts a ContainerCreated event to an AuditEventContainerCreated
|
||||
func ContainerCreated(ev events.ContainerCreated) AuditEventContainerCreated {
|
||||
iid, path, uid := extractFileDetails(ev.Ref, ev.Owner)
|
||||
base := BasicAuditEvent(ev.Executant.GetOpaqueId(), formatTime(ev.Timestamp), MessageContainerCreated(ev.Executant.GetOpaqueId(), iid), ActionContainerCreated)
|
||||
base := BasicAuditEvent(uid, formatTime(ev.Timestamp), MessageContainerCreated(ev.Executant.GetOpaqueId(), iid), ActionContainerCreated)
|
||||
return AuditEventContainerCreated{
|
||||
AuditEventFiles: FilesAuditEvent(base, iid, uid, path),
|
||||
}
|
||||
@@ -256,7 +256,7 @@ func ContainerCreated(ev events.ContainerCreated) AuditEventContainerCreated {
|
||||
// FileUploaded converts a FileUploaded event to an AuditEventFileCreated
|
||||
func FileUploaded(ev events.FileUploaded) AuditEventFileCreated {
|
||||
iid, path, uid := extractFileDetails(ev.Ref, ev.Owner)
|
||||
base := BasicAuditEvent(ev.Executant.GetOpaqueId(), formatTime(ev.Timestamp), MessageFileCreated(ev.Executant.GetOpaqueId(), iid), ActionFileCreated)
|
||||
base := BasicAuditEvent(uid, formatTime(ev.Timestamp), MessageFileCreated(ev.Executant.GetOpaqueId(), iid), ActionFileCreated)
|
||||
return AuditEventFileCreated{
|
||||
AuditEventFiles: FilesAuditEvent(base, iid, uid, path),
|
||||
}
|
||||
@@ -265,7 +265,7 @@ func FileUploaded(ev events.FileUploaded) AuditEventFileCreated {
|
||||
// FileDownloaded converts a FileDownloaded event to an AuditEventFileRead
|
||||
func FileDownloaded(ev events.FileDownloaded) AuditEventFileRead {
|
||||
iid, path, uid := extractFileDetails(ev.Ref, ev.Owner)
|
||||
base := BasicAuditEvent(ev.Executant.GetOpaqueId(), formatTime(ev.Timestamp), MessageFileRead(ev.Executant.GetOpaqueId(), iid), ActionFileRead)
|
||||
base := BasicAuditEvent(uid, formatTime(ev.Timestamp), MessageFileRead(ev.Executant.GetOpaqueId(), iid), ActionFileRead)
|
||||
return AuditEventFileRead{
|
||||
AuditEventFiles: FilesAuditEvent(base, iid, uid, path),
|
||||
}
|
||||
@@ -280,7 +280,7 @@ func ItemMoved(ev events.ItemMoved) AuditEventFileRenamed {
|
||||
oldpath = ev.OldReference.GetPath()
|
||||
}
|
||||
|
||||
base := BasicAuditEvent(ev.Executant.GetOpaqueId(), formatTime(ev.Timestamp), MessageFileRenamed(ev.Executant.GetOpaqueId(), iid, oldpath, path), ActionFileRenamed)
|
||||
base := BasicAuditEvent(uid, formatTime(ev.Timestamp), MessageFileRenamed(ev.Executant.GetOpaqueId(), iid, oldpath, path), ActionFileRenamed)
|
||||
return AuditEventFileRenamed{
|
||||
AuditEventFiles: FilesAuditEvent(base, iid, uid, path),
|
||||
OldPath: oldpath,
|
||||
@@ -290,7 +290,7 @@ func ItemMoved(ev events.ItemMoved) AuditEventFileRenamed {
|
||||
// ItemTrashed converts a ItemTrashed event to an AuditEventFileDeleted
|
||||
func ItemTrashed(ev events.ItemTrashed) AuditEventFileDeleted {
|
||||
iid, path, uid := extractFileDetails(ev.Ref, ev.Owner)
|
||||
base := BasicAuditEvent(ev.Executant.GetOpaqueId(), formatTime(ev.Timestamp), MessageFileTrashed(ev.Executant.GetOpaqueId(), iid), ActionFileTrashed)
|
||||
base := BasicAuditEvent(uid, formatTime(ev.Timestamp), MessageFileTrashed(ev.Executant.GetOpaqueId(), iid), ActionFileTrashed)
|
||||
return AuditEventFileDeleted{
|
||||
AuditEventFiles: FilesAuditEvent(base, iid, uid, path),
|
||||
}
|
||||
@@ -299,7 +299,7 @@ func ItemTrashed(ev events.ItemTrashed) AuditEventFileDeleted {
|
||||
// ItemPurged converts a ItemPurged event to an AuditEventFilePurged
|
||||
func ItemPurged(ev events.ItemPurged) AuditEventFilePurged {
|
||||
iid, path, uid := extractFileDetails(ev.Ref, ev.Owner)
|
||||
base := BasicAuditEvent(ev.Executant.GetOpaqueId(), formatTime(ev.Timestamp), MessageFilePurged(ev.Executant.GetOpaqueId(), iid), ActionFilePurged)
|
||||
base := BasicAuditEvent(uid, formatTime(ev.Timestamp), MessageFilePurged(ev.Executant.GetOpaqueId(), iid), ActionFilePurged)
|
||||
return AuditEventFilePurged{
|
||||
AuditEventFiles: FilesAuditEvent(base, iid, uid, path),
|
||||
}
|
||||
@@ -314,7 +314,7 @@ func ItemRestored(ev events.ItemRestored) AuditEventFileRestored {
|
||||
oldpath = ev.OldReference.GetPath()
|
||||
}
|
||||
|
||||
base := BasicAuditEvent(ev.Executant.GetOpaqueId(), formatTime(ev.Timestamp), MessageFileRestored(ev.Executant.GetOpaqueId(), iid, path), ActionFileRestored)
|
||||
base := BasicAuditEvent(uid, formatTime(ev.Timestamp), MessageFileRestored(ev.Executant.GetOpaqueId(), iid, path), ActionFileRestored)
|
||||
return AuditEventFileRestored{
|
||||
AuditEventFiles: FilesAuditEvent(base, iid, uid, path),
|
||||
OldPath: oldpath,
|
||||
@@ -324,37 +324,13 @@ func ItemRestored(ev events.ItemRestored) AuditEventFileRestored {
|
||||
// FileVersionRestored converts a FileVersionRestored event to an AuditEventFileVersionRestored
|
||||
func FileVersionRestored(ev events.FileVersionRestored) AuditEventFileVersionRestored {
|
||||
iid, path, uid := extractFileDetails(ev.Ref, ev.Owner)
|
||||
base := BasicAuditEvent(ev.Executant.GetOpaqueId(), formatTime(ev.Timestamp), MessageFileVersionRestored(ev.Executant.GetOpaqueId(), iid, ev.Key), ActionFileVersionRestored)
|
||||
base := BasicAuditEvent(uid, formatTime(ev.Timestamp), MessageFileVersionRestored(ev.Executant.GetOpaqueId(), iid, ev.Key), ActionFileVersionRestored)
|
||||
return AuditEventFileVersionRestored{
|
||||
AuditEventFiles: FilesAuditEvent(base, iid, uid, path),
|
||||
Key: ev.Key,
|
||||
}
|
||||
}
|
||||
|
||||
// TagsAdded converts a TagsAdded event to an AuditEventTagsAdded.
|
||||
// Unlike the other file events, User is the executant (who changed the tags), not the
|
||||
// space owner: tags are usually changed by someone other than the owner, and the
|
||||
// owner is still recorded in the Owner field.
|
||||
func TagsAdded(ev events.TagsAdded) AuditEventTagsAdded {
|
||||
iid, path, owner := extractFileDetails(ev.Ref, ev.SpaceOwner)
|
||||
base := BasicAuditEvent(ev.Executant.GetOpaqueId(), formatTime(ev.Timestamp), MessageTagsAdded(ev.Executant.GetOpaqueId(), ev.Tags, iid), ActionTagsAdded)
|
||||
return AuditEventTagsAdded{
|
||||
AuditEventFiles: FilesAuditEvent(base, iid, owner, path),
|
||||
Tags: ev.Tags,
|
||||
}
|
||||
}
|
||||
|
||||
// TagsRemoved converts a TagsRemoved event to an AuditEventTagsRemoved.
|
||||
// User is the executant, as in TagsAdded.
|
||||
func TagsRemoved(ev events.TagsRemoved) AuditEventTagsRemoved {
|
||||
iid, path, owner := extractFileDetails(ev.Ref, ev.SpaceOwner)
|
||||
base := BasicAuditEvent(ev.Executant.GetOpaqueId(), formatTime(ev.Timestamp), MessageTagsRemoved(ev.Executant.GetOpaqueId(), ev.Tags, iid), ActionTagsRemoved)
|
||||
return AuditEventTagsRemoved{
|
||||
AuditEventFiles: FilesAuditEvent(base, iid, owner, path),
|
||||
Tags: ev.Tags,
|
||||
}
|
||||
}
|
||||
|
||||
// SpacesAuditEvent creates an AuditEventSpaces from the given values
|
||||
func SpacesAuditEvent(base AuditEvent, spaceID string) AuditEventSpaces {
|
||||
return AuditEventSpaces{
|
||||
@@ -367,7 +343,7 @@ func SpacesAuditEvent(base AuditEvent, spaceID string) AuditEventSpaces {
|
||||
func SpaceCreated(ev events.SpaceCreated) AuditEventSpaceCreated {
|
||||
sid := ev.ID.GetOpaqueId()
|
||||
iid, _, owner := extractFileDetails(&provider.Reference{ResourceId: ev.Root}, ev.Owner)
|
||||
base := BasicAuditEvent(ev.Executant.GetOpaqueId(), formatTime(ev.MTime), MessageSpaceCreated(ev.Executant.GetOpaqueId(), sid, ev.Name), ActionSpaceCreated)
|
||||
base := BasicAuditEvent("", formatTime(ev.MTime), MessageSpaceCreated(ev.Executant.GetOpaqueId(), sid, ev.Name), ActionSpaceCreated)
|
||||
return AuditEventSpaceCreated{
|
||||
AuditEventSpaces: SpacesAuditEvent(base, sid),
|
||||
Owner: owner,
|
||||
@@ -380,7 +356,7 @@ func SpaceCreated(ev events.SpaceCreated) AuditEventSpaceCreated {
|
||||
// SpaceRenamed converts a SpaceRenamed event to an AuditEventSpaceRenamed
|
||||
func SpaceRenamed(ev events.SpaceRenamed) AuditEventSpaceRenamed {
|
||||
sid := ev.ID.GetOpaqueId()
|
||||
base := BasicAuditEvent(ev.Executant.GetOpaqueId(), formatTime(ev.Timestamp), MessageSpaceRenamed(ev.Executant.GetOpaqueId(), sid, ev.Name), ActionSpaceRenamed)
|
||||
base := BasicAuditEvent("", formatTime(ev.Timestamp), MessageSpaceRenamed(ev.Executant.GetOpaqueId(), sid, ev.Name), ActionSpaceRenamed)
|
||||
return AuditEventSpaceRenamed{
|
||||
AuditEventSpaces: SpacesAuditEvent(base, sid),
|
||||
NewName: ev.Name,
|
||||
@@ -390,7 +366,7 @@ func SpaceRenamed(ev events.SpaceRenamed) AuditEventSpaceRenamed {
|
||||
// SpaceDisabled converts a SpaceDisabled event to an AuditEventSpaceDisabled
|
||||
func SpaceDisabled(ev events.SpaceDisabled) AuditEventSpaceDisabled {
|
||||
sid := ev.ID.GetOpaqueId()
|
||||
base := BasicAuditEvent(ev.Executant.GetOpaqueId(), formatTime(utils.TimeToTS(ev.Timestamp)), MessageSpaceDisabled(ev.Executant.GetOpaqueId(), sid), ActionSpaceDisabled)
|
||||
base := BasicAuditEvent("", formatTime(utils.TimeToTS(ev.Timestamp)), MessageSpaceDisabled(ev.Executant.GetOpaqueId(), sid), ActionSpaceDisabled)
|
||||
return AuditEventSpaceDisabled{
|
||||
AuditEventSpaces: SpacesAuditEvent(base, sid),
|
||||
}
|
||||
@@ -399,7 +375,7 @@ func SpaceDisabled(ev events.SpaceDisabled) AuditEventSpaceDisabled {
|
||||
// SpaceEnabled converts a SpaceEnabled event to an AuditEventSpaceEnabled
|
||||
func SpaceEnabled(ev events.SpaceEnabled) AuditEventSpaceEnabled {
|
||||
sid := ev.ID.GetOpaqueId()
|
||||
base := BasicAuditEvent(ev.Executant.GetOpaqueId(), formatTime(ev.Timestamp), MessageSpaceEnabled(ev.Executant.GetOpaqueId(), sid), ActionSpaceEnabled)
|
||||
base := BasicAuditEvent("", formatTime(ev.Timestamp), MessageSpaceEnabled(ev.Executant.GetOpaqueId(), sid), ActionSpaceEnabled)
|
||||
return AuditEventSpaceEnabled{
|
||||
AuditEventSpaces: SpacesAuditEvent(base, sid),
|
||||
}
|
||||
@@ -408,7 +384,7 @@ func SpaceEnabled(ev events.SpaceEnabled) AuditEventSpaceEnabled {
|
||||
// SpaceDeleted converts a SpaceDeleted event to an AuditEventSpaceDeleted
|
||||
func SpaceDeleted(ev events.SpaceDeleted) AuditEventSpaceDeleted {
|
||||
sid := ev.ID.GetOpaqueId()
|
||||
base := BasicAuditEvent(ev.Executant.GetOpaqueId(), formatTime(utils.TimeToTS(ev.Timestamp)), MessageSpaceDeleted(ev.Executant.GetOpaqueId(), sid, ev.SpaceName), ActionSpaceDeleted)
|
||||
base := BasicAuditEvent("", formatTime(utils.TimeToTS(ev.Timestamp)), MessageSpaceDeleted(ev.Executant.GetOpaqueId(), sid, ev.SpaceName), ActionSpaceDeleted)
|
||||
return AuditEventSpaceDeleted{
|
||||
AuditEventSpaces: SpacesAuditEvent(base, sid),
|
||||
}
|
||||
@@ -427,7 +403,7 @@ func SpaceShared(ev events.SpaceShared) AuditEventSpaceShared {
|
||||
sse.GranteeGroupID = ev.GranteeGroupID.OpaqueId
|
||||
grantee = "group:" + ev.GranteeGroupID.OpaqueId
|
||||
}
|
||||
base := BasicAuditEvent(ev.Executant.GetOpaqueId(), "", MessageSpaceShared(ev.Executant.GetOpaqueId(), sid, grantee), ActionSpaceShared)
|
||||
base := BasicAuditEvent("", "", MessageSpaceShared(ev.Executant.GetOpaqueId(), sid, grantee), ActionSpaceShared)
|
||||
sse.AuditEventSpaces = SpacesAuditEvent(base, sid)
|
||||
|
||||
return sse
|
||||
@@ -446,7 +422,7 @@ func SpaceUnshared(ev events.SpaceUnshared) AuditEventSpaceUnshared {
|
||||
sue.GranteeGroupID = ev.GranteeGroupID.OpaqueId
|
||||
grantee = "group:" + ev.GranteeGroupID.OpaqueId
|
||||
}
|
||||
base := BasicAuditEvent(ev.Executant.GetOpaqueId(), formatTime(utils.TimeToTS(ev.Timestamp)), MessageSpaceUnshared(ev.Executant.GetOpaqueId(), sid, grantee), ActionSpaceUnshared)
|
||||
base := BasicAuditEvent("", formatTime(utils.TimeToTS(ev.Timestamp)), MessageSpaceUnshared(ev.Executant.GetOpaqueId(), sid, grantee), ActionSpaceUnshared)
|
||||
sue.AuditEventSpaces = SpacesAuditEvent(base, sid)
|
||||
|
||||
return sue
|
||||
@@ -461,7 +437,7 @@ func SpaceUpdated(ev events.SpaceUpdated) AuditEventSpaceUpdated {
|
||||
Opaque: opaqueMap,
|
||||
}
|
||||
|
||||
base := BasicAuditEvent(ev.Executant.GetOpaqueId(), formatTime(ev.Timestamp), MessageSpaceUpdated(ev.Executant.GetOpaqueId(), sid, ev.Space.Name, ev.Space.Quota.QuotaMaxBytes, opaqueMap), ActionSpaceUpdated)
|
||||
base := BasicAuditEvent("", formatTime(ev.Timestamp), MessageSpaceUpdated(ev.Executant.GetOpaqueId(), sid, ev.Space.Name, ev.Space.Quota.QuotaMaxBytes, opaqueMap), ActionSpaceUpdated)
|
||||
sue.AuditEventSpaces = SpacesAuditEvent(base, sid)
|
||||
|
||||
return sue
|
||||
@@ -469,7 +445,7 @@ func SpaceUpdated(ev events.SpaceUpdated) AuditEventSpaceUpdated {
|
||||
|
||||
// UserCreated converts a UserCreated event to an AuditEventUserCreated
|
||||
func UserCreated(ev events.UserCreated) AuditEventUserCreated {
|
||||
base := BasicAuditEvent(ev.Executant.GetOpaqueId(), formatTime(ev.Timestamp), MessageUserCreated(ev.Executant.GetOpaqueId(), ev.UserID), ActionUserCreated)
|
||||
base := BasicAuditEvent("", formatTime(ev.Timestamp), MessageUserCreated(ev.Executant.GetOpaqueId(), ev.UserID), ActionUserCreated)
|
||||
return AuditEventUserCreated{
|
||||
AuditEvent: base,
|
||||
UserID: ev.UserID,
|
||||
@@ -478,7 +454,7 @@ func UserCreated(ev events.UserCreated) AuditEventUserCreated {
|
||||
|
||||
// UserDeleted converts a UserDeleted event to an AuditEventUserDeleted
|
||||
func UserDeleted(ev events.UserDeleted) AuditEventUserDeleted {
|
||||
base := BasicAuditEvent(ev.Executant.GetOpaqueId(), formatTime(ev.Timestamp), MessageUserDeleted(ev.Executant.GetOpaqueId(), ev.UserID), ActionUserDeleted)
|
||||
base := BasicAuditEvent("", formatTime(ev.Timestamp), MessageUserDeleted(ev.Executant.GetOpaqueId(), ev.UserID), ActionUserDeleted)
|
||||
return AuditEventUserDeleted{
|
||||
AuditEvent: base,
|
||||
UserID: ev.UserID,
|
||||
@@ -488,7 +464,7 @@ func UserDeleted(ev events.UserDeleted) AuditEventUserDeleted {
|
||||
// UserFeatureChanged converts a UserFeatureChanged event to an AuditEventUserFeatureChanged
|
||||
func UserFeatureChanged(ev events.UserFeatureChanged) AuditEventUserFeatureChanged {
|
||||
msg := MessageUserFeatureChanged(ev.Executant.GetOpaqueId(), ev.UserID, ev.Features)
|
||||
base := BasicAuditEvent(ev.Executant.GetOpaqueId(), formatTime(ev.Timestamp), msg, ActionUserFeatureChanged)
|
||||
base := BasicAuditEvent("", formatTime(ev.Timestamp), msg, ActionUserFeatureChanged)
|
||||
return AuditEventUserFeatureChanged{
|
||||
AuditEvent: base,
|
||||
UserID: ev.UserID,
|
||||
@@ -498,7 +474,7 @@ func UserFeatureChanged(ev events.UserFeatureChanged) AuditEventUserFeatureChang
|
||||
|
||||
// GroupCreated converts a GroupCreated event to an AuditEventGroupCreated
|
||||
func GroupCreated(ev events.GroupCreated) AuditEventGroupCreated {
|
||||
base := BasicAuditEvent(ev.Executant.GetOpaqueId(), formatTime(ev.Timestamp), MessageGroupCreated(ev.Executant.GetOpaqueId(), ev.GroupID), ActionGroupCreated)
|
||||
base := BasicAuditEvent("", formatTime(ev.Timestamp), MessageGroupCreated(ev.Executant.GetOpaqueId(), ev.GroupID), ActionGroupCreated)
|
||||
return AuditEventGroupCreated{
|
||||
AuditEvent: base,
|
||||
GroupID: ev.GroupID,
|
||||
@@ -507,7 +483,7 @@ func GroupCreated(ev events.GroupCreated) AuditEventGroupCreated {
|
||||
|
||||
// GroupDeleted converts a GroupDeleted event to an AuditEventGroupDeleted
|
||||
func GroupDeleted(ev events.GroupDeleted) AuditEventGroupDeleted {
|
||||
base := BasicAuditEvent(ev.Executant.GetOpaqueId(), formatTime(ev.Timestamp), MessageGroupDeleted(ev.Executant.GetOpaqueId(), ev.GroupID), ActionGroupDeleted)
|
||||
base := BasicAuditEvent("", formatTime(ev.Timestamp), MessageGroupDeleted(ev.Executant.GetOpaqueId(), ev.GroupID), ActionGroupDeleted)
|
||||
return AuditEventGroupDeleted{
|
||||
AuditEvent: base,
|
||||
GroupID: ev.GroupID,
|
||||
@@ -516,8 +492,8 @@ func GroupDeleted(ev events.GroupDeleted) AuditEventGroupDeleted {
|
||||
|
||||
// GroupMemberAdded converts a GroupMemberAdded event to an AuditEventGroupMemberAdded
|
||||
func GroupMemberAdded(ev events.GroupMemberAdded) AuditEventGroupMemberAdded {
|
||||
msg := MessageGroupMemberAdded(ev.Executant.GetOpaqueId(), ev.UserID, ev.GroupID)
|
||||
base := BasicAuditEvent(ev.Executant.GetOpaqueId(), formatTime(ev.Timestamp), msg, ActionGroupMemberAdded)
|
||||
msg := MessageGroupMemberAdded(ev.Executant.GetOpaqueId(), ev.GroupID, ev.UserID)
|
||||
base := BasicAuditEvent("", formatTime(ev.Timestamp), msg, ActionGroupMemberAdded)
|
||||
return AuditEventGroupMemberAdded{
|
||||
AuditEvent: base,
|
||||
GroupID: ev.GroupID,
|
||||
@@ -527,8 +503,8 @@ func GroupMemberAdded(ev events.GroupMemberAdded) AuditEventGroupMemberAdded {
|
||||
|
||||
// GroupMemberRemoved converts a GroupMemberRemoved event to an AuditEventGroupMemberRemove
|
||||
func GroupMemberRemoved(ev events.GroupMemberRemoved) AuditEventGroupMemberRemoved {
|
||||
msg := MessageGroupMemberRemoved(ev.Executant.GetOpaqueId(), ev.UserID, ev.GroupID)
|
||||
base := BasicAuditEvent(ev.Executant.GetOpaqueId(), formatTime(ev.Timestamp), msg, ActionGroupMemberRemoved)
|
||||
msg := MessageGroupMemberRemoved(ev.Executant.GetOpaqueId(), ev.GroupID, ev.UserID)
|
||||
base := BasicAuditEvent("", formatTime(ev.Timestamp), msg, ActionGroupMemberRemoved)
|
||||
return AuditEventGroupMemberRemoved{
|
||||
AuditEvent: base,
|
||||
GroupID: ev.GroupID,
|
||||
|
||||
@@ -24,8 +24,6 @@ func RegisteredEvents() []events.Unmarshaller {
|
||||
events.ItemPurged{},
|
||||
events.ItemRestored{},
|
||||
events.FileVersionRestored{},
|
||||
events.TagsAdded{},
|
||||
events.TagsRemoved{},
|
||||
events.SpaceCreated{},
|
||||
events.SpaceRenamed{},
|
||||
events.SpaceEnabled{},
|
||||
|
||||
@@ -32,8 +32,6 @@ const (
|
||||
ActionFilePurged = "file_trash_delete"
|
||||
ActionFileRestored = "file_trash_restore"
|
||||
ActionFileVersionRestored = "file_version_restore"
|
||||
ActionTagsAdded = "file_tags_add"
|
||||
ActionTagsRemoved = "file_tags_remove"
|
||||
|
||||
// Spaces
|
||||
ActionSpaceCreated = "space_created"
|
||||
@@ -126,17 +124,7 @@ func MessageFileRead(executant, item string) string {
|
||||
return fmt.Sprintf("user '%s' read file '%s'", executant, item)
|
||||
}
|
||||
|
||||
// MessageTagsAdded returns a human readable string that describes the action
|
||||
func MessageTagsAdded(executant, tags, item string) string {
|
||||
return fmt.Sprintf("user '%s' added tags '%s' to file '%s'", executant, tags, item)
|
||||
}
|
||||
|
||||
// MessageTagsRemoved returns a human readable string that describes the action
|
||||
func MessageTagsRemoved(executant, tags, item string) string {
|
||||
return fmt.Sprintf("user '%s' removed tags '%s' from file '%s'", executant, tags, item)
|
||||
}
|
||||
|
||||
// MessageFileTrashed returns a human readable string that describes the action
|
||||
// MessageFileTrashed returns the human-readable string that describes the action
|
||||
func MessageFileTrashed(executant, item string) string {
|
||||
return fmt.Sprintf("user '%s' trashed file '%s'", executant, item)
|
||||
}
|
||||
|
||||
@@ -149,20 +149,6 @@ type AuditEventFileRestored struct {
|
||||
OldPath string
|
||||
}
|
||||
|
||||
// AuditEventTagsAdded is the event logged when tags are added to a file or folder
|
||||
type AuditEventTagsAdded struct {
|
||||
AuditEventFiles
|
||||
|
||||
Tags string // the tags the request asked to add, as carried by the event (ev.Tags); some may already have been present
|
||||
}
|
||||
|
||||
// AuditEventTagsRemoved is the event logged when tags are removed from a file or folder
|
||||
type AuditEventTagsRemoved struct {
|
||||
AuditEventFiles
|
||||
|
||||
Tags string // the tags the request asked to remove, as carried by the event (ev.Tags); some may not have been present
|
||||
}
|
||||
|
||||
// AuditEventFileVersionRestored is the event logged when a file version is restored
|
||||
type AuditEventFileVersionRestored struct {
|
||||
AuditEventFiles
|
||||
|
||||
@@ -82,7 +82,7 @@ type LDAPProvider struct {
|
||||
IDP string `yaml:"idp" env:"OCIS_URL;OCIS_OIDC_ISSUER;AUTH_BASIC_IDP_URL" desc:"The identity provider value to set in the userids of the CS3 user objects for users returned by this user provider." introductionVersion:"pre5.0"`
|
||||
DisableUserMechanism string `yaml:"disable_user_mechanism" env:"OCIS_LDAP_DISABLE_USER_MECHANISM;AUTH_BASIC_DISABLE_USER_MECHANISM" desc:"An option to control the behavior for disabling users. Valid options are 'none', 'attribute' and 'group'. If set to 'group', disabling a user via API will add the user to the configured group for disabled users, if set to 'attribute' this will be done in the ldap user entry, if set to 'none' the disable request is not processed." introductionVersion:"pre5.0"`
|
||||
LdapDisabledUsersGroupDN string `yaml:"ldap_disabled_users_group_dn" env:"OCIS_LDAP_DISABLED_USERS_GROUP_DN;AUTH_BASIC_DISABLED_USERS_GROUP_DN" desc:"The distinguished name of the group to which added users will be classified as disabled when 'disable_user_mechanism' is set to 'group'." introductionVersion:"pre5.0"`
|
||||
MasterID string `yaml:"master_id" env:"OCIS_MULTI_INSTANCE_MASTER_ID" desc:"The master instance ID for multi-instance setups. When set, LDAP user filters are enhanced to also match users belonging to the master instance. Also set 'user_filter'. Without an explicit 'user_filter', this instance allows login for every user in the shared LDAP directory." introductionVersion:"7.0"`
|
||||
MasterID string `yaml:"master_id" env:"OCIS_MULTI_INSTANCE_MASTER_ID" desc:"The master instance ID for multi-instance setups. When set, LDAP user filters are enhanced to also match users belonging to the master instance." introductionVersion:"7.0"`
|
||||
UserMemberAttribute string `yaml:"user_member_attribute" env:"OCIS_LDAP_USER_MEMBER_ATTRIBUTE" desc:"LDAP attribute that marks a user as a member of an instance." introductionVersion:"7.0"`
|
||||
UserGuestAttribute string `yaml:"user_guest_attribute" env:"OCIS_LDAP_USER_GUEST_ATTRIBUTE" desc:"LDAP attribute that marks a user as a guest of an instance." introductionVersion:"7.0"`
|
||||
UserSchema LDAPUserSchema `yaml:"user_schema"`
|
||||
|
||||
@@ -42,9 +42,5 @@ func Validate(cfg *config.Config) error {
|
||||
return shared.MissingLDAPBindPassword(cfg.Service.Name)
|
||||
}
|
||||
|
||||
if cfg.AuthProvider == "ldap" && cfg.AuthProviders.LDAP.MasterID != "" && cfg.AuthProviders.LDAP.UserFilter == "" {
|
||||
return shared.MissingLDAPUserFilterForMasterID(cfg.Service.Name)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
@@ -1,63 +0,0 @@
|
||||
package parser
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
"github.com/owncloud/ocis/v2/services/auth-basic/pkg/config"
|
||||
)
|
||||
|
||||
func TestValidateMasterIDRequiresUserFilter(t *testing.T) {
|
||||
cfg := &config.Config{
|
||||
Service: config.Service{Name: "auth-basic"},
|
||||
TokenManager: &config.TokenManager{JWTSecret: "secret"},
|
||||
AuthProvider: "ldap",
|
||||
AuthProviders: config.AuthProviders{
|
||||
LDAP: config.LDAPProvider{
|
||||
BindPassword: "secret",
|
||||
MasterID: "master-1",
|
||||
UserFilter: "",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
err := Validate(cfg)
|
||||
assert.Error(t, err)
|
||||
}
|
||||
|
||||
func TestValidateMasterIDWithUserFilterPasses(t *testing.T) {
|
||||
cfg := &config.Config{
|
||||
Service: config.Service{Name: "auth-basic"},
|
||||
TokenManager: &config.TokenManager{JWTSecret: "secret"},
|
||||
AuthProvider: "ldap",
|
||||
AuthProviders: config.AuthProviders{
|
||||
LDAP: config.LDAPProvider{
|
||||
BindPassword: "secret",
|
||||
MasterID: "master-1",
|
||||
UserFilter: "(ownCloudMemberOf=instance-1)",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
err := Validate(cfg)
|
||||
assert.NoError(t, err)
|
||||
}
|
||||
|
||||
func TestValidateNoMasterIDWithEmptyUserFilterPasses(t *testing.T) {
|
||||
cfg := &config.Config{
|
||||
Service: config.Service{Name: "auth-basic"},
|
||||
TokenManager: &config.TokenManager{JWTSecret: "secret"},
|
||||
AuthProvider: "ldap",
|
||||
AuthProviders: config.AuthProviders{
|
||||
LDAP: config.LDAPProvider{
|
||||
BindPassword: "secret",
|
||||
MasterID: "",
|
||||
UserFilter: "",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
err := Validate(cfg)
|
||||
assert.NoError(t, err)
|
||||
}
|
||||
@@ -11,7 +11,7 @@ type Store struct {
|
||||
TTL time.Duration `yaml:"ttl" env:"OCIS_PERSISTENT_STORE_TTL;COLLABORATION_STORE_TTL" desc:"Time to live for events in the store. Defaults to '30m' (30 minutes). See the Environment Variable Types description for more details." introductionVersion:"7.0.0"`
|
||||
AuthUsername string `yaml:"username" env:"OCIS_PERSISTENT_STORE_AUTH_USERNAME;COLLABORATION_STORE_AUTH_USERNAME" desc:"The username to authenticate with the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"7.0.0"`
|
||||
AuthPassword string `yaml:"password" env:"OCIS_PERSISTENT_STORE_AUTH_PASSWORD;COLLABORATION_STORE_AUTH_PASSWORD" desc:"The password to authenticate with the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"7.0.0"`
|
||||
EnableTLS bool `yaml:"enable_tls" env:"OCIS_PERSISTENT_STORE_ENABLE_TLS;COLLABORATION_STORE_ENABLE_TLS" desc:"Activate TLS for the connection to the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"9.0.0"`
|
||||
TLSInsecure bool `yaml:"tls_insecure" env:"OCIS_PERSISTENT_STORE_TLS_INSECURE;COLLABORATION_STORE_TLS_INSECURE" desc:"Disable TLS certificate verification for the store connection. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"9.0.0"`
|
||||
TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OCIS_PERSISTENT_STORE_TLS_ROOT_CA_CERTIFICATE;COLLABORATION_STORE_TLS_ROOT_CA_CERTIFICATE" desc:"Path to the PEM-encoded root CA certificate for the store TLS connection. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"9.0.0"`
|
||||
EnableTLS bool `yaml:"enable_tls" env:"OCIS_PERSISTENT_STORE_ENABLE_TLS;COLLABORATION_STORE_ENABLE_TLS" desc:"Activate TLS for the connection to the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
|
||||
TLSInsecure bool `yaml:"tls_insecure" env:"OCIS_PERSISTENT_STORE_TLS_INSECURE;COLLABORATION_STORE_TLS_INSECURE" desc:"Disable TLS certificate verification for the store connection. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
|
||||
TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OCIS_PERSISTENT_STORE_TLS_ROOT_CA_CERTIFICATE;COLLABORATION_STORE_TLS_ROOT_CA_CERTIFICATE" desc:"Path to the PEM-encoded root CA certificate for the store TLS connection. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
|
||||
}
|
||||
@@ -45,9 +45,9 @@ type Store struct {
|
||||
TTL time.Duration `yaml:"ttl" env:"OCIS_PERSISTENT_STORE_TTL;EVENTHISTORY_STORE_TTL" desc:"Time to live for events in the store. Defaults to '336h' (2 weeks). See the Environment Variable Types description for more details." introductionVersion:"pre5.0"`
|
||||
AuthUsername string `yaml:"username" env:"OCIS_PERSISTENT_STORE_AUTH_USERNAME;EVENTHISTORY_STORE_AUTH_USERNAME" desc:"The username to authenticate with the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"5.0"`
|
||||
AuthPassword string `yaml:"password" env:"OCIS_PERSISTENT_STORE_AUTH_PASSWORD;EVENTHISTORY_STORE_AUTH_PASSWORD" desc:"The password to authenticate with the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"5.0"`
|
||||
EnableTLS bool `yaml:"enable_tls" env:"OCIS_PERSISTENT_STORE_ENABLE_TLS;EVENTHISTORY_STORE_ENABLE_TLS" desc:"Activate TLS for the connection to the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"9.0.0"`
|
||||
TLSInsecure bool `yaml:"tls_insecure" env:"OCIS_PERSISTENT_STORE_TLS_INSECURE;EVENTHISTORY_STORE_TLS_INSECURE" desc:"Disable TLS certificate verification for the store connection. Only applies when store type 'nats-js-kv' is configured. Do not enable this in production because it disables authentication of the NATS server. Use it only for testing with self-signed certificates." introductionVersion:"9.0.0"`
|
||||
TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OCIS_PERSISTENT_STORE_TLS_ROOT_CA_CERTIFICATE;EVENTHISTORY_STORE_TLS_ROOT_CA_CERTIFICATE" desc:"Path to the PEM-encoded root CA certificate for the store TLS connection. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"9.0.0"`
|
||||
EnableTLS bool `yaml:"enable_tls" env:"OCIS_PERSISTENT_STORE_ENABLE_TLS;EVENTHISTORY_STORE_ENABLE_TLS" desc:"Activate TLS for the connection to the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
|
||||
TLSInsecure bool `yaml:"tls_insecure" env:"OCIS_PERSISTENT_STORE_TLS_INSECURE;EVENTHISTORY_STORE_TLS_INSECURE" desc:"Disable TLS certificate verification for the store connection. Only applies when store type 'nats-js-kv' is configured. Do not enable this in production because it disables authentication of the NATS server. Use it only for testing with self-signed certificates." introductionVersion:"8.3.0"`
|
||||
TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OCIS_PERSISTENT_STORE_TLS_ROOT_CA_CERTIFICATE;EVENTHISTORY_STORE_TLS_ROOT_CA_CERTIFICATE" desc:"Path to the PEM-encoded root CA certificate for the store TLS connection. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
|
||||
}
|
||||
|
||||
// Events combines the configuration options for the event bus.
|
||||
|
||||
@@ -71,8 +71,6 @@ type Config struct {
|
||||
|
||||
EnableVaultMode bool `yaml:"enable_vault_mode" env:"OCIS_ENABLE_VAULT_MODE;FRONTEND_ENABLE_VAULT_MODE" desc:"Enable vault mode. When enabled, the capabilities endpoint will report vault as enabled and the capabilities?vault=true endpoint will return capabilities with public sharing and federation disabled." introductionVersion:"8.1.0"`
|
||||
|
||||
DefaultVaultShareExpirationDays int `yaml:"default_vault_share_expiration_days" env:"OCIS_DEFAULT_VAULT_SHARE_EXPIRATION_DAYS;FRONTEND_DEFAULT_VAULT_SHARE_EXPIRATION_DAYS" desc:"The default expiration, in days, applied to a vault user or group share created without an explicit expiration date. Reported via the vault capability so clients can reflect the admin-configured value. Must match the graph service's GRAPH_DEFAULT_VAULT_SHARE_EXPIRATION_DAYS." introductionVersion:"9.0.0"`
|
||||
|
||||
Context context.Context `yaml:"-"`
|
||||
}
|
||||
|
||||
@@ -150,9 +148,9 @@ type OCS struct {
|
||||
StatCacheDisablePersistence bool `yaml:"stat_cache_disable_persistence" env:"OCIS_CACHE_DISABLE_PERSISTENCE" desc:"Disable persistence of the cache. Only applies when using the 'nats-js-kv' store type. Defaults to false." introductionVersion:"5.0" deprecationVersion:"7.0.0" removalVersion:"%%NEXT_PRODUCTION_VERSION%%" deprecationInfo:"The use of OCIS_CACHE_DISABLE_PERSISTENCE in the frontend service is deprecated because the OCS API is deprecated" deprecationReplacement:""`
|
||||
StatCacheAuthUsername string `yaml:"stat_cache_auth_username" env:"OCIS_CACHE_AUTH_USERNAME" desc:"The username to use for authentication. Only applies when using the 'nats-js-kv' store type." introductionVersion:"5.0" deprecationVersion:"7.0.0" removalVersion:"%%NEXT_PRODUCTION_VERSION%%" deprecationInfo:"The use of OCIS_CACHE_AUTH_USERNAME in the frontend service is deprecated because the OCS API is deprecated OCS API is deprecated" deprecationReplacement:""`
|
||||
StatCacheAuthPassword string `yaml:"stat_cache_auth_password" env:"OCIS_CACHE_AUTH_PASSWORD" desc:"The password to use for authentication. Only applies when using the 'nats-js-kv' store type." introductionVersion:"5.0" deprecationVersion:"7.0.0" removalVersion:"%%NEXT_PRODUCTION_VERSION%%" deprecationInfo:"The use of OCIS_CACHE_AUTH_PASSWORD in the frontend service is deprecated because the OCS API is deprecated OCS API is deprecated" deprecationReplacement:""`
|
||||
StatCacheEnableTLS bool `yaml:"stat_cache_enable_tls" env:"OCIS_CACHE_ENABLE_TLS" desc:"Activate TLS for the connection to the stat cache store. Only applies when using the 'nats-js-kv' store type." introductionVersion:"9.0.0"`
|
||||
StatCacheTLSInsecure bool `yaml:"stat_cache_tls_insecure" env:"OCIS_CACHE_TLS_INSECURE" desc:"Disable TLS certificate verification for the stat cache store connection. Only applies when using the 'nats-js-kv' store type. Do not enable this in production because it disables authentication of the NATS server. Use it only for testing with self-signed certificates." introductionVersion:"9.0.0"`
|
||||
StatCacheTLSRootCACertificate string `yaml:"stat_cache_tls_root_ca_certificate" env:"OCIS_CACHE_TLS_ROOT_CA_CERTIFICATE" desc:"Path to the PEM-encoded root CA certificate for the stat cache store TLS connection. Only applies when using the 'nats-js-kv' store type." introductionVersion:"9.0.0"`
|
||||
StatCacheEnableTLS bool `yaml:"stat_cache_enable_tls" env:"OCIS_CACHE_ENABLE_TLS" desc:"Activate TLS for the connection to the stat cache store. Only applies when using the 'nats-js-kv' store type." introductionVersion:"8.3.0"`
|
||||
StatCacheTLSInsecure bool `yaml:"stat_cache_tls_insecure" env:"OCIS_CACHE_TLS_INSECURE" desc:"Disable TLS certificate verification for the stat cache store connection. Only applies when using the 'nats-js-kv' store type. Do not enable this in production because it disables authentication of the NATS server. Use it only for testing with self-signed certificates." introductionVersion:"8.3.0"`
|
||||
StatCacheTLSRootCACertificate string `yaml:"stat_cache_tls_root_ca_certificate" env:"OCIS_CACHE_TLS_ROOT_CA_CERTIFICATE" desc:"Path to the PEM-encoded root CA certificate for the stat cache store TLS connection. Only applies when using the 'nats-js-kv' store type." introductionVersion:"8.3.0"`
|
||||
|
||||
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
|
||||
@@ -215,6 +213,7 @@ type Validation struct {
|
||||
|
||||
// MFAConfig configures multi factor multifactor authentication
|
||||
type MFAConfig struct {
|
||||
Enabled bool `yaml:"enabled" env:"OCIS_MFA_ENABLED" desc:"Set to true to enable multi factor authentication. See the documentation for more details." introductionVersion:"7.3.0"`
|
||||
AuthLevelNames []string `yaml:"auth_level_names" env:"OCIS_MFA_AUTH_LEVEL_NAMES" desc:"This authentication level name indicates that multi-factor authentication was performed. The name must match the ACR claim in the access token received. Note: If multiple names are required, use a comma-separated list. The front-end service will use the first name in the list when requesting multi-factor authentication (MFA)." introductionVersion:"7.3.0"`
|
||||
Enabled bool `yaml:"enabled" env:"OCIS_MFA_ENABLED" desc:"Set to true to enable multi factor authentication. See the documentation for more details." introductionVersion:"7.3.0"`
|
||||
AuthLevelNames []string `yaml:"auth_level_names" env:"OCIS_MFA_AUTH_LEVEL_NAMES" desc:"This authentication level name indicates that multi-factor authentication was performed. The name must match the ACR claim in the access token received. Note: If multiple names are required, use a comma-separated list. The front-end service will use the first name in the list when requesting multi-factor authentication (MFA)." introductionVersion:"7.3.0"`
|
||||
SessionDuration int `yaml:"session_duration" env:"OCIS_MFA_SESSION_DURATION" desc:"The duration in seconds that a multi-factor authentication session is valid. After this time the user will be prompted to re-authenticate. Defaults to 3600 (1 hour)." introductionVersion:"8.1.0"`
|
||||
}
|
||||
@@ -144,9 +144,9 @@ func DefaultConfig() *config.Config {
|
||||
MaxTagLength: 100,
|
||||
},
|
||||
MultiFactorAuthentication: config.MFAConfig{
|
||||
AuthLevelNames: []string{"advanced"},
|
||||
AuthLevelNames: []string{"advanced"},
|
||||
SessionDuration: 3600,
|
||||
},
|
||||
DefaultVaultShareExpirationDays: 30,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -361,13 +361,13 @@ func FrontendConfigFromStruct(cfg *config.Config, logger log.Logger) (map[string
|
||||
},
|
||||
"auth": map[string]interface{}{
|
||||
"mfa": map[string]interface{}{
|
||||
"enabled": cfg.MultiFactorAuthentication.Enabled,
|
||||
"levelnames": cfg.MultiFactorAuthentication.AuthLevelNames,
|
||||
"enabled": cfg.MultiFactorAuthentication.Enabled,
|
||||
"levelnames": cfg.MultiFactorAuthentication.AuthLevelNames,
|
||||
"session_duration": cfg.MultiFactorAuthentication.SessionDuration,
|
||||
},
|
||||
},
|
||||
"vault": map[string]interface{}{
|
||||
"enabled": cfg.EnableVaultMode,
|
||||
"default_share_expiration_days": cfg.DefaultVaultShareExpirationDays,
|
||||
"enabled": cfg.EnableVaultMode,
|
||||
},
|
||||
},
|
||||
"version": map[string]interface{}{
|
||||
|
||||
@@ -95,7 +95,7 @@ type Cache struct {
|
||||
ProviderCacheDisablePersistence bool `yaml:"provider_cache_disable_persistence" env:"OCIS_CACHE_DISABLE_PERSISTENCE;GATEWAY_PROVIDER_CACHE_DISABLE_PERSISTENCE" desc:"Disables persistence of the provider cache. Only applies when store type 'nats-js-kv' is configured. Defaults to false." introductionVersion:"5.0"`
|
||||
ProviderCacheAuthUsername string `yaml:"provider_cache_auth_username" env:"OCIS_CACHE_AUTH_USERNAME;GATEWAY_PROVIDER_CACHE_AUTH_USERNAME" desc:"The username to use for authentication. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"5.0"`
|
||||
ProviderCacheAuthPassword string `yaml:"provider_cache_auth_password" env:"OCIS_CACHE_AUTH_PASSWORD;GATEWAY_PROVIDER_CACHE_AUTH_PASSWORD" desc:"The password to use for authentication. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"5.0"`
|
||||
ProviderCacheEnableTLS bool `yaml:"provider_cache_enable_tls" env:"OCIS_CACHE_ENABLE_TLS;GATEWAY_PROVIDER_CACHE_ENABLE_TLS" desc:"Activate TLS for the connection to the cache store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"9.0.0"`
|
||||
ProviderCacheTLSInsecure bool `yaml:"provider_cache_tls_insecure" env:"OCIS_CACHE_TLS_INSECURE;GATEWAY_PROVIDER_CACHE_TLS_INSECURE" desc:"Disable TLS certificate verification for the cache store connection. Only applies when store type 'nats-js-kv' is configured. Do not enable this in production because it disables authentication of the NATS server. Use it only for testing with self-signed certificates." introductionVersion:"9.0.0"`
|
||||
ProviderCacheTLSRootCACertificate string `yaml:"provider_cache_tls_root_ca_certificate" env:"OCIS_CACHE_TLS_ROOT_CA_CERTIFICATE;GATEWAY_PROVIDER_CACHE_TLS_ROOT_CA_CERTIFICATE" desc:"Path to the PEM-encoded root CA certificate for the cache store TLS connection. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"9.0.0"`
|
||||
ProviderCacheEnableTLS bool `yaml:"provider_cache_enable_tls" env:"OCIS_CACHE_ENABLE_TLS;GATEWAY_PROVIDER_CACHE_ENABLE_TLS" desc:"Activate TLS for the connection to the cache store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
|
||||
ProviderCacheTLSInsecure bool `yaml:"provider_cache_tls_insecure" env:"OCIS_CACHE_TLS_INSECURE;GATEWAY_PROVIDER_CACHE_TLS_INSECURE" desc:"Disable TLS certificate verification for the cache store connection. Only applies when store type 'nats-js-kv' is configured. Do not enable this in production because it disables authentication of the NATS server. Use it only for testing with self-signed certificates." introductionVersion:"8.3.0"`
|
||||
ProviderCacheTLSRootCACertificate string `yaml:"provider_cache_tls_root_ca_certificate" env:"OCIS_CACHE_TLS_ROOT_CA_CERTIFICATE;GATEWAY_PROVIDER_CACHE_TLS_ROOT_CA_CERTIFICATE" desc:"Path to the PEM-encoded root CA certificate for the cache store TLS connection. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
|
||||
}
|
||||
@@ -12,7 +12,7 @@ type Cache struct {
|
||||
DisablePersistence bool `yaml:"disable_persistence" env:"OCIS_CACHE_DISABLE_PERSISTENCE;GRAPH_CACHE_DISABLE_PERSISTENCE" desc:"Disables persistence of the cache. Only applies when store type 'nats-js-kv' is configured. Defaults to false." introductionVersion:"5.0"`
|
||||
AuthUsername string `yaml:"username" env:"OCIS_CACHE_AUTH_USERNAME;GRAPH_CACHE_AUTH_USERNAME" desc:"The username to authenticate with the cache. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"5.0"`
|
||||
AuthPassword string `yaml:"password" env:"OCIS_CACHE_AUTH_PASSWORD;GRAPH_CACHE_AUTH_PASSWORD" desc:"The password to authenticate with the cache. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"5.0"`
|
||||
EnableTLS bool `yaml:"enable_tls" env:"OCIS_CACHE_ENABLE_TLS;GRAPH_CACHE_ENABLE_TLS" desc:"Activate TLS for the connection to the cache store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"9.0.0"`
|
||||
TLSInsecure bool `yaml:"tls_insecure" env:"OCIS_CACHE_TLS_INSECURE;GRAPH_CACHE_TLS_INSECURE" desc:"Disable TLS certificate verification for the cache store connection. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"9.0.0"`
|
||||
TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OCIS_CACHE_TLS_ROOT_CA_CERTIFICATE;GRAPH_CACHE_TLS_ROOT_CA_CERTIFICATE" desc:"Path to the PEM-encoded root CA certificate for the cache store TLS connection. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"9.0.0"`
|
||||
EnableTLS bool `yaml:"enable_tls" env:"OCIS_CACHE_ENABLE_TLS;GRAPH_CACHE_ENABLE_TLS" desc:"Activate TLS for the connection to the cache store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
|
||||
TLSInsecure bool `yaml:"tls_insecure" env:"OCIS_CACHE_TLS_INSECURE;GRAPH_CACHE_TLS_INSECURE" desc:"Disable TLS certificate verification for the cache store connection. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
|
||||
TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OCIS_CACHE_TLS_ROOT_CA_CERTIFICATE;GRAPH_CACHE_TLS_ROOT_CA_CERTIFICATE" desc:"Path to the PEM-encoded root CA certificate for the cache store TLS connection. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
|
||||
}
|
||||
@@ -45,8 +45,6 @@ type Config struct {
|
||||
|
||||
EnableVaultMode bool `yaml:"enable_vault_mode" env:"OCIS_ENABLE_VAULT_MODE;GRAPH_ENABLE_VAULT_MODE" desc:"Enable vault mode in addition to the regular graph service. This only applies when the additional storage-users-vault service is running, which is a special configured storage-users service." introductionVersion:"8.1.0"`
|
||||
|
||||
DefaultVaultShareExpirationDays int `yaml:"default_vault_share_expiration_days" env:"OCIS_DEFAULT_VAULT_SHARE_EXPIRATION_DAYS;GRAPH_DEFAULT_VAULT_SHARE_EXPIRATION_DAYS" desc:"The default expiration, in days, applied to a vault user or group share created without an explicit expiration date. Space memberships are exempt." introductionVersion:"9.0.0"`
|
||||
|
||||
EnableUserSharing bool `yaml:"enable_user_sharing" env:"OCIS_ENABLE_USER_SHARING" desc:"Enables direct sharing with users and groups. When disabled, creating new user, group or federated shares via the drive item invite endpoints is rejected. Public link sharing and space membership are not affected." introductionVersion:"8.2.0"`
|
||||
|
||||
Context context.Context `yaml:"-"`
|
||||
@@ -125,7 +123,7 @@ type LDAP struct {
|
||||
InstanceMapperIDAttribute string `yaml:"instance_mapper_id_attribute" env:"OCIS_LDAP_INSTANCE_MAPPER_ID_ATTRIBUTE" desc:"LDAP Attribute of the instance ID. Requires OCIS_MULTI_INSTANCE_ENABLED." introductionVersion:"8.0.0"`
|
||||
CrossInstanceReferenceTemplate string `yaml:"cross_instance_reference_template" env:"OCIS_LDAP_CROSS_INSTANCE_REFERENCE_TEMPLATE" desc:"Template for the users unique reference across oCIS instances. Requires OCIS_MULTI_INSTANCE_ENABLED." introductionVersion:"8.0.0"`
|
||||
InstanceURLTemplate string `yaml:"instance_url_template" env:"OCIS_LDAP_INSTANCE_URL_TEMPLATE" desc:"Template for the instance URL. Requires OCIS_MULTI_INSTANCE_ENABLED." introductionVersion:"8.0.0"`
|
||||
InstanceMapperCacheTTL int `yaml:"instance_mapper_cache_ttl" env:"OCIS_LDAP_INSTANCE_MAPPER_CACHE_TTL" desc:"Max TTL in seconds for the LDAP instance mapper cache. Requires OCIS_MULTI_INSTANCE_ENABLED." introductionVersion:"9.0.0"`
|
||||
InstanceMapperCacheTTL int `yaml:"instance_mapper_cache_ttl" env:"OCIS_LDAP_INSTANCE_MAPPER_CACHE_TTL" desc:"Max TTL in seconds for the LDAP instance mapper cache. Requires OCIS_MULTI_INSTANCE_ENABLED." introductionVersion:"8.3.0"`
|
||||
}
|
||||
|
||||
// LDAPEducationConfig represents the LDAP configuration for education related resources
|
||||
@@ -194,13 +192,13 @@ type ServiceAccount struct {
|
||||
|
||||
type Validation struct {
|
||||
MaxTagLength int `yaml:"max_tag_length" env:"OCIS_MAX_TAG_LENGTH" desc:"Define the maximum tag length. Defaults to 100 if not set. Set to 0 to not limit the tag length. Changes only impact the validation of new tags." introductionVersion:"7.2.0"`
|
||||
MaxImageFileSize string `yaml:"max_image_file_size" env:"GRAPH_MAX_IMAGE_FILE_SIZE" desc:"The maximum file size of an image which can be set as a space image. Must be less than or equal to 'THUMBNAILS_MAX_INPUT_IMAGE_FILE_SIZE' of the thumbnails service, otherwise images between the two values are accepted but cannot be rendered. Usable common abbreviations: [KB, KiB, MB, MiB, GB, GiB, TB, TiB, PB, PiB, EB, EiB], example: 2GB. Set to 0 to not limit the file size." introductionVersion:"9.0.0"`
|
||||
MaxImageFileSize string `yaml:"max_image_file_size" env:"GRAPH_MAX_IMAGE_FILE_SIZE" desc:"The maximum file size of an image which can be set as a space image. Must be less than or equal to 'THUMBNAILS_MAX_INPUT_IMAGE_FILE_SIZE' of the thumbnails service, otherwise images between the two values are accepted but cannot be rendered. Usable common abbreviations: [KB, KiB, MB, MiB, GB, GiB, TB, TiB, PB, PiB, EB, EiB], example: 2GB. Set to 0 to not limit the file size." introductionVersion:"8.3.0"`
|
||||
}
|
||||
|
||||
// MultiInstanceConfig holds configuration for multi-instance-ocis
|
||||
type MultiInstanceConfig struct {
|
||||
Enabled bool `yaml:"enabled" env:"OCIS_MULTI_INSTANCE_ENABLED" desc:"Enable multiple instances of Infinite Scale." introductionVersion:"8.0.0"`
|
||||
InstanceID string `yaml:"instanceid" env:"OCIS_MULTI_INSTANCE_INSTANCEID" desc:"The unique ID of this instance." introductionVersion:"8.0.0"`
|
||||
MasterID string `yaml:"master_id" env:"OCIS_MULTI_INSTANCE_MASTER_ID" desc:"The master ID that grants access to all instances. Users with this ID in their memberOf or guestOf claims can access any instance. Leave empty to disable. Also set 'OCIS_LDAP_USER_FILTER'. Without an explicit user filter, this instance resolves every user in the shared LDAP directory." introductionVersion:"8.1.0"`
|
||||
MasterID string `yaml:"master_id" env:"OCIS_MULTI_INSTANCE_MASTER_ID" desc:"The master ID that grants access to all instances. Users with this ID in their memberOf or guestOf claims can access any instance. Leave empty to disable." introductionVersion:"8.1.0"`
|
||||
QueryRegexp string `yaml:"query_regexp" env:"OCIS_MULTI_INSTANCE_QUERY_TEMPLATE" desc:"The regular expression extracting username and instancename from a user provided search." introductionVersion:"8.0.0"`
|
||||
}
|
||||
@@ -134,10 +134,9 @@ func DefaultConfig() *config.Config {
|
||||
Cluster: "ocis-cluster",
|
||||
EnableTLS: false,
|
||||
},
|
||||
MaxConcurrency: 20,
|
||||
ReceivedSharesStatTimeout: 10 * time.Second,
|
||||
EnableUserSharing: true,
|
||||
DefaultVaultShareExpirationDays: 30,
|
||||
MaxConcurrency: 20,
|
||||
ReceivedSharesStatTimeout: 10 * time.Second,
|
||||
EnableUserSharing: true,
|
||||
UnifiedRoles: config.UnifiedRoles{
|
||||
AvailableRoles: nil, // will be populated with defaults in EnsureDefaults
|
||||
},
|
||||
|
||||
@@ -98,10 +98,6 @@ func validateLDAPSettings(cfg *config.Config) error {
|
||||
return shared.MissingLDAPBindPassword(cfg.Service.Name)
|
||||
}
|
||||
|
||||
if cfg.MultiInstance.MasterID != "" && cfg.Identity.LDAP.UserFilter == "" {
|
||||
return shared.MissingLDAPUserFilterForMasterID(cfg.Service.Name)
|
||||
}
|
||||
|
||||
// ensure that "GroupBaseDN" is below "GroupBaseDN"
|
||||
if cfg.Identity.LDAP.WriteEnabled && cfg.Identity.LDAP.GroupCreateBaseDN != cfg.Identity.LDAP.GroupBaseDN {
|
||||
baseDN, err := ldap.ParseDN(cfg.Identity.LDAP.GroupBaseDN)
|
||||
|
||||
@@ -1,63 +0,0 @@
|
||||
package parser
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
"github.com/owncloud/ocis/v2/services/graph/pkg/config"
|
||||
)
|
||||
|
||||
func TestValidateLDAPSettingsMasterIDRequiresUserFilter(t *testing.T) {
|
||||
cfg := &config.Config{
|
||||
Service: config.Service{Name: "graph"},
|
||||
Identity: config.Identity{
|
||||
LDAP: config.LDAP{
|
||||
BindPassword: "secret",
|
||||
UserFilter: "",
|
||||
},
|
||||
},
|
||||
MultiInstance: config.MultiInstanceConfig{
|
||||
MasterID: "master-1",
|
||||
},
|
||||
}
|
||||
|
||||
err := validateLDAPSettings(cfg)
|
||||
assert.Error(t, err)
|
||||
}
|
||||
|
||||
func TestValidateLDAPSettingsMasterIDWithUserFilterPasses(t *testing.T) {
|
||||
cfg := &config.Config{
|
||||
Service: config.Service{Name: "graph"},
|
||||
Identity: config.Identity{
|
||||
LDAP: config.LDAP{
|
||||
BindPassword: "secret",
|
||||
UserFilter: "(ownCloudMemberOf=instance-1)",
|
||||
},
|
||||
},
|
||||
MultiInstance: config.MultiInstanceConfig{
|
||||
MasterID: "master-1",
|
||||
},
|
||||
}
|
||||
|
||||
err := validateLDAPSettings(cfg)
|
||||
assert.NoError(t, err)
|
||||
}
|
||||
|
||||
func TestValidateLDAPSettingsNoMasterIDWithEmptyUserFilterPasses(t *testing.T) {
|
||||
cfg := &config.Config{
|
||||
Service: config.Service{Name: "graph"},
|
||||
Identity: config.Identity{
|
||||
LDAP: config.LDAP{
|
||||
BindPassword: "secret",
|
||||
UserFilter: "",
|
||||
},
|
||||
},
|
||||
MultiInstance: config.MultiInstanceConfig{
|
||||
MasterID: "",
|
||||
},
|
||||
}
|
||||
|
||||
err := validateLDAPSettings(cfg)
|
||||
assert.NoError(t, err)
|
||||
}
|
||||
@@ -7,7 +7,6 @@ import (
|
||||
"net/url"
|
||||
"slices"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
gateway "github.com/cs3org/go-cs3apis/cs3/gateway/v1beta1"
|
||||
grouppb "github.com/cs3org/go-cs3apis/cs3/identity/group/v1beta1"
|
||||
@@ -178,18 +177,6 @@ func (s DriveItemPermissionsService) Invite(ctx context.Context, resourceId *sto
|
||||
var shareid string
|
||||
var expiration *types.Timestamp
|
||||
var cTime *types.Timestamp
|
||||
|
||||
// use the client-supplied expiration, else default vault shares to DefaultVaultShareExpirationDays;
|
||||
// space memberships and non-vault shares are exempt
|
||||
resourceID := statResponse.GetInfo().GetId()
|
||||
var shareExpiration *types.Timestamp
|
||||
switch {
|
||||
case invite.ExpirationDateTime != nil:
|
||||
shareExpiration = utils.TimeToTS(*invite.ExpirationDateTime)
|
||||
case !IsSpaceRoot(resourceID) && IsVaultResource(resourceID):
|
||||
shareExpiration = utils.TimeToTS(time.Now().UTC().AddDate(0, 0, s.config.DefaultVaultShareExpirationDays))
|
||||
}
|
||||
|
||||
switch driveRecipient.GetLibreGraphRecipientType() {
|
||||
case "group":
|
||||
group, err := s.identityCache.GetGroup(ctx, objectID)
|
||||
@@ -205,8 +192,8 @@ func (s DriveItemPermissionsService) Invite(ctx context.Context, resourceId *sto
|
||||
},
|
||||
}
|
||||
createShareRequest := createShareRequestToGroup(group, statResponse.GetInfo(), cs3ResourcePermissions)
|
||||
if shareExpiration != nil {
|
||||
createShareRequest.GetGrant().Expiration = shareExpiration
|
||||
if invite.ExpirationDateTime != nil {
|
||||
createShareRequest.GetGrant().Expiration = utils.TimeToTS(*invite.ExpirationDateTime)
|
||||
}
|
||||
createShareResponse, err := gatewayClient.CreateShare(ctx, createShareRequest)
|
||||
if err := errorcode.FromCS3Status(createShareResponse.GetStatus(), err); err != nil {
|
||||
@@ -259,8 +246,8 @@ func (s DriveItemPermissionsService) Invite(ctx context.Context, resourceId *sto
|
||||
}
|
||||
|
||||
createShareRequest := createShareRequestToFederatedUser(user, statResponse.GetInfo().GetId(), providerInfoResp.ProviderInfo, cs3ResourcePermissions)
|
||||
if shareExpiration != nil {
|
||||
createShareRequest.Expiration = shareExpiration
|
||||
if invite.ExpirationDateTime != nil {
|
||||
createShareRequest.Expiration = utils.TimeToTS(*invite.ExpirationDateTime)
|
||||
}
|
||||
createShareResponse, err := gatewayClient.CreateOCMShare(ctx, createShareRequest)
|
||||
if err := errorcode.FromCS3Status(createShareResponse.GetStatus(), err); err != nil {
|
||||
@@ -272,8 +259,8 @@ func (s DriveItemPermissionsService) Invite(ctx context.Context, resourceId *sto
|
||||
expiration = createShareResponse.GetShare().GetExpiration()
|
||||
} else {
|
||||
createShareRequest := createShareRequestToUser(user, statResponse.GetInfo(), cs3ResourcePermissions)
|
||||
if shareExpiration != nil {
|
||||
createShareRequest.GetGrant().Expiration = shareExpiration
|
||||
if invite.ExpirationDateTime != nil {
|
||||
createShareRequest.GetGrant().Expiration = utils.TimeToTS(*invite.ExpirationDateTime)
|
||||
}
|
||||
createShareResponse, err := gatewayClient.CreateShare(ctx, createShareRequest)
|
||||
if err := errorcode.FromCS3Status(createShareResponse.GetStatus(), err); err != nil {
|
||||
|
||||
@@ -174,121 +174,6 @@ var _ = Describe("DriveItemPermissionsService", func() {
|
||||
Expect(permission.GrantedToV2.Group.GetId()).To(Equal("2"))
|
||||
})
|
||||
|
||||
It("applies a default 30-day expiration to a vault user share created without one", func() {
|
||||
statResponse.Info.Id = &provider.ResourceId{
|
||||
StorageId: utils.VaultStorageProviderID,
|
||||
SpaceId: driveItemId.SpaceId,
|
||||
OpaqueId: driveItemId.OpaqueId,
|
||||
}
|
||||
var capturedReq *collaboration.CreateShareRequest
|
||||
gatewayClient.On("GetUser", mock.Anything, mock.Anything).Return(getUserResponse, nil)
|
||||
gatewayClient.On("CreateShare", mock.Anything, mock.Anything).
|
||||
Run(func(args mock.Arguments) {
|
||||
capturedReq = args.Get(1).(*collaboration.CreateShareRequest)
|
||||
}).Return(createShareResponse, nil)
|
||||
driveItemInvite.Recipients = []libregraph.DriveRecipient{
|
||||
{ObjectId: libregraph.PtrString("1"), LibreGraphRecipientType: libregraph.PtrString("user")},
|
||||
}
|
||||
driveItemInvite.ExpirationDateTime = nil
|
||||
createShareResponse.Share = &collaboration.Share{
|
||||
Id: &collaboration.ShareId{OpaqueId: "123"},
|
||||
}
|
||||
|
||||
expectedDefault := time.Now().UTC().AddDate(0, 0, 30)
|
||||
_, err := driveItemPermissionsService.Invite(context.Background(), driveItemId, driveItemInvite)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
Expect(capturedReq.GetGrant().GetExpiration()).ToNot(BeNil())
|
||||
Expect(utils.TSToTime(capturedReq.GetGrant().GetExpiration())).To(BeTemporally("~", expectedDefault, time.Minute))
|
||||
})
|
||||
|
||||
It("applies a default 30-day expiration to a vault group share created without one", func() {
|
||||
statResponse.Info.Id = &provider.ResourceId{
|
||||
StorageId: utils.VaultStorageProviderID,
|
||||
SpaceId: driveItemId.SpaceId,
|
||||
OpaqueId: driveItemId.OpaqueId,
|
||||
}
|
||||
var capturedReq *collaboration.CreateShareRequest
|
||||
gatewayClient.On("GetGroup", mock.Anything, mock.Anything).Return(getGroupResponse, nil)
|
||||
gatewayClient.On("CreateShare", mock.Anything, mock.Anything).
|
||||
Run(func(args mock.Arguments) {
|
||||
capturedReq = args.Get(1).(*collaboration.CreateShareRequest)
|
||||
}).Return(createShareResponse, nil)
|
||||
driveItemInvite.Recipients = []libregraph.DriveRecipient{
|
||||
{ObjectId: libregraph.PtrString("2"), LibreGraphRecipientType: libregraph.PtrString("group")},
|
||||
}
|
||||
driveItemInvite.ExpirationDateTime = nil
|
||||
createShareResponse.Share = &collaboration.Share{
|
||||
Id: &collaboration.ShareId{OpaqueId: "123"},
|
||||
}
|
||||
|
||||
expectedDefault := time.Now().UTC().AddDate(0, 0, 30)
|
||||
_, err := driveItemPermissionsService.Invite(context.Background(), driveItemId, driveItemInvite)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
Expect(capturedReq.GetGrant().GetExpiration()).ToNot(BeNil())
|
||||
Expect(utils.TSToTime(capturedReq.GetGrant().GetExpiration())).To(BeTemporally("~", expectedDefault, time.Minute))
|
||||
})
|
||||
|
||||
It("does not apply a default expiration to a non-vault user share created without one", func() {
|
||||
var capturedReq *collaboration.CreateShareRequest
|
||||
gatewayClient.On("GetUser", mock.Anything, mock.Anything).Return(getUserResponse, nil)
|
||||
gatewayClient.On("CreateShare", mock.Anything, mock.Anything).
|
||||
Run(func(args mock.Arguments) {
|
||||
capturedReq = args.Get(1).(*collaboration.CreateShareRequest)
|
||||
}).Return(createShareResponse, nil)
|
||||
driveItemInvite.Recipients = []libregraph.DriveRecipient{
|
||||
{ObjectId: libregraph.PtrString("1"), LibreGraphRecipientType: libregraph.PtrString("user")},
|
||||
}
|
||||
driveItemInvite.ExpirationDateTime = nil
|
||||
createShareResponse.Share = &collaboration.Share{
|
||||
Id: &collaboration.ShareId{OpaqueId: "123"},
|
||||
}
|
||||
|
||||
_, err := driveItemPermissionsService.Invite(context.Background(), driveItemId, driveItemInvite)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
Expect(capturedReq.GetGrant().GetExpiration()).To(BeNil())
|
||||
})
|
||||
|
||||
It("does not apply a default expiration to a non-vault group share created without one", func() {
|
||||
var capturedReq *collaboration.CreateShareRequest
|
||||
gatewayClient.On("GetGroup", mock.Anything, mock.Anything).Return(getGroupResponse, nil)
|
||||
gatewayClient.On("CreateShare", mock.Anything, mock.Anything).
|
||||
Run(func(args mock.Arguments) {
|
||||
capturedReq = args.Get(1).(*collaboration.CreateShareRequest)
|
||||
}).Return(createShareResponse, nil)
|
||||
driveItemInvite.Recipients = []libregraph.DriveRecipient{
|
||||
{ObjectId: libregraph.PtrString("2"), LibreGraphRecipientType: libregraph.PtrString("group")},
|
||||
}
|
||||
driveItemInvite.ExpirationDateTime = nil
|
||||
createShareResponse.Share = &collaboration.Share{
|
||||
Id: &collaboration.ShareId{OpaqueId: "123"},
|
||||
}
|
||||
|
||||
_, err := driveItemPermissionsService.Invite(context.Background(), driveItemId, driveItemInvite)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
Expect(capturedReq.GetGrant().GetExpiration()).To(BeNil())
|
||||
})
|
||||
|
||||
It("keeps a client-provided expiration instead of the default", func() {
|
||||
var capturedReq *collaboration.CreateShareRequest
|
||||
gatewayClient.On("GetUser", mock.Anything, mock.Anything).Return(getUserResponse, nil)
|
||||
gatewayClient.On("CreateShare", mock.Anything, mock.Anything).
|
||||
Run(func(args mock.Arguments) {
|
||||
capturedReq = args.Get(1).(*collaboration.CreateShareRequest)
|
||||
}).Return(createShareResponse, nil)
|
||||
driveItemInvite.Recipients = []libregraph.DriveRecipient{
|
||||
{ObjectId: libregraph.PtrString("1"), LibreGraphRecipientType: libregraph.PtrString("user")},
|
||||
}
|
||||
explicit := time.Now().Add(time.Hour)
|
||||
driveItemInvite.ExpirationDateTime = libregraph.PtrTime(explicit)
|
||||
createShareResponse.Share = &collaboration.Share{
|
||||
Id: &collaboration.ShareId{OpaqueId: "123"},
|
||||
}
|
||||
|
||||
_, err := driveItemPermissionsService.Invite(context.Background(), driveItemId, driveItemInvite)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
Expect(utils.TSToTime(capturedReq.GetGrant().GetExpiration())).To(BeTemporally("~", explicit, time.Second))
|
||||
})
|
||||
|
||||
It("succeeds with file roles (happy path)", func() {
|
||||
gatewayClient.On("GetUser", mock.Anything, mock.Anything).Return(getUserResponse, nil)
|
||||
gatewayClient.On("CreateShare", mock.Anything, mock.Anything).Return(createShareResponse, nil)
|
||||
@@ -464,37 +349,6 @@ var _ = Describe("DriveItemPermissionsService", func() {
|
||||
Expect(permission.GrantedToV2.User.GetDisplayName()).To(Equal(getUserResponse.User.DisplayName))
|
||||
Expect(permission.GrantedToV2.User.GetId()).To(Equal("1"))
|
||||
})
|
||||
It("does not apply a default expiration to a space membership created without one", func() {
|
||||
root := &provider.ResourceId{
|
||||
StorageId: utils.VaultStorageProviderID,
|
||||
SpaceId: "2",
|
||||
OpaqueId: "2", // space root: OpaqueId == SpaceId
|
||||
}
|
||||
listSpacesResponse.StorageSpaces[0].SpaceType = "project"
|
||||
listSpacesResponse.StorageSpaces[0].Root = root
|
||||
statResponse.Info.Id = root
|
||||
statResponse.Info.Space = &provider.StorageSpace{Root: root}
|
||||
|
||||
var capturedReq *collaboration.CreateShareRequest
|
||||
gatewayClient.On("ListStorageSpaces", mock.Anything, mock.Anything).Return(listSpacesResponse, nil)
|
||||
gatewayClient.On("GetUser", mock.Anything, mock.Anything).Return(getUserResponse, nil)
|
||||
gatewayClient.On("Stat", mock.Anything, mock.Anything).Return(statResponse, nil)
|
||||
gatewayClient.On("CreateShare", mock.Anything, mock.Anything).
|
||||
Run(func(args mock.Arguments) {
|
||||
capturedReq = args.Get(1).(*collaboration.CreateShareRequest)
|
||||
}).Return(createShareResponse, nil)
|
||||
driveItemInvite.Recipients = []libregraph.DriveRecipient{
|
||||
{ObjectId: libregraph.PtrString("1"), LibreGraphRecipientType: libregraph.PtrString("user")},
|
||||
}
|
||||
driveItemInvite.ExpirationDateTime = nil
|
||||
createShareResponse.Share = &collaboration.Share{
|
||||
Id: &collaboration.ShareId{OpaqueId: "123"},
|
||||
}
|
||||
|
||||
_, err := driveItemPermissionsService.SpaceRootInvite(context.Background(), driveId, driveItemInvite)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
Expect(capturedReq.GetGrant().GetExpiration()).To(BeNil())
|
||||
})
|
||||
It("rejects to add a user to a personal space", func() {
|
||||
gatewayClient.On("ListStorageSpaces", mock.Anything, mock.Anything).Return(listSpacesResponse, nil)
|
||||
driveItemInvite.Recipients = []libregraph.DriveRecipient{
|
||||
|
||||
@@ -16,7 +16,6 @@ import (
|
||||
"github.com/owncloud/reva/v2/pkg/events"
|
||||
"github.com/owncloud/reva/v2/pkg/storagespace"
|
||||
"github.com/owncloud/reva/v2/pkg/tags"
|
||||
"github.com/owncloud/reva/v2/pkg/utils"
|
||||
"go-micro.dev/v4/metadata"
|
||||
)
|
||||
|
||||
@@ -142,7 +141,6 @@ func (g Graph) AssignTags(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
if g.eventsPublisher != nil {
|
||||
ev := events.TagsAdded{
|
||||
// The tags as requested, including any that were already present.
|
||||
Tags: strings.Join(assignment.Tags, ","),
|
||||
Ref: &provider.Reference{
|
||||
ResourceId: &rid,
|
||||
@@ -150,7 +148,6 @@ func (g Graph) AssignTags(w http.ResponseWriter, r *http.Request) {
|
||||
},
|
||||
SpaceOwner: sres.Info.Owner,
|
||||
Executant: revaCtx.ContextMustGetUser(r.Context()).Id,
|
||||
Timestamp: utils.TSNow(),
|
||||
}
|
||||
if err := events.Publish(r.Context(), g.eventsPublisher, ev); err != nil {
|
||||
g.logger.Error().Err(err).Msg("Failed to publish TagsAdded event")
|
||||
@@ -242,7 +239,6 @@ func (g Graph) UnassignTags(w http.ResponseWriter, r *http.Request) {
|
||||
// Always publish the event so the search index gets updated,
|
||||
// even if the tag was already absent from file metadata.
|
||||
ev := events.TagsRemoved{
|
||||
// The tags as requested, including any that were not present.
|
||||
Tags: strings.Join(unassignment.Tags, ","),
|
||||
Ref: &provider.Reference{
|
||||
ResourceId: &rid,
|
||||
@@ -250,7 +246,6 @@ func (g Graph) UnassignTags(w http.ResponseWriter, r *http.Request) {
|
||||
},
|
||||
SpaceOwner: sres.Info.Owner,
|
||||
Executant: revaCtx.ContextMustGetUser(ctx).Id,
|
||||
Timestamp: utils.TSNow(),
|
||||
}
|
||||
if g.publishTagsRemoved(ctx, client, ev, tagsChanged, currentTags) != nil {
|
||||
w.WriteHeader(http.StatusInternalServerError)
|
||||
|
||||
@@ -79,7 +79,7 @@ type LDAPDriver struct {
|
||||
UserObjectClass string `yaml:"user_object_class" env:"OCIS_LDAP_USER_OBJECTCLASS;GROUPS_LDAP_USER_OBJECTCLASS" desc:"The object class to use for users in the default user search filter ('inetOrgPerson')." introductionVersion:"pre5.0"`
|
||||
GroupObjectClass string `yaml:"group_object_class" env:"OCIS_LDAP_GROUP_OBJECTCLASS;GROUPS_LDAP_GROUP_OBJECTCLASS" desc:"The object class to use for groups in the default group search filter ('groupOfNames')." introductionVersion:"pre5.0"`
|
||||
IDP string `yaml:"idp" env:"OCIS_URL;OCIS_OIDC_ISSUER;GROUPS_IDP_URL" desc:"The identity provider value to set in the group IDs of the CS3 group objects for groups returned by this group provider." introductionVersion:"pre5.0"`
|
||||
MasterID string `yaml:"master_id" env:"OCIS_MULTI_INSTANCE_MASTER_ID" desc:"The master instance ID for multi-instance setups. When set, LDAP user filters are enhanced to also match users belonging to the master instance. Also set 'user_filter'. Without an explicit 'user_filter', this instance resolves every user in the shared LDAP directory." introductionVersion:"7.0"`
|
||||
MasterID string `yaml:"master_id" env:"OCIS_MULTI_INSTANCE_MASTER_ID" desc:"The master instance ID for multi-instance setups. When set, LDAP user filters are enhanced to also match users belonging to the master instance." introductionVersion:"7.0"`
|
||||
UserMemberAttribute string `yaml:"user_member_attribute" env:"OCIS_LDAP_USER_MEMBER_ATTRIBUTE" desc:"LDAP attribute that marks a user as a member of an instance." introductionVersion:"7.0"`
|
||||
UserGuestAttribute string `yaml:"user_guest_attribute" env:"OCIS_LDAP_USER_GUEST_ATTRIBUTE" desc:"LDAP attribute that marks a user as a guest of an instance." introductionVersion:"7.0"`
|
||||
UserSchema LDAPUserSchema `yaml:"user_schema"`
|
||||
|
||||
@@ -42,9 +42,5 @@ func Validate(cfg *config.Config) error {
|
||||
return shared.MissingLDAPBindPassword(cfg.Service.Name)
|
||||
}
|
||||
|
||||
if cfg.Driver == "ldap" && cfg.Drivers.LDAP.MasterID != "" && cfg.Drivers.LDAP.UserFilter == "" {
|
||||
return shared.MissingLDAPUserFilterForMasterID(cfg.Service.Name)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
@@ -1,63 +0,0 @@
|
||||
package parser
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
"github.com/owncloud/ocis/v2/services/groups/pkg/config"
|
||||
)
|
||||
|
||||
func TestValidateMasterIDRequiresUserFilter(t *testing.T) {
|
||||
cfg := &config.Config{
|
||||
Service: config.Service{Name: "groups"},
|
||||
TokenManager: &config.TokenManager{JWTSecret: "secret"},
|
||||
Driver: "ldap",
|
||||
Drivers: config.Drivers{
|
||||
LDAP: config.LDAPDriver{
|
||||
BindPassword: "secret",
|
||||
MasterID: "master-1",
|
||||
UserFilter: "",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
err := Validate(cfg)
|
||||
assert.Error(t, err)
|
||||
}
|
||||
|
||||
func TestValidateMasterIDWithUserFilterPasses(t *testing.T) {
|
||||
cfg := &config.Config{
|
||||
Service: config.Service{Name: "groups"},
|
||||
TokenManager: &config.TokenManager{JWTSecret: "secret"},
|
||||
Driver: "ldap",
|
||||
Drivers: config.Drivers{
|
||||
LDAP: config.LDAPDriver{
|
||||
BindPassword: "secret",
|
||||
MasterID: "master-1",
|
||||
UserFilter: "(ownCloudMemberOf=instance-1)",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
err := Validate(cfg)
|
||||
assert.NoError(t, err)
|
||||
}
|
||||
|
||||
func TestValidateNoMasterIDWithEmptyUserFilterPasses(t *testing.T) {
|
||||
cfg := &config.Config{
|
||||
Service: config.Service{Name: "groups"},
|
||||
TokenManager: &config.TokenManager{JWTSecret: "secret"},
|
||||
Driver: "ldap",
|
||||
Drivers: config.Drivers{
|
||||
LDAP: config.LDAPDriver{
|
||||
BindPassword: "secret",
|
||||
MasterID: "",
|
||||
UserFilter: "",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
err := Validate(cfg)
|
||||
assert.NoError(t, err)
|
||||
}
|
||||
@@ -32,5 +32,5 @@ type Keycloak struct {
|
||||
ClientRealm string `yaml:"client_realm" env:"OCIS_KEYCLOAK_CLIENT_REALM;INVITATIONS_KEYCLOAK_CLIENT_REALM" desc:"The realm the client is defined in." introductionVersion:"pre5.0"`
|
||||
UserRealm string `yaml:"user_realm" env:"OCIS_KEYCLOAK_USER_REALM;INVITATIONS_KEYCLOAK_USER_REALM" desc:"The realm users are defined." introductionVersion:"pre5.0"`
|
||||
InsecureSkipVerify bool `yaml:"insecure_skip_verify" env:"OCIS_KEYCLOAK_INSECURE_SKIP_VERIFY;INVITATIONS_KEYCLOAK_INSECURE_SKIP_VERIFY" desc:"Disable TLS certificate validation for Keycloak connections. Do not set this in production environments." introductionVersion:"pre5.0"`
|
||||
ExecuteActions []string `yaml:"execute_actions" env:"INVITATIONS_KEYCLOAK_EXECUTE_ACTIONS" desc:"A comma-separated list of Keycloak required actions sent to invited guests via the execute-actions email. Values are passed to Keycloak as-is. Defaults to 'UPDATE_PASSWORD,VERIFY_EMAIL'. See the Environment Variable Types description for more details." introductionVersion:"9.0.0"`
|
||||
ExecuteActions []string `yaml:"execute_actions" env:"INVITATIONS_KEYCLOAK_EXECUTE_ACTIONS" desc:"A comma-separated list of Keycloak required actions sent to invited guests via the execute-actions email. Values are passed to Keycloak as-is. Defaults to 'UPDATE_PASSWORD,VERIFY_EMAIL'. See the Environment Variable Types description for more details." introductionVersion:"8.3.0"`
|
||||
}
|
||||
@@ -79,7 +79,7 @@ type Store struct {
|
||||
TTL time.Duration `yaml:"ttl" env:"OCIS_PERSISTENT_STORE_TTL;NOTIFICATIONS_STORE_TTL" desc:"Time to live for notifications in the store. Defaults to '336h' (2 weeks). See the Environment Variable Types description for more details." introductionVersion:"7.1.0"`
|
||||
AuthUsername string `yaml:"username" env:"OCIS_PERSISTENT_STORE_AUTH_USERNAME;NOTIFICATIONS_STORE_AUTH_USERNAME" desc:"The username to authenticate with the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"7.1.0"`
|
||||
AuthPassword string `yaml:"password" env:"OCIS_PERSISTENT_STORE_AUTH_PASSWORD;NOTIFICATIONS_STORE_AUTH_PASSWORD" desc:"The password to authenticate with the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"7.1.0"`
|
||||
EnableTLS bool `yaml:"enable_tls" env:"OCIS_PERSISTENT_STORE_ENABLE_TLS;NOTIFICATIONS_STORE_ENABLE_TLS" desc:"Activate TLS for the connection to the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"9.0.0"`
|
||||
TLSInsecure bool `yaml:"tls_insecure" env:"OCIS_PERSISTENT_STORE_TLS_INSECURE;NOTIFICATIONS_STORE_TLS_INSECURE" desc:"Disable TLS certificate verification for the store connection. Only applies when store type 'nats-js-kv' is configured. Do not enable this in production because it disables authentication of the NATS server. Use it only for testing with self-signed certificates." introductionVersion:"9.0.0"`
|
||||
TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OCIS_PERSISTENT_STORE_TLS_ROOT_CA_CERTIFICATE;NOTIFICATIONS_STORE_TLS_ROOT_CA_CERTIFICATE" desc:"Path to the PEM-encoded root CA certificate for the store TLS connection. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"9.0.0"`
|
||||
EnableTLS bool `yaml:"enable_tls" env:"OCIS_PERSISTENT_STORE_ENABLE_TLS;NOTIFICATIONS_STORE_ENABLE_TLS" desc:"Activate TLS for the connection to the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
|
||||
TLSInsecure bool `yaml:"tls_insecure" env:"OCIS_PERSISTENT_STORE_TLS_INSECURE;NOTIFICATIONS_STORE_TLS_INSECURE" desc:"Disable TLS certificate verification for the store connection. Only applies when store type 'nats-js-kv' is configured. Do not enable this in production because it disables authentication of the NATS server. Use it only for testing with self-signed certificates." introductionVersion:"8.3.0"`
|
||||
TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OCIS_PERSISTENT_STORE_TLS_ROOT_CA_CERTIFICATE;NOTIFICATIONS_STORE_TLS_ROOT_CA_CERTIFICATE" desc:"Path to the PEM-encoded root CA certificate for the store TLS connection. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
|
||||
}
|
||||
@@ -39,7 +39,7 @@ type Config struct {
|
||||
|
||||
AllowPropfindDepthInfinity bool `yaml:"allow_propfind_depth_infinity" env:"OCDAV_ALLOW_PROPFIND_DEPTH_INFINITY" desc:"Allow the use of depth infinity in PROPFINDS. When enabled, a propfind will traverse through all subfolders. If many subfolders are expected, depth infinity can cause heavy server load and/or delayed response times." introductionVersion:"pre5.0"`
|
||||
|
||||
DisablePropfindPublicLinkResolution bool `yaml:"disable_propfind_public_link_resolution" env:"OCDAV_DISABLE_PROPFIND_PUBLIC_LINK_RESOLUTION" desc:"Disable the resolution of public link shares when answering PROPFIND requests. When disabled, the oc:share-type property will not be populated with public link share information, which can reduce load on services for large collections." introductionVersion:"9.0.0"`
|
||||
DisablePropfindPublicLinkResolution bool `yaml:"disable_propfind_public_link_resolution" env:"OCDAV_DISABLE_PROPFIND_PUBLIC_LINK_RESOLUTION" desc:"Disable the resolution of public link shares when answering PROPFIND requests. When disabled, the oc:share-type property will not be populated with public link share information, which can reduce load on services for large collections." introductionVersion:"8.3.0"`
|
||||
}
|
||||
|
||||
type Log struct {
|
||||
|
||||
@@ -38,7 +38,7 @@ type SigningKeys struct {
|
||||
TTL time.Duration `yaml:"ttl" env:"OCIS_CACHE_TTL;OCS_PRESIGNEDURL_SIGNING_KEYS_STORE_TTL" desc:"Default time to live for signing keys. See the Environment Variable Types description for more details." introductionVersion:"5.0"`
|
||||
AuthUsername string `yaml:"username" env:"OCIS_CACHE_AUTH_USERNAME;OCS_PRESIGNEDURL_SIGNING_KEYS_STORE_AUTH_USERNAME" desc:"The username to authenticate with the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"5.0"`
|
||||
AuthPassword string `yaml:"password" env:"OCIS_CACHE_AUTH_PASSWORD;OCS_PRESIGNEDURL_SIGNING_KEYS_STORE_AUTH_PASSWORD" desc:"The password to authenticate with the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"5.0"`
|
||||
EnableTLS bool `yaml:"enable_tls" env:"OCIS_CACHE_ENABLE_TLS;OCS_PRESIGNEDURL_SIGNING_KEYS_STORE_ENABLE_TLS" desc:"Activate TLS for the connection to the signing key store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"9.0.0"`
|
||||
TLSInsecure bool `yaml:"tls_insecure" env:"OCIS_CACHE_TLS_INSECURE;OCS_PRESIGNEDURL_SIGNING_KEYS_STORE_TLS_INSECURE" desc:"Disable TLS certificate verification for the signing key store connection. Only applies when store type 'nats-js-kv' is configured. Do not enable this in production because it disables authentication of the NATS server. Use it only for testing with self-signed certificates." introductionVersion:"9.0.0"`
|
||||
TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OCIS_CACHE_TLS_ROOT_CA_CERTIFICATE;OCS_PRESIGNEDURL_SIGNING_KEYS_STORE_TLS_ROOT_CA_CERTIFICATE" desc:"Path to the PEM-encoded root CA certificate for the signing key store TLS connection. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"9.0.0"`
|
||||
EnableTLS bool `yaml:"enable_tls" env:"OCIS_CACHE_ENABLE_TLS;OCS_PRESIGNEDURL_SIGNING_KEYS_STORE_ENABLE_TLS" desc:"Activate TLS for the connection to the signing key store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
|
||||
TLSInsecure bool `yaml:"tls_insecure" env:"OCIS_CACHE_TLS_INSECURE;OCS_PRESIGNEDURL_SIGNING_KEYS_STORE_TLS_INSECURE" desc:"Disable TLS certificate verification for the signing key store connection. Only applies when store type 'nats-js-kv' is configured. Do not enable this in production because it disables authentication of the NATS server. Use it only for testing with self-signed certificates." introductionVersion:"8.3.0"`
|
||||
TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OCIS_CACHE_TLS_ROOT_CA_CERTIFICATE;OCS_PRESIGNEDURL_SIGNING_KEYS_STORE_TLS_ROOT_CA_CERTIFICATE" desc:"Path to the PEM-encoded root CA certificate for the signing key store TLS connection. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
|
||||
}
|
||||
@@ -64,7 +64,7 @@ type Store struct {
|
||||
TTL time.Duration `yaml:"ttl" env:"OCIS_PERSISTENT_STORE_TTL;POSTPROCESSING_STORE_TTL" desc:"Time to live for events in the store. See the Environment Variable Types description for more details." introductionVersion:"pre5.0"`
|
||||
AuthUsername string `yaml:"username" env:"OCIS_PERSISTENT_STORE_AUTH_USERNAME;POSTPROCESSING_STORE_AUTH_USERNAME" desc:"The username to authenticate with the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"5.0"`
|
||||
AuthPassword string `yaml:"password" env:"OCIS_PERSISTENT_STORE_AUTH_PASSWORD;POSTPROCESSING_STORE_AUTH_PASSWORD" desc:"The password to authenticate with the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"5.0"`
|
||||
EnableTLS bool `yaml:"enable_tls" env:"OCIS_PERSISTENT_STORE_ENABLE_TLS;POSTPROCESSING_STORE_ENABLE_TLS" desc:"Activate TLS for the connection to the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"9.0.0"`
|
||||
TLSInsecure bool `yaml:"tls_insecure" env:"OCIS_PERSISTENT_STORE_TLS_INSECURE;POSTPROCESSING_STORE_TLS_INSECURE" desc:"Disable TLS certificate verification for the store connection. Only applies when store type 'nats-js-kv' is configured. Do not enable this in production because it disables authentication of the NATS server. Use it only for testing with self-signed certificates." introductionVersion:"9.0.0"`
|
||||
TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OCIS_PERSISTENT_STORE_TLS_ROOT_CA_CERTIFICATE;POSTPROCESSING_STORE_TLS_ROOT_CA_CERTIFICATE" desc:"Path to the PEM-encoded root CA certificate for the store TLS connection. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"9.0.0"`
|
||||
EnableTLS bool `yaml:"enable_tls" env:"OCIS_PERSISTENT_STORE_ENABLE_TLS;POSTPROCESSING_STORE_ENABLE_TLS" desc:"Activate TLS for the connection to the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
|
||||
TLSInsecure bool `yaml:"tls_insecure" env:"OCIS_PERSISTENT_STORE_TLS_INSECURE;POSTPROCESSING_STORE_TLS_INSECURE" desc:"Disable TLS certificate verification for the store connection. Only applies when store type 'nats-js-kv' is configured. Do not enable this in production because it disables authentication of the NATS server. Use it only for testing with self-signed certificates." introductionVersion:"8.3.0"`
|
||||
TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OCIS_PERSISTENT_STORE_TLS_ROOT_CA_CERTIFICATE;POSTPROCESSING_STORE_TLS_ROOT_CA_CERTIFICATE" desc:"Path to the PEM-encoded root CA certificate for the store TLS connection. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
|
||||
}
|
||||
@@ -287,19 +287,15 @@ func loadMiddlewares(logger log.Logger, cfg *config.Config,
|
||||
if cfg.EnableBasicAuth {
|
||||
logger.Warn().Msg("basic auth enabled, use only for testing or development")
|
||||
authenticators = append(authenticators, middleware.BasicAuthenticator{
|
||||
Logger: logger,
|
||||
UserProvider: userProvider,
|
||||
UserRoleAssigner: roleAssigner,
|
||||
MultiInstanceEnabled: cfg.MultiInstance.Enabled,
|
||||
Logger: logger,
|
||||
UserProvider: userProvider,
|
||||
})
|
||||
}
|
||||
|
||||
if cfg.AuthMiddleware.AllowAppAuth {
|
||||
authenticators = append(authenticators, middleware.AppAuthAuthenticator{
|
||||
Logger: logger,
|
||||
RevaGatewaySelector: gatewaySelector,
|
||||
UserRoleAssigner: roleAssigner,
|
||||
MultiInstanceEnabled: cfg.MultiInstance.Enabled,
|
||||
Logger: logger,
|
||||
RevaGatewaySelector: gatewaySelector,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -147,9 +147,9 @@ type Cache struct {
|
||||
DisablePersistence bool `yaml:"disable_persistence" env:"OCIS_CACHE_DISABLE_PERSISTENCE;PROXY_OIDC_USERINFO_CACHE_DISABLE_PERSISTENCE" desc:"Disables persistence of the cache. Only applies when store type 'nats-js-kv' is configured. Defaults to false." introductionVersion:"pre5.0"`
|
||||
AuthUsername string `yaml:"username" env:"OCIS_CACHE_AUTH_USERNAME;PROXY_OIDC_USERINFO_CACHE_AUTH_USERNAME" desc:"The username to authenticate with the cache. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"5.0"`
|
||||
AuthPassword string `yaml:"password" env:"OCIS_CACHE_AUTH_PASSWORD;PROXY_OIDC_USERINFO_CACHE_AUTH_PASSWORD" desc:"The password to authenticate with the cache. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"5.0"`
|
||||
EnableTLS bool `yaml:"enable_tls" env:"OCIS_CACHE_ENABLE_TLS;PROXY_OIDC_USERINFO_CACHE_ENABLE_TLS" desc:"Activate TLS for the connection to the cache store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"9.0.0"`
|
||||
TLSInsecure bool `yaml:"tls_insecure" env:"OCIS_CACHE_TLS_INSECURE;PROXY_OIDC_USERINFO_CACHE_TLS_INSECURE" desc:"Disable TLS certificate verification for the cache store connection. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"9.0.0"`
|
||||
TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OCIS_CACHE_TLS_ROOT_CA_CERTIFICATE;PROXY_OIDC_USERINFO_CACHE_TLS_ROOT_CA_CERTIFICATE" desc:"Path to the PEM-encoded root CA certificate for the cache store TLS connection. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"9.0.0"`
|
||||
EnableTLS bool `yaml:"enable_tls" env:"OCIS_CACHE_ENABLE_TLS;PROXY_OIDC_USERINFO_CACHE_ENABLE_TLS" desc:"Activate TLS for the connection to the cache store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
|
||||
TLSInsecure bool `yaml:"tls_insecure" env:"OCIS_CACHE_TLS_INSECURE;PROXY_OIDC_USERINFO_CACHE_TLS_INSECURE" desc:"Disable TLS certificate verification for the cache store connection. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
|
||||
TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OCIS_CACHE_TLS_ROOT_CA_CERTIFICATE;PROXY_OIDC_USERINFO_CACHE_TLS_ROOT_CA_CERTIFICATE" desc:"Path to the PEM-encoded root CA certificate for the cache store TLS connection. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
|
||||
}
|
||||
|
||||
// RoleAssignment contains the configuration for how to assign roles to users during login
|
||||
@@ -205,9 +205,9 @@ type SigningKeys struct {
|
||||
DisablePersistence bool `yaml:"disable_persistence" env:"OCIS_CACHE_DISABLE_PERSISTENCE;PROXY_PRESIGNEDURL_SIGNING_KEYS_STORE_DISABLE_PERSISTENCE" desc:"Disables persistence of the store. Only applies when store type 'nats-js-kv' is configured. Defaults to true." introductionVersion:"5.0"`
|
||||
AuthUsername string `yaml:"username" env:"OCIS_CACHE_AUTH_USERNAME;PROXY_PRESIGNEDURL_SIGNING_KEYS_STORE_AUTH_USERNAME" desc:"The username to authenticate with the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"5.0"`
|
||||
AuthPassword string `yaml:"password" env:"OCIS_CACHE_AUTH_PASSWORD;PROXY_PRESIGNEDURL_SIGNING_KEYS_STORE_AUTH_PASSWORD" desc:"The password to authenticate with the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"5.0"`
|
||||
EnableTLS bool `yaml:"enable_tls" env:"OCIS_CACHE_ENABLE_TLS;PROXY_PRESIGNEDURL_SIGNING_KEYS_STORE_ENABLE_TLS" desc:"Activate TLS for the connection to the signing key store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"9.0.0"`
|
||||
TLSInsecure bool `yaml:"tls_insecure" env:"OCIS_CACHE_TLS_INSECURE;PROXY_PRESIGNEDURL_SIGNING_KEYS_STORE_TLS_INSECURE" desc:"Disable TLS certificate verification for the signing key store connection. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"9.0.0"`
|
||||
TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OCIS_CACHE_TLS_ROOT_CA_CERTIFICATE;PROXY_PRESIGNEDURL_SIGNING_KEYS_STORE_TLS_ROOT_CA_CERTIFICATE" desc:"Path to the PEM-encoded root CA certificate for the signing key store TLS connection. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"9.0.0"`
|
||||
EnableTLS bool `yaml:"enable_tls" env:"OCIS_CACHE_ENABLE_TLS;PROXY_PRESIGNEDURL_SIGNING_KEYS_STORE_ENABLE_TLS" desc:"Activate TLS for the connection to the signing key store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
|
||||
TLSInsecure bool `yaml:"tls_insecure" env:"OCIS_CACHE_TLS_INSECURE;PROXY_PRESIGNEDURL_SIGNING_KEYS_STORE_TLS_INSECURE" desc:"Disable TLS certificate verification for the signing key store connection. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
|
||||
TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OCIS_CACHE_TLS_ROOT_CA_CERTIFICATE;PROXY_PRESIGNEDURL_SIGNING_KEYS_STORE_TLS_ROOT_CA_CERTIFICATE" desc:"Path to the PEM-encoded root CA certificate for the signing key store TLS connection. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
|
||||
}
|
||||
|
||||
// ClaimsSelectorConf is the config for the claims-selector
|
||||
|
||||
@@ -105,15 +105,6 @@ func (m accountResolver) verifyUser(w http.ResponseWriter, req *http.Request, us
|
||||
return
|
||||
}
|
||||
|
||||
if errors.Is(err, backend.ErrAccountNotFound) {
|
||||
// the identity backend excludes disabled accounts from by-claim
|
||||
// lookups, so a disabled account also ends up here, not just a
|
||||
// genuinely unknown username.
|
||||
m.logger.Debug().Interface("user", user).Msg("Not found")
|
||||
w.WriteHeader(http.StatusUnauthorized)
|
||||
return
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
m.logger.Error().Err(err).Msg("Could not get user by claim")
|
||||
w.WriteHeader(http.StatusInternalServerError)
|
||||
|
||||
@@ -472,35 +472,3 @@ func TestResolveUserType(t *testing.T) {
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// TestVerifyUserUnauthorizedOnUserNotFound covers the verifyUser fast path
|
||||
// (user already in context, e.g. via AppAuthAuthenticator/BasicAuthenticator),
|
||||
// as opposed to TestUnauthorizedOnUserNotFound which covers the claims-based
|
||||
// resolveUserFromClaims path. A disabled account is looked up by username and
|
||||
// comes back as ErrAccountNotFound (the identity backend excludes disabled
|
||||
// accounts from by-claim lookups), which must map to 401, not 500.
|
||||
func TestVerifyUserUnauthorizedOnUserNotFound(t *testing.T) {
|
||||
user := &userv1beta1.User{
|
||||
Id: &userv1beta1.UserId{Idp: "https://idx.example.com", OpaqueId: "123"},
|
||||
Username: "alice",
|
||||
}
|
||||
|
||||
ub := mocks.UserBackend{}
|
||||
ub.On("GetUserByClaims", mock.Anything, "username", "alice").Return(nil, "", backend.ErrAccountNotFound)
|
||||
|
||||
ra := userRoleMocks.UserRoleAssigner{}
|
||||
|
||||
sut := AccountResolver(
|
||||
Logger(log.NewLogger()),
|
||||
UserProvider(&ub),
|
||||
UserRoleAssigner(&ra),
|
||||
)(mockHandler{})
|
||||
|
||||
req := httptest.NewRequest("GET", "http://example.com/foo", nil)
|
||||
req = req.WithContext(revactx.ContextSetUser(context.Background(), user))
|
||||
rw := httptest.NewRecorder()
|
||||
|
||||
sut.ServeHTTP(rw, req)
|
||||
|
||||
assert.Equal(t, http.StatusUnauthorized, rw.Code)
|
||||
}
|
||||
@@ -6,17 +6,15 @@ import (
|
||||
gateway "github.com/cs3org/go-cs3apis/cs3/gateway/v1beta1"
|
||||
cs3rpc "github.com/cs3org/go-cs3apis/cs3/rpc/v1beta1"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/log"
|
||||
"github.com/owncloud/ocis/v2/services/proxy/pkg/userroles"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/oidc"
|
||||
revactx "github.com/owncloud/reva/v2/pkg/ctx"
|
||||
"github.com/owncloud/reva/v2/pkg/rgrpc/todo/pool"
|
||||
)
|
||||
|
||||
// AppAuthAuthenticator defines the app auth authenticator
|
||||
type AppAuthAuthenticator struct {
|
||||
Logger log.Logger
|
||||
RevaGatewaySelector pool.Selectable[gateway.GatewayAPIClient]
|
||||
UserRoleAssigner userroles.UserRoleAssigner
|
||||
MultiInstanceEnabled bool
|
||||
Logger log.Logger
|
||||
RevaGatewaySelector pool.Selectable[gateway.GatewayAPIClient]
|
||||
}
|
||||
|
||||
// Authenticate implements the authenticator interface to authenticate requests via app auth.
|
||||
@@ -28,15 +26,6 @@ func (m AppAuthAuthenticator) Authenticate(r *http.Request) (*http.Request, erro
|
||||
return nil, ErrAuthenticationFailed
|
||||
}
|
||||
|
||||
if m.MultiInstanceEnabled {
|
||||
// App passwords carry no OIDC claims, so there is no way to verify
|
||||
// tenant membership (OCIS_MULTI_INSTANCE_MEMBER_CLAIM/GUEST_CLAIM)
|
||||
// for them. Reject rather than let the request bypass the tenant
|
||||
// check in services/proxy/pkg/middleware/account_resolver.go's
|
||||
// resolveUserType.
|
||||
return nil, ErrAuthenticationFailed
|
||||
}
|
||||
|
||||
username, password, ok := r.BasicAuth()
|
||||
if !ok {
|
||||
return nil, ErrAuthenticationFailed
|
||||
@@ -59,19 +48,17 @@ func (m AppAuthAuthenticator) Authenticate(r *http.Request) (*http.Request, erro
|
||||
return nil, ErrAuthenticationFailed
|
||||
}
|
||||
|
||||
user, err := m.UserRoleAssigner.ApplyUserRole(r.Context(), authenticateResponse.GetUser())
|
||||
if err != nil {
|
||||
m.Logger.Error().Err(err).Msg("could not apply user role")
|
||||
return nil, ErrAuthenticationFailed
|
||||
}
|
||||
|
||||
// only mutate the request once we know we're returning success, so a
|
||||
// failed authentication attempt can't leave a stale access token behind
|
||||
// for a later authenticator in the chain to build on.
|
||||
r.Header.Set(revactx.TokenHeader, authenticateResponse.GetToken())
|
||||
// the user is already authenticated, put it into the context directly
|
||||
// instead of faking oidc claims for the account resolver to re-resolve.
|
||||
r = r.WithContext(revactx.ContextSetUser(r.Context(), user))
|
||||
|
||||
user := authenticateResponse.GetUser()
|
||||
// fake oidc claims for the account resolver
|
||||
claims := map[string]interface{}{
|
||||
oidc.Iss: user.GetId().GetIdp(),
|
||||
oidc.PreferredUsername: user.GetUsername(),
|
||||
oidc.Email: user.GetMail(),
|
||||
oidc.OwncloudUUID: user.GetId().GetOpaqueId(),
|
||||
}
|
||||
r = r.WithContext(oidc.NewContext(r.Context(), claims))
|
||||
|
||||
return r, nil
|
||||
}
|
||||
@@ -1,41 +1,27 @@
|
||||
package middleware
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
|
||||
gateway "github.com/cs3org/go-cs3apis/cs3/gateway/v1beta1"
|
||||
userv1beta1 "github.com/cs3org/go-cs3apis/cs3/identity/user/v1beta1"
|
||||
rpcv1beta1 "github.com/cs3org/go-cs3apis/cs3/rpc/v1beta1"
|
||||
backendmocks "github.com/owncloud/ocis/v2/services/proxy/pkg/user/backend/mocks"
|
||||
"github.com/owncloud/ocis/v2/services/proxy/pkg/userroles/mocks"
|
||||
"github.com/owncloud/reva/v2/pkg/auth/scope"
|
||||
revactx "github.com/owncloud/reva/v2/pkg/ctx"
|
||||
"github.com/owncloud/reva/v2/pkg/rgrpc/todo/pool"
|
||||
"github.com/owncloud/reva/v2/pkg/token/manager/jwt"
|
||||
"github.com/stretchr/testify/mock"
|
||||
"google.golang.org/grpc"
|
||||
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
. "github.com/onsi/gomega"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/log"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/oidc"
|
||||
)
|
||||
|
||||
var _ = Describe("Authenticating requests", Label("AppAuthAuthenticator"), func() {
|
||||
var authenticator Authenticator
|
||||
var roleAssigner *mocks.UserRoleAssigner
|
||||
BeforeEach(func() {
|
||||
pool.RemoveSelector("GatewaySelector" + "com.owncloud.api.gateway")
|
||||
|
||||
roleAssigner = &mocks.UserRoleAssigner{}
|
||||
roleAssigner.EXPECT().ApplyUserRole(mock.Anything, mock.Anything).RunAndReturn(
|
||||
func(ctx context.Context, user *userv1beta1.User) (*userv1beta1.User, error) { return user, nil },
|
||||
).Maybe()
|
||||
|
||||
authenticator = AppAuthAuthenticator{
|
||||
Logger: log.NewLogger(),
|
||||
UserRoleAssigner: roleAssigner,
|
||||
Logger: log.NewLogger(),
|
||||
RevaGatewaySelector: pool.GetSelector[gateway.GatewayAPIClient](
|
||||
"GatewaySelector",
|
||||
"com.owncloud.api.gateway",
|
||||
@@ -82,81 +68,12 @@ var _ = Describe("Authenticating requests", Label("AppAuthAuthenticator"), func(
|
||||
Expect(req2).ToNot(BeNil())
|
||||
Expect(req2.Header.Get("x-access-token")).To(Equal("reva-token"))
|
||||
|
||||
user, ok := revactx.ContextGetUser(req2.Context())
|
||||
Expect(ok).To(Equal(true))
|
||||
Expect(user.GetId().GetIdp()).To(Equal("testIDP"))
|
||||
Expect(user.GetId().GetOpaqueId()).To(Equal("abcd-1234"))
|
||||
Expect(user.GetUsername()).To(Equal("alice"))
|
||||
Expect(user.GetMail()).To(Equal("alice@example.prv"))
|
||||
})
|
||||
})
|
||||
|
||||
When("multi-instance mode is enabled", func() {
|
||||
It("rejects the request, since app passwords carry no tenant-membership claims", func() {
|
||||
multiInstanceAuthenticator := AppAuthAuthenticator{
|
||||
Logger: log.NewLogger(),
|
||||
UserRoleAssigner: roleAssigner,
|
||||
MultiInstanceEnabled: true,
|
||||
RevaGatewaySelector: pool.GetSelector[gateway.GatewayAPIClient](
|
||||
"GatewaySelector",
|
||||
"com.owncloud.api.gateway",
|
||||
func(cc grpc.ClientConnInterface) gateway.GatewayAPIClient {
|
||||
return mockGatewayClient{
|
||||
AuthenticateFunc: func(authType, clientID, clientSecret string) *gateway.AuthenticateResponse {
|
||||
return &gateway.AuthenticateResponse{Status: &rpcv1beta1.Status{Code: rpcv1beta1.Code_CODE_OK}}
|
||||
},
|
||||
}
|
||||
},
|
||||
),
|
||||
}
|
||||
|
||||
req := httptest.NewRequest(http.MethodGet, "http://example.com/example/path", http.NoBody)
|
||||
req.SetBasicAuth("test-user", "AppPassword")
|
||||
|
||||
req2, err := multiInstanceAuthenticator.Authenticate(req)
|
||||
|
||||
Expect(err).To(HaveOccurred())
|
||||
Expect(req2).To(BeNil())
|
||||
})
|
||||
})
|
||||
|
||||
When("the account resolver is configured with a non-default PROXY_USER_OIDC_CLAIM", func() {
|
||||
It("still resolves the already-authenticated user, bypassing claim-based lookup", func() {
|
||||
req := httptest.NewRequest(http.MethodGet, "http://example.com/graph/v1.0/me", http.NoBody)
|
||||
req.SetBasicAuth("test-user", "AppPassword")
|
||||
|
||||
authenticatedReq, err := authenticator.Authenticate(req)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
|
||||
resolvedUser := &userv1beta1.User{
|
||||
Id: &userv1beta1.UserId{Idp: "testIDP", OpaqueId: "abcd-1234"},
|
||||
Username: "alice",
|
||||
}
|
||||
tokenManager, err := jwt.New(map[string]interface{}{"secret": "change-me", "expires": int64(60)})
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
s, err := scope.AddOwnerScope(nil)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
token, err := tokenManager.MintToken(context.Background(), resolvedUser, s)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
|
||||
ub := backendmocks.UserBackend{}
|
||||
// services/proxy/pkg/middleware/account_resolver.go's verifyUser always looks
|
||||
// up the user by "username", regardless of the configured PROXY_USER_OIDC_CLAIM,
|
||||
// because the user arrives already authenticated via the request context.
|
||||
ub.On("GetUserByClaims", mock.Anything, "username", "alice", mock.Anything).Return(resolvedUser, token, nil)
|
||||
|
||||
resolver := AccountResolver(
|
||||
Logger(log.NewLogger()),
|
||||
UserProvider(&ub),
|
||||
UserRoleAssigner(roleAssigner),
|
||||
UserOIDCClaim("sub"),
|
||||
UserCS3Claim("userid"),
|
||||
)(mockHandler{})
|
||||
|
||||
rw := httptest.NewRecorder()
|
||||
resolver.ServeHTTP(rw, authenticatedReq)
|
||||
|
||||
Expect(rw.Code).To(Equal(http.StatusOK))
|
||||
claims := oidc.FromContext(req2.Context())
|
||||
Expect(claims).ToNot(BeNil())
|
||||
Expect(claims[oidc.Iss]).To(Equal("testIDP"))
|
||||
Expect(claims[oidc.PreferredUsername]).To(Equal("alice"))
|
||||
Expect(claims[oidc.Email]).To(Equal("alice@example.prv"))
|
||||
Expect(claims[oidc.OwncloudUUID]).To(Equal("abcd-1234"))
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
@@ -20,8 +20,6 @@ import (
|
||||
"github.com/owncloud/ocis/v2/services/proxy/pkg/router"
|
||||
"github.com/owncloud/ocis/v2/services/proxy/pkg/user/backend"
|
||||
"github.com/owncloud/ocis/v2/services/proxy/pkg/user/backend/mocks"
|
||||
userRoleMocks "github.com/owncloud/ocis/v2/services/proxy/pkg/userroles/mocks"
|
||||
revactx "github.com/owncloud/reva/v2/pkg/ctx"
|
||||
"github.com/owncloud/reva/v2/pkg/rgrpc/todo/pool"
|
||||
"github.com/stretchr/testify/mock"
|
||||
"go-micro.dev/v4/store"
|
||||
@@ -83,17 +81,10 @@ var _ = Describe("Authenticating requests", Label("Authentication"), func() {
|
||||
pool.RemoveSelector("GatewaySelector" + "com.owncloud.api.gateway")
|
||||
|
||||
logger := log.NewLogger()
|
||||
|
||||
roleAssigner := &userRoleMocks.UserRoleAssigner{}
|
||||
roleAssigner.EXPECT().ApplyUserRole(mock.Anything, mock.Anything).RunAndReturn(
|
||||
func(ctx context.Context, user *userv1beta1.User) (*userv1beta1.User, error) { return user, nil },
|
||||
).Maybe()
|
||||
|
||||
authenticators = []Authenticator{
|
||||
BasicAuthenticator{
|
||||
Logger: logger,
|
||||
UserProvider: &ub,
|
||||
UserRoleAssigner: roleAssigner,
|
||||
Logger: logger,
|
||||
UserProvider: &ub,
|
||||
},
|
||||
&OIDCAuthenticator{
|
||||
OIDCIss: "http://idp.example.com",
|
||||
@@ -160,7 +151,7 @@ var _ = Describe("Authenticating requests", Label("Authentication"), func() {
|
||||
testHandler.ServeHTTP(rr, req)
|
||||
Expect(rr).To(HaveHTTPStatus(http.StatusOK))
|
||||
})
|
||||
It("ensures the authenticated user is in the context when the Basic authentication is successful", func() {
|
||||
It("ensures the context oidc data when user the Basic authentication is successful", func() {
|
||||
req := httptest.NewRequest("PROPFIND", "http://example.com/remote.php/dav/public-files/", http.NoBody)
|
||||
req = req.WithContext(router.SetRoutingInfo(context.Background(), router.RoutingInfo{}))
|
||||
req.SetBasicAuth("testuser", "testpassword")
|
||||
@@ -169,12 +160,12 @@ var _ = Describe("Authenticating requests", Label("Authentication"), func() {
|
||||
EnableBasicAuth(true),
|
||||
)
|
||||
testHandler := handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
user, ok := revactx.ContextGetUser(r.Context())
|
||||
Expect(ok).To(Equal(true))
|
||||
Expect(user.GetId().GetIdp()).To(Equal("IdpId"))
|
||||
Expect(user.GetId().GetOpaqueId()).To(Equal("OpaqueId"))
|
||||
Expect(user.GetUsername()).To(Equal("testuser"))
|
||||
Expect(user.GetMail()).To(Equal("testuser@example.com"))
|
||||
Expect(oidc.FromContext(r.Context())).To(Equal(map[string]interface{}{
|
||||
"email": "testuser@example.com",
|
||||
"ownclouduuid": "OpaqueId",
|
||||
"iss": "IdpId",
|
||||
"preferred_username": "testuser",
|
||||
}))
|
||||
}))
|
||||
rr := httptest.NewRecorder()
|
||||
testHandler.ServeHTTP(rr, req)
|
||||
|
||||
@@ -4,17 +4,16 @@ import (
|
||||
"net/http"
|
||||
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/log"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/oidc"
|
||||
"github.com/owncloud/ocis/v2/services/proxy/pkg/user/backend"
|
||||
"github.com/owncloud/ocis/v2/services/proxy/pkg/userroles"
|
||||
revactx "github.com/owncloud/reva/v2/pkg/ctx"
|
||||
)
|
||||
|
||||
// BasicAuthenticator is the authenticator responsible for HTTP Basic authentication.
|
||||
type BasicAuthenticator struct {
|
||||
Logger log.Logger
|
||||
UserProvider backend.UserBackend
|
||||
UserRoleAssigner userroles.UserRoleAssigner
|
||||
MultiInstanceEnabled bool
|
||||
Logger log.Logger
|
||||
UserProvider backend.UserBackend
|
||||
UserCS3Claim string
|
||||
UserOIDCClaim string
|
||||
}
|
||||
|
||||
// Authenticate implements the authenticator interface to authenticate requests via basic auth.
|
||||
@@ -26,15 +25,6 @@ func (m BasicAuthenticator) Authenticate(r *http.Request) (*http.Request, error)
|
||||
return nil, ErrAuthenticationFailed
|
||||
}
|
||||
|
||||
if m.MultiInstanceEnabled {
|
||||
// Basic auth credentials carry no OIDC claims, so there is no way to
|
||||
// verify tenant membership (OCIS_MULTI_INSTANCE_MEMBER_CLAIM/GUEST_CLAIM)
|
||||
// for them. Reject rather than let the request bypass the tenant
|
||||
// check in services/proxy/pkg/middleware/account_resolver.go's
|
||||
// resolveUserType.
|
||||
return nil, ErrAuthenticationFailed
|
||||
}
|
||||
|
||||
login, password, ok := r.BasicAuth()
|
||||
if !ok {
|
||||
return nil, ErrAuthenticationFailed
|
||||
@@ -50,21 +40,23 @@ func (m BasicAuthenticator) Authenticate(r *http.Request) (*http.Request, error)
|
||||
return nil, ErrAuthenticationFailed
|
||||
}
|
||||
|
||||
user, err = m.UserRoleAssigner.ApplyUserRole(r.Context(), user)
|
||||
if err != nil {
|
||||
m.Logger.Error().
|
||||
Err(err).
|
||||
Str("authenticator", "basic").
|
||||
Str("path", r.URL.Path).
|
||||
Msg("could not apply user role")
|
||||
return nil, ErrAuthenticationFailed
|
||||
// fake oidc claims
|
||||
claims := map[string]interface{}{
|
||||
oidc.Iss: user.Id.Idp,
|
||||
oidc.PreferredUsername: user.Username,
|
||||
oidc.Email: user.Mail,
|
||||
oidc.OwncloudUUID: user.Id.OpaqueId,
|
||||
}
|
||||
|
||||
if m.UserCS3Claim == "userid" {
|
||||
// set the custom user claim only if users will be looked up by the userid on the CS3api
|
||||
// OpaqueId contains the userid configured in STORAGE_LDAP_USER_SCHEMA_UID
|
||||
claims[m.UserOIDCClaim] = user.Id.OpaqueId
|
||||
|
||||
}
|
||||
m.Logger.Debug().
|
||||
Str("authenticator", "basic").
|
||||
Str("path", r.URL.Path).
|
||||
Msg("successfully authenticated request")
|
||||
// the user is already authenticated, put it into the context directly
|
||||
// instead of faking oidc claims for the account resolver to re-resolve.
|
||||
return r.WithContext(revactx.ContextSetUser(r.Context(), user)), nil
|
||||
return r.WithContext(oidc.NewContext(r.Context(), claims)), nil
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
package middleware
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
|
||||
@@ -11,17 +10,13 @@ import (
|
||||
|
||||
. "github.com/onsi/gomega"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/log"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/oidc"
|
||||
"github.com/owncloud/ocis/v2/services/proxy/pkg/user/backend"
|
||||
"github.com/owncloud/ocis/v2/services/proxy/pkg/user/backend/mocks"
|
||||
userRoleMocks "github.com/owncloud/ocis/v2/services/proxy/pkg/userroles/mocks"
|
||||
"github.com/owncloud/reva/v2/pkg/auth/scope"
|
||||
revactx "github.com/owncloud/reva/v2/pkg/ctx"
|
||||
"github.com/owncloud/reva/v2/pkg/token/manager/jwt"
|
||||
)
|
||||
|
||||
var _ = Describe("Authenticating requests", Label("BasicAuthenticator"), func() {
|
||||
var authenticator Authenticator
|
||||
var roleAssigner *userRoleMocks.UserRoleAssigner
|
||||
ub := mocks.UserBackend{}
|
||||
ub.On("Authenticate", mock.Anything, "testuser", "testpassword").Return(
|
||||
&userv1beta1.User{
|
||||
@@ -38,15 +33,9 @@ var _ = Describe("Authenticating requests", Label("BasicAuthenticator"), func()
|
||||
ub.On("Authenticate", mock.Anything, mock.Anything, mock.Anything).Return(nil, "", backend.ErrAccountNotFound)
|
||||
|
||||
BeforeEach(func() {
|
||||
roleAssigner = &userRoleMocks.UserRoleAssigner{}
|
||||
roleAssigner.EXPECT().ApplyUserRole(mock.Anything, mock.Anything).RunAndReturn(
|
||||
func(ctx context.Context, user *userv1beta1.User) (*userv1beta1.User, error) { return user, nil },
|
||||
).Maybe()
|
||||
|
||||
authenticator = BasicAuthenticator{
|
||||
Logger: log.NewLogger(),
|
||||
UserProvider: &ub,
|
||||
UserRoleAssigner: roleAssigner,
|
||||
Logger: log.NewLogger(),
|
||||
UserProvider: &ub,
|
||||
}
|
||||
})
|
||||
|
||||
@@ -60,83 +49,19 @@ var _ = Describe("Authenticating requests", Label("BasicAuthenticator"), func()
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
Expect(req2).ToNot(BeNil())
|
||||
})
|
||||
It("puts the authenticated user into the request context", func() {
|
||||
It("adds claims to the request context", func() {
|
||||
req := httptest.NewRequest(http.MethodGet, "http://example.com/example/path", http.NoBody)
|
||||
req.SetBasicAuth("testuser", "testpassword")
|
||||
|
||||
req2, err := authenticator.Authenticate(req)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
|
||||
user, ok := revactx.ContextGetUser(req2.Context())
|
||||
Expect(ok).To(Equal(true))
|
||||
Expect(user.GetId().GetIdp()).To(Equal("IdpId"))
|
||||
Expect(user.GetId().GetOpaqueId()).To(Equal("OpaqueId"))
|
||||
Expect(user.GetUsername()).To(Equal("testuser"))
|
||||
Expect(user.GetMail()).To(Equal("testuser@example.com"))
|
||||
})
|
||||
})
|
||||
|
||||
When("multi-instance mode is enabled", func() {
|
||||
It("rejects the request, since basic auth credentials carry no tenant-membership claims", func() {
|
||||
multiInstanceAuthenticator := BasicAuthenticator{
|
||||
Logger: log.NewLogger(),
|
||||
UserProvider: &ub,
|
||||
UserRoleAssigner: roleAssigner,
|
||||
MultiInstanceEnabled: true,
|
||||
}
|
||||
|
||||
req := httptest.NewRequest(http.MethodGet, "http://example.com/example/path", http.NoBody)
|
||||
req.SetBasicAuth("testuser", "testpassword")
|
||||
|
||||
req2, err := multiInstanceAuthenticator.Authenticate(req)
|
||||
|
||||
Expect(err).To(HaveOccurred())
|
||||
Expect(req2).To(BeNil())
|
||||
})
|
||||
})
|
||||
|
||||
When("the account resolver is configured with a non-default PROXY_USER_OIDC_CLAIM", func() {
|
||||
It("still resolves the already-authenticated user, bypassing claim-based lookup", func() {
|
||||
req := httptest.NewRequest(http.MethodGet, "http://example.com/graph/v1.0/me", http.NoBody)
|
||||
req.SetBasicAuth("testuser", "testpassword")
|
||||
|
||||
authenticatedReq, err := authenticator.Authenticate(req)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
|
||||
resolvedUser := &userv1beta1.User{
|
||||
Id: &userv1beta1.UserId{Idp: "IdpId", OpaqueId: "OpaqueId"},
|
||||
Username: "testuser",
|
||||
}
|
||||
tokenManager, err := jwt.New(map[string]interface{}{"secret": "change-me", "expires": int64(60)})
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
s, err := scope.AddOwnerScope(nil)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
token, err := tokenManager.MintToken(context.Background(), resolvedUser, s)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
|
||||
resolverBackend := mocks.UserBackend{}
|
||||
// services/proxy/pkg/middleware/account_resolver.go's verifyUser always looks
|
||||
// up the user by "username", regardless of the configured PROXY_USER_OIDC_CLAIM,
|
||||
// because the user arrives already authenticated via the request context.
|
||||
resolverBackend.On("GetUserByClaims", mock.Anything, "username", "testuser", mock.Anything).Return(resolvedUser, token, nil)
|
||||
|
||||
roleAssigner := &userRoleMocks.UserRoleAssigner{}
|
||||
roleAssigner.EXPECT().ApplyUserRole(mock.Anything, mock.Anything).RunAndReturn(
|
||||
func(ctx context.Context, user *userv1beta1.User) (*userv1beta1.User, error) { return user, nil },
|
||||
).Maybe()
|
||||
|
||||
resolver := AccountResolver(
|
||||
Logger(log.NewLogger()),
|
||||
UserProvider(&resolverBackend),
|
||||
UserRoleAssigner(roleAssigner),
|
||||
UserOIDCClaim("sub"),
|
||||
UserCS3Claim("userid"),
|
||||
)(mockHandler{})
|
||||
|
||||
rw := httptest.NewRecorder()
|
||||
resolver.ServeHTTP(rw, authenticatedReq)
|
||||
|
||||
Expect(rw.Code).To(Equal(http.StatusOK))
|
||||
claims := oidc.FromContext(req2.Context())
|
||||
Expect(claims).ToNot(BeNil())
|
||||
Expect(claims[oidc.Iss]).To(Equal("IdpId"))
|
||||
Expect(claims[oidc.PreferredUsername]).To(Equal("testuser"))
|
||||
Expect(claims[oidc.Email]).To(Equal("testuser@example.com"))
|
||||
Expect(claims[oidc.OwncloudUUID]).To(Equal("OpaqueId"))
|
||||
})
|
||||
})
|
||||
})
|
||||
@@ -58,11 +58,7 @@ func (m *createHome) ServeHTTP(w http.ResponseWriter, req *http.Request) {
|
||||
createHomeReq := &provider.CreateHomeRequest{}
|
||||
u, ok := revactx.ContextGetUser(ctx)
|
||||
if !ok || u == nil {
|
||||
// Requests on unprotected routes can carry a reva token without a resolved
|
||||
// user, e.g. the internal download requests to the data gateway (/data), which
|
||||
// reva's HTTP client sends with the caller's token. There is no home to create
|
||||
// for them, so this is expected and not an error.
|
||||
m.logger.Debug().Str("path", req.URL.Path).Msg("no user in context, not creating a home")
|
||||
m.logger.Error().Msg("no user in context")
|
||||
m.next.ServeHTTP(w, req)
|
||||
return
|
||||
}
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
package middleware
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
"testing"
|
||||
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/log"
|
||||
"github.com/rs/zerolog"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
// A request with a reva token but no user, like reva's internal download requests to
|
||||
// the data gateway, is passed on unchanged and does not log an error.
|
||||
func TestCreateHomeWithoutUserPassesThroughQuietly(t *testing.T) {
|
||||
// Other tests in this package raise the global level; let error lines through.
|
||||
defer zerolog.SetGlobalLevel(zerolog.GlobalLevel())
|
||||
zerolog.SetGlobalLevel(zerolog.TraceLevel)
|
||||
|
||||
var buf bytes.Buffer
|
||||
logger := log.Logger{Logger: zerolog.New(&buf).Level(zerolog.InfoLevel)}
|
||||
|
||||
nextCalled := false
|
||||
next := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
nextCalled = true
|
||||
w.WriteHeader(http.StatusOK)
|
||||
})
|
||||
sut := CreateHome(Logger(logger))(next)
|
||||
|
||||
req := httptest.NewRequest(http.MethodGet, "/data/some-transfer-token", nil)
|
||||
req.Header.Set("x-access-token", "a-token")
|
||||
rw := httptest.NewRecorder()
|
||||
sut.ServeHTTP(rw, req)
|
||||
|
||||
assert.True(t, nextCalled)
|
||||
assert.Equal(t, http.StatusOK, rw.Code)
|
||||
assert.Empty(t, buf.String())
|
||||
}
|
||||
@@ -4,7 +4,11 @@ import (
|
||||
"context"
|
||||
|
||||
cs3 "github.com/cs3org/go-cs3apis/cs3/identity/user/v1beta1"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/middleware"
|
||||
settingssvc "github.com/owncloud/ocis/v2/protogen/gen/ocis/services/settings/v0"
|
||||
settingsService "github.com/owncloud/ocis/v2/services/settings/pkg/service/v0"
|
||||
"github.com/owncloud/reva/v2/pkg/utils"
|
||||
"go-micro.dev/v4/metadata"
|
||||
)
|
||||
|
||||
type defaultRoleAssigner struct {
|
||||
@@ -35,9 +39,27 @@ func (d defaultRoleAssigner) UpdateUserRoleAssignment(ctx context.Context, user
|
||||
return nil, err
|
||||
}
|
||||
|
||||
roleIDs, err = bootstrapDefaultRoleIfNeeded(ctx, user, roleIDs, d.roleService, d.logger)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
if len(roleIDs) == 0 {
|
||||
// This user doesn't have a role assignment yet. Assign a
|
||||
// default user role. At least until proper roles are provided. See
|
||||
// https://github.com/owncloud/ocis/issues/1825 for more context.
|
||||
if user.Id.Type == cs3.UserType_USER_TYPE_PRIMARY || user.Id.Type == cs3.UserType_USER_TYPE_GUEST {
|
||||
roleId := settingsService.BundleUUIDRoleUser
|
||||
if user.Id.Type == cs3.UserType_USER_TYPE_GUEST {
|
||||
roleId = settingsService.BundleUUIDRoleUserLight
|
||||
}
|
||||
d.logger.Info().Str("userid", user.Id.OpaqueId).Msg("user has no role assigned, assigning default user role")
|
||||
ctx = metadata.Set(ctx, middleware.AccountID, user.Id.OpaqueId)
|
||||
_, err := d.roleService.AssignRoleToUser(ctx, &settingssvc.AssignRoleToUserRequest{
|
||||
AccountUuid: user.Id.OpaqueId,
|
||||
RoleId: roleId,
|
||||
})
|
||||
if err != nil {
|
||||
d.logger.Error().Err(err).Msg("Could not add default role")
|
||||
return nil, err
|
||||
}
|
||||
roleIDs = append(roleIDs, roleId)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,11 +76,6 @@ func (d defaultRoleAssigner) ApplyUserRole(ctx context.Context, user *cs3.User)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
roleIDs, err = bootstrapDefaultRoleIfNeeded(ctx, user, roleIDs, d.roleService, d.logger)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
user.Opaque = utils.AppendJSONToOpaque(user.Opaque, "roles", roleIDs)
|
||||
return user, nil
|
||||
}
|
||||
@@ -1,79 +0,0 @@
|
||||
package userroles
|
||||
|
||||
import (
|
||||
"context"
|
||||
"testing"
|
||||
|
||||
cs3user "github.com/cs3org/go-cs3apis/cs3/identity/user/v1beta1"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/log"
|
||||
settingsmsg "github.com/owncloud/ocis/v2/protogen/gen/ocis/messages/settings/v0"
|
||||
settingssvc "github.com/owncloud/ocis/v2/protogen/gen/ocis/services/settings/v0"
|
||||
graphmocks "github.com/owncloud/ocis/v2/services/graph/mocks"
|
||||
settingsService "github.com/owncloud/ocis/v2/services/settings/pkg/service/v0"
|
||||
"github.com/owncloud/reva/v2/pkg/utils"
|
||||
"github.com/stretchr/testify/mock"
|
||||
)
|
||||
|
||||
// TestApplyUserRoleBootstrapsDefaultRoleForNewUser verifies that ApplyUserRole,
|
||||
// just like UpdateUserRoleAssignment, assigns a default role to a user who
|
||||
// doesn't have one yet. This matters for authentication paths (such as app
|
||||
// passwords) that only call ApplyUserRole and never go through claims-based
|
||||
// UpdateUserRoleAssignment, so a user who never logged in interactively must
|
||||
// still end up with a role.
|
||||
func TestApplyUserRoleBootstrapsDefaultRoleForNewUser(t *testing.T) {
|
||||
const userOpaqueID = "user-1"
|
||||
|
||||
roleService := &graphmocks.RoleService{}
|
||||
roleService.On("ListRoleAssignments", mock.Anything, mock.Anything, mock.Anything).Return(
|
||||
&settingssvc.ListRoleAssignmentsResponse{}, nil)
|
||||
roleService.On("AssignRoleToUser", mock.Anything, mock.MatchedBy(func(req *settingssvc.AssignRoleToUserRequest) bool {
|
||||
return req.GetAccountUuid() == userOpaqueID && req.GetRoleId() == settingsService.BundleUUIDRoleUser
|
||||
}), mock.Anything).Return(&settingssvc.AssignRoleToUserResponse{Assignment: &settingsmsg.UserRoleAssignment{
|
||||
Id: "new-assignment-id",
|
||||
AccountUuid: userOpaqueID,
|
||||
RoleId: settingsService.BundleUUIDRoleUser,
|
||||
}}, nil)
|
||||
|
||||
ra := NewDefaultRoleAssigner(WithRoleService(roleService), WithLogger(log.NopLogger()))
|
||||
|
||||
user := &cs3user.User{Id: &cs3user.UserId{OpaqueId: userOpaqueID, Type: cs3user.UserType_USER_TYPE_PRIMARY}}
|
||||
|
||||
updated, err := ra.ApplyUserRole(context.Background(), user)
|
||||
if err != nil {
|
||||
t.Fatalf("unexpected error: %v", err)
|
||||
}
|
||||
|
||||
var roleIDs []string
|
||||
if err := utils.ReadJSONFromOpaque(updated.GetOpaque(), "roles", &roleIDs); err != nil {
|
||||
t.Fatalf("could not read roles from opaque: %v", err)
|
||||
}
|
||||
if len(roleIDs) != 1 || roleIDs[0] != settingsService.BundleUUIDRoleUser {
|
||||
t.Fatalf("expected the default user role to be bootstrapped, got %v", roleIDs)
|
||||
}
|
||||
|
||||
roleService.AssertCalled(t, "AssignRoleToUser", mock.Anything, mock.MatchedBy(func(req *settingssvc.AssignRoleToUserRequest) bool {
|
||||
return req.GetAccountUuid() == userOpaqueID && req.GetRoleId() == settingsService.BundleUUIDRoleUser
|
||||
}), mock.Anything)
|
||||
}
|
||||
|
||||
// TestApplyUserRoleDoesNotBootstrapForLightweightUser verifies that
|
||||
// ApplyUserRole never assigns a default role to a lightweight (federated)
|
||||
// user, mirroring UpdateUserRoleAssignment's existing behavior.
|
||||
func TestApplyUserRoleDoesNotBootstrapForLightweightUser(t *testing.T) {
|
||||
const userOpaqueID = "lightweight-user-1"
|
||||
|
||||
roleService := &graphmocks.RoleService{}
|
||||
roleService.On("ListRoleAssignments", mock.Anything, mock.Anything, mock.Anything).Return(
|
||||
&settingssvc.ListRoleAssignmentsResponse{}, nil)
|
||||
|
||||
ra := NewDefaultRoleAssigner(WithRoleService(roleService), WithLogger(log.NopLogger()))
|
||||
|
||||
user := &cs3user.User{Id: &cs3user.UserId{OpaqueId: userOpaqueID, Type: cs3user.UserType_USER_TYPE_LIGHTWEIGHT}}
|
||||
|
||||
_, err := ra.ApplyUserRole(context.Background(), user)
|
||||
if err != nil {
|
||||
t.Fatalf("unexpected error: %v", err)
|
||||
}
|
||||
|
||||
roleService.AssertNotCalled(t, "AssignRoleToUser", mock.Anything, mock.Anything, mock.Anything)
|
||||
}
|
||||
@@ -6,12 +6,9 @@ import (
|
||||
gateway "github.com/cs3org/go-cs3apis/cs3/gateway/v1beta1"
|
||||
cs3 "github.com/cs3org/go-cs3apis/cs3/identity/user/v1beta1"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/log"
|
||||
ocismiddleware "github.com/owncloud/ocis/v2/ocis-pkg/middleware"
|
||||
settingssvc "github.com/owncloud/ocis/v2/protogen/gen/ocis/services/settings/v0"
|
||||
"github.com/owncloud/ocis/v2/services/proxy/pkg/config"
|
||||
settingsService "github.com/owncloud/ocis/v2/services/settings/pkg/service/v0"
|
||||
"github.com/owncloud/reva/v2/pkg/rgrpc/todo/pool"
|
||||
"go-micro.dev/v4/metadata"
|
||||
)
|
||||
|
||||
// UserRoleAssigner allows providing different implementations for how users get their default roles
|
||||
@@ -80,35 +77,6 @@ func WithServiceAccount(c config.ServiceAccount) Option {
|
||||
}
|
||||
}
|
||||
|
||||
// bootstrapDefaultRoleIfNeeded assigns the default "User" role (or "User Light"
|
||||
// for guests) when the user has no role assignment yet, so that users who only
|
||||
// ever authenticate without going through UpdateUserRoleAssignment (e.g. via an
|
||||
// app password) still end up with a role. See
|
||||
// https://github.com/owncloud/ocis/issues/1825 for context.
|
||||
func bootstrapDefaultRoleIfNeeded(ctx context.Context, user *cs3.User, roleIDs []string, roleService settingssvc.RoleService, logger log.Logger) ([]string, error) {
|
||||
if len(roleIDs) != 0 {
|
||||
return roleIDs, nil
|
||||
}
|
||||
if user.Id.Type != cs3.UserType_USER_TYPE_PRIMARY && user.Id.Type != cs3.UserType_USER_TYPE_GUEST {
|
||||
return roleIDs, nil
|
||||
}
|
||||
|
||||
roleID := settingsService.BundleUUIDRoleUser
|
||||
if user.Id.Type == cs3.UserType_USER_TYPE_GUEST {
|
||||
roleID = settingsService.BundleUUIDRoleUserLight
|
||||
}
|
||||
logger.Info().Str("userid", user.Id.OpaqueId).Msg("user has no role assigned, assigning default user role")
|
||||
ctx = metadata.Set(ctx, ocismiddleware.AccountID, user.Id.OpaqueId)
|
||||
if _, err := roleService.AssignRoleToUser(ctx, &settingssvc.AssignRoleToUserRequest{
|
||||
AccountUuid: user.Id.OpaqueId,
|
||||
RoleId: roleID,
|
||||
}); err != nil {
|
||||
logger.Error().Err(err).Msg("Could not add default role")
|
||||
return nil, err
|
||||
}
|
||||
return append(roleIDs, roleID), nil
|
||||
}
|
||||
|
||||
// loadRolesIDs returns the role-ids assigned to an user
|
||||
func loadRolesIDs(ctx context.Context, opaqueUserID string, rs settingssvc.RoleService) ([]string, error) {
|
||||
req := &settingssvc.ListRoleAssignmentsRequest{AccountUuid: opaqueUserID}
|
||||
|
||||
@@ -170,10 +170,6 @@ ocis search index --all-spaces
|
||||
|
||||
Note that either `--space $SPACE_ID` or `--all-spaces` must be set.
|
||||
|
||||
The command does not open the index itself: it asks the running search service to do the indexing over gRPC. The search service must therefore be running, and the command works with the default `SEARCH_ENGINE_BLEVE_SCALE=false` (see [Scaling](#scaling)); the service's exclusive lock on the index does not block it.
|
||||
|
||||
The command waits for the service to walk the space and gives up after 10 minutes by default. The walk is cancelled when that happens, so a large space, or one where the content extractor is slow on a few files, may need a longer limit: `--timeout 2h` (a Go duration; `0` waits indefinitely).
|
||||
|
||||
## Notes
|
||||
|
||||
The indexing process tries to be self-healing in some situations.
|
||||
|
||||
@@ -17,12 +17,7 @@ import (
|
||||
"github.com/owncloud/ocis/v2/services/search/pkg/config/parser"
|
||||
)
|
||||
|
||||
// _noTimeout stands in for "no limit" when --timeout is 0: go-micro treats a
|
||||
// zero RequestTimeout as an immediately expired deadline, so a far-off one is
|
||||
// used instead.
|
||||
const _noTimeout = 100 * 365 * 24 * time.Hour
|
||||
|
||||
// Index is the entrypoint for the index command.
|
||||
// Index is the entrypoint for the server command.
|
||||
func Index(cfg *config.Config) *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "index",
|
||||
@@ -39,11 +34,6 @@ func Index(cfg *config.Config) *cli.Command {
|
||||
Name: "all-spaces",
|
||||
Usage: "index all spaces instead. This or --space is required.",
|
||||
},
|
||||
&cli.DurationFlag{
|
||||
Name: "timeout",
|
||||
Usage: "how long to wait for the indexing to finish before giving up, e.g. 2h. The walk is cancelled when the timeout expires. 0 waits indefinitely.",
|
||||
Value: 10 * time.Minute,
|
||||
},
|
||||
},
|
||||
Before: func(_ *cli.Context) error {
|
||||
return configlog.ReturnFatal(parser.ParseConfig(cfg))
|
||||
@@ -67,18 +57,10 @@ func Index(cfg *config.Config) *cli.Command {
|
||||
return err
|
||||
}
|
||||
|
||||
// The service walks the whole space inside this request, so the
|
||||
// request timeout bounds the walk: when it expires the walk is
|
||||
// cancelled and everything after that point stays unindexed.
|
||||
timeout := ctx.Duration("timeout")
|
||||
if timeout <= 0 {
|
||||
timeout = _noTimeout
|
||||
}
|
||||
|
||||
c := searchsvc.NewSearchProviderService("com.owncloud.api.search", grpcClient)
|
||||
_, err = c.IndexSpace(context.Background(), &searchsvc.IndexSpaceRequest{
|
||||
SpaceId: ctx.String("space"),
|
||||
}, func(opts *client.CallOptions) { opts.RequestTimeout = timeout })
|
||||
}, func(opts *client.CallOptions) { opts.RequestTimeout = 10 * time.Minute })
|
||||
if err != nil {
|
||||
fmt.Println("failed to index space: " + err.Error())
|
||||
return err
|
||||
|
||||
@@ -66,7 +66,7 @@ type Cache struct {
|
||||
DisablePersistence bool `yaml:"disable_persistence" env:"OCIS_CACHE_DISABLE_PERSISTENCE;SETTINGS_CACHE_DISABLE_PERSISTENCE" desc:"Disables persistence of the cache. Only applies when store type 'nats-js-kv' is configured. Defaults to false." introductionVersion:"5.0"`
|
||||
AuthUsername string `yaml:"username" env:"OCIS_CACHE_AUTH_USERNAME;SETTINGS_CACHE_AUTH_USERNAME" desc:"The username to authenticate with the cache. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"5.0"`
|
||||
AuthPassword string `yaml:"password" env:"OCIS_CACHE_AUTH_PASSWORD;SETTINGS_CACHE_AUTH_PASSWORD" desc:"The password to authenticate with the cache. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"5.0"`
|
||||
EnableTLS bool `yaml:"enable_tls" env:"OCIS_CACHE_ENABLE_TLS;SETTINGS_CACHE_ENABLE_TLS" desc:"Activate TLS for the connection to the cache store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"9.0.0"`
|
||||
TLSInsecure bool `yaml:"tls_insecure" env:"OCIS_CACHE_TLS_INSECURE;SETTINGS_CACHE_TLS_INSECURE" desc:"Disable TLS certificate verification for the cache store connection. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"9.0.0"`
|
||||
TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OCIS_CACHE_TLS_ROOT_CA_CERTIFICATE;SETTINGS_CACHE_TLS_ROOT_CA_CERTIFICATE" desc:"Path to the PEM-encoded root CA certificate for the cache store TLS connection. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"9.0.0"`
|
||||
EnableTLS bool `yaml:"enable_tls" env:"OCIS_CACHE_ENABLE_TLS;SETTINGS_CACHE_ENABLE_TLS" desc:"Activate TLS for the connection to the cache store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
|
||||
TLSInsecure bool `yaml:"tls_insecure" env:"OCIS_CACHE_TLS_INSECURE;SETTINGS_CACHE_TLS_INSECURE" desc:"Disable TLS certificate verification for the cache store connection. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
|
||||
TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OCIS_CACHE_TLS_ROOT_CA_CERTIFICATE;SETTINGS_CACHE_TLS_ROOT_CA_CERTIFICATE" desc:"Path to the PEM-encoded root CA certificate for the cache store TLS connection. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
|
||||
}
|
||||
@@ -27,8 +27,8 @@ type Config struct {
|
||||
PublicSharingDrivers PublicSharingDrivers `yaml:"public_sharing_drivers"`
|
||||
WriteableShareMustHavePassword bool `yaml:"public_sharing_writeableshare_must_have_password" env:"OCIS_SHARING_PUBLIC_WRITEABLE_SHARE_MUST_HAVE_PASSWORD;SHARING_PUBLIC_WRITEABLE_SHARE_MUST_HAVE_PASSWORD" desc:"Set this to true if you want to enforce passwords on Uploader, Editor or Contributor shares." introductionVersion:"5.0"`
|
||||
PublicShareMustHavePassword bool `yaml:"public_sharing_share_must_have_password" env:"OCIS_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD;SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD" desc:"Set this to true if you want to enforce passwords on all public shares." introductionVersion:"5.0"`
|
||||
EnableExpiredSharesCleanup bool `yaml:"enable_expired_shares_cleanup" env:"OCIS_SHARING_ENABLE_EXPIRED_SHARES_CLEANUP;SHARING_ENABLE_EXPIRED_SHARES_CLEANUP" desc:"Enable the periodic removal of expired public shares. When disabled, expired shares are still hidden from listings but never actually deleted." introductionVersion:"9.0.0"`
|
||||
JanitorRunInterval int `yaml:"janitor_run_interval" env:"OCIS_SHARING_JANITOR_RUN_INTERVAL;SHARING_JANITOR_RUN_INTERVAL" desc:"Interval in seconds between two runs of the janitor that permanently deletes expired public shares. Defaults to '3600' (1 hour). Only relevant when OCIS_SHARING_ENABLE_EXPIRED_SHARES_CLEANUP is enabled." introductionVersion:"9.0.0"`
|
||||
EnableExpiredSharesCleanup bool `yaml:"enable_expired_shares_cleanup" env:"OCIS_SHARING_ENABLE_EXPIRED_SHARES_CLEANUP;SHARING_ENABLE_EXPIRED_SHARES_CLEANUP" desc:"Enable the periodic removal of expired public shares. When disabled, expired shares are still hidden from listings but never actually deleted." introductionVersion:"8.3.0"`
|
||||
JanitorRunInterval int `yaml:"janitor_run_interval" env:"OCIS_SHARING_JANITOR_RUN_INTERVAL;SHARING_JANITOR_RUN_INTERVAL" desc:"Interval in seconds between two runs of the janitor that permanently deletes expired public shares. Defaults to '3600' (1 hour). Only relevant when OCIS_SHARING_ENABLE_EXPIRED_SHARES_CLEANUP is enabled." introductionVersion:"8.3.0"`
|
||||
EnableUserSharing bool `yaml:"enable_user_sharing" env:"OCIS_ENABLE_USER_SHARING" desc:"Enables direct sharing with users and groups. When disabled, creating new user or group shares is rejected. Public link sharing is not affected." introductionVersion:"8.2.0"`
|
||||
EnablePublicSharing bool `yaml:"enable_public_sharing" env:"OCIS_ENABLE_PUBLIC_SHARING" desc:"Enables public link sharing. When disabled, creating new public links is rejected. Direct sharing with users and groups is not affected." introductionVersion:"8.2.0"`
|
||||
PasswordPolicy PasswordPolicy `yaml:"password_policy"`
|
||||
|
||||
@@ -70,7 +70,7 @@ type Store struct {
|
||||
Table string `yaml:"table" env:"STORAGE_PUBLICLINK_STORE_TABLE" desc:"The database table the store should use." introductionVersion:"8.0.0"`
|
||||
AuthUsername string `yaml:"username" env:"OCIS_PERSISTENT_STORE_AUTH_USERNAME;STORAGE_PUBLICLINK_STORE_AUTH_USERNAME" desc:"The username to authenticate with the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.0.0"`
|
||||
AuthPassword string `yaml:"password" env:"OCIS_PERSISTENT_STORE_AUTH_PASSWORD;STORAGE_PUBLICLINK_STORE_AUTH_PASSWORD" desc:"The password to authenticate with the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.0.0"`
|
||||
EnableTLS bool `yaml:"enable_tls" env:"OCIS_PERSISTENT_STORE_ENABLE_TLS;STORAGE_PUBLICLINK_STORE_ENABLE_TLS" desc:"Activate TLS for the connection to the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"9.0.0"`
|
||||
TLSInsecure bool `yaml:"tls_insecure" env:"OCIS_PERSISTENT_STORE_TLS_INSECURE;STORAGE_PUBLICLINK_STORE_TLS_INSECURE" desc:"Disable TLS certificate verification for the store connection. Only applies when store type 'nats-js-kv' is configured. Do not enable this in production because it disables authentication of the NATS server. Use it only for testing with self-signed certificates." introductionVersion:"9.0.0"`
|
||||
TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OCIS_PERSISTENT_STORE_TLS_ROOT_CA_CERTIFICATE;STORAGE_PUBLICLINK_STORE_TLS_ROOT_CA_CERTIFICATE" desc:"Path to the PEM-encoded root CA certificate for the store TLS connection. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"9.0.0"`
|
||||
EnableTLS bool `yaml:"enable_tls" env:"OCIS_PERSISTENT_STORE_ENABLE_TLS;STORAGE_PUBLICLINK_STORE_ENABLE_TLS" desc:"Activate TLS for the connection to the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
|
||||
TLSInsecure bool `yaml:"tls_insecure" env:"OCIS_PERSISTENT_STORE_TLS_INSECURE;STORAGE_PUBLICLINK_STORE_TLS_INSECURE" desc:"Disable TLS certificate verification for the store connection. Only applies when store type 'nats-js-kv' is configured. Do not enable this in production because it disables authentication of the NATS server. Use it only for testing with self-signed certificates." introductionVersion:"8.3.0"`
|
||||
TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OCIS_PERSISTENT_STORE_TLS_ROOT_CA_CERTIFICATE;STORAGE_PUBLICLINK_STORE_TLS_ROOT_CA_CERTIFICATE" desc:"Path to the PEM-encoded root CA certificate for the store TLS connection. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
|
||||
}
|
||||
@@ -93,7 +93,7 @@ type Cache struct {
|
||||
DisablePersistence bool `yaml:"disable_persistence" env:"OCIS_CACHE_DISABLE_PERSISTENCE;STORAGE_SYSTEM_CACHE_DISABLE_PERSISTENCE" desc:"Disables persistence of the cache. Only applies when store type 'nats-js-kv' is configured. Defaults to false." introductionVersion:"5.0"`
|
||||
AuthUsername string `yaml:"auth_username" env:"OCIS_CACHE_AUTH_USERNAME;STORAGE_SYSTEM_CACHE_AUTH_USERNAME" desc:"Username for the configured store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"5.0"`
|
||||
AuthPassword string `yaml:"auth_password" env:"OCIS_CACHE_AUTH_PASSWORD;STORAGE_SYSTEM_CACHE_AUTH_PASSWORD" desc:"Password for the configured store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"5.0"`
|
||||
EnableTLS bool `yaml:"enable_tls" env:"OCIS_CACHE_ENABLE_TLS;STORAGE_SYSTEM_CACHE_ENABLE_TLS" desc:"Activate TLS for the connection to the cache store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"9.0.0"`
|
||||
TLSInsecure bool `yaml:"tls_insecure" env:"OCIS_CACHE_TLS_INSECURE;STORAGE_SYSTEM_CACHE_TLS_INSECURE" desc:"Disable TLS certificate verification for the cache store connection. Only applies when store type 'nats-js-kv' is configured. Do not enable this in production because it disables authentication of the NATS server. Use it only for testing with self-signed certificates." introductionVersion:"9.0.0"`
|
||||
TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OCIS_CACHE_TLS_ROOT_CA_CERTIFICATE;STORAGE_SYSTEM_CACHE_TLS_ROOT_CA_CERTIFICATE" desc:"Path to the PEM-encoded root CA certificate for the cache store TLS connection. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"9.0.0"`
|
||||
EnableTLS bool `yaml:"enable_tls" env:"OCIS_CACHE_ENABLE_TLS;STORAGE_SYSTEM_CACHE_ENABLE_TLS" desc:"Activate TLS for the connection to the cache store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
|
||||
TLSInsecure bool `yaml:"tls_insecure" env:"OCIS_CACHE_TLS_INSECURE;STORAGE_SYSTEM_CACHE_TLS_INSECURE" desc:"Disable TLS certificate verification for the cache store connection. Only applies when store type 'nats-js-kv' is configured. Do not enable this in production because it disables authentication of the NATS server. Use it only for testing with self-signed certificates." introductionVersion:"8.3.0"`
|
||||
TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OCIS_CACHE_TLS_ROOT_CA_CERTIFICATE;STORAGE_SYSTEM_CACHE_TLS_ROOT_CA_CERTIFICATE" desc:"Path to the PEM-encoded root CA certificate for the cache store TLS connection. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
|
||||
}
|
||||
@@ -22,14 +22,12 @@ import (
|
||||
"github.com/owncloud/ocis/v2/services/storage-users/pkg/config"
|
||||
"github.com/owncloud/ocis/v2/services/storage-users/pkg/config/parser"
|
||||
"github.com/owncloud/ocis/v2/services/storage-users/pkg/event"
|
||||
"github.com/owncloud/ocis/v2/services/storage-users/pkg/logging"
|
||||
"github.com/owncloud/ocis/v2/services/storage-users/pkg/revaconfig"
|
||||
"github.com/owncloud/reva/v2/pkg/events"
|
||||
"github.com/owncloud/reva/v2/pkg/storage"
|
||||
"github.com/owncloud/reva/v2/pkg/storage/fs/registry"
|
||||
"github.com/owncloud/reva/v2/pkg/storage/utils/decomposedfs/lookup"
|
||||
"github.com/owncloud/reva/v2/pkg/storage/utils/decomposedfs/node"
|
||||
"github.com/owncloud/reva/v2/pkg/upload"
|
||||
"github.com/owncloud/reva/v2/pkg/utils"
|
||||
)
|
||||
|
||||
@@ -127,21 +125,15 @@ func ListUploadSessions(cfg *config.Config) *cli.Command {
|
||||
os.Exit(1)
|
||||
}
|
||||
drivers := revaconfig.StorageProviderDrivers(cfg)
|
||||
driverConf, ok := drivers[cfg.Driver].(map[string]interface{})
|
||||
if !ok {
|
||||
fmt.Fprintf(os.Stderr, "No configuration found for filesystem driver '%s'\n", cfg.Driver)
|
||||
os.Exit(1)
|
||||
}
|
||||
fs, err := f(driverConf, nil, nil)
|
||||
fs, err := f(drivers[cfg.Driver].(map[string]interface{}), nil, nil)
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Failed to initialize filesystem driver '%s'\n", cfg.Driver)
|
||||
return err
|
||||
}
|
||||
|
||||
logger := logging.Configure(cfg.Service.Name, cfg.Log)
|
||||
coord, err := upload.NewCoordinatorFromConfig("", driverConf, fs, nil, &logger.Logger, false)
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Failed to initialize the upload coordinator: %v\n", err)
|
||||
managingFS, ok := fs.(storage.UploadSessionLister)
|
||||
if !ok {
|
||||
fmt.Fprintf(os.Stderr, "'%s' storage does not support listing upload sessions\n", cfg.Driver)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
@@ -155,7 +147,7 @@ func ListUploadSessions(cfg *config.Config) *cli.Command {
|
||||
}
|
||||
|
||||
filter := buildFilter(c)
|
||||
uploads, err := coord.ListUploadSessions(c.Context, filter)
|
||||
uploads, err := managingFS.ListUploadSessions(c.Context, filter)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -231,9 +231,9 @@ type FilemetadataCache struct {
|
||||
DisablePersistence bool `yaml:"disable_persistence" env:"OCIS_CACHE_DISABLE_PERSISTENCE;STORAGE_USERS_FILEMETADATA_CACHE_DISABLE_PERSISTENCE" desc:"Disables persistence of the cache. Only applies when store type 'nats-js-kv' is configured. Defaults to false." introductionVersion:"5.0"`
|
||||
AuthUsername string `yaml:"username" env:"OCIS_CACHE_AUTH_USERNAME;STORAGE_USERS_FILEMETADATA_CACHE_AUTH_USERNAME" desc:"The username to authenticate with the cache store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"5.0"`
|
||||
AuthPassword string `yaml:"password" env:"OCIS_CACHE_AUTH_PASSWORD;STORAGE_USERS_FILEMETADATA_CACHE_AUTH_PASSWORD" desc:"The password to authenticate with the cache store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"5.0"`
|
||||
EnableTLS bool `yaml:"enable_tls" env:"OCIS_CACHE_ENABLE_TLS;STORAGE_USERS_FILEMETADATA_CACHE_ENABLE_TLS" desc:"Activate TLS for the connection to the cache store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"9.0.0"`
|
||||
TLSInsecure bool `yaml:"tls_insecure" env:"OCIS_CACHE_TLS_INSECURE;STORAGE_USERS_FILEMETADATA_CACHE_TLS_INSECURE" desc:"Disable TLS certificate verification for the cache store connection. Only applies when store type 'nats-js-kv' is configured. Do not enable this in production because it disables authentication of the NATS server. Use it only for testing with self-signed certificates." introductionVersion:"9.0.0"`
|
||||
TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OCIS_CACHE_TLS_ROOT_CA_CERTIFICATE;STORAGE_USERS_FILEMETADATA_CACHE_TLS_ROOT_CA_CERTIFICATE" desc:"Path to the PEM-encoded root CA certificate for the cache store TLS connection. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"9.0.0"`
|
||||
EnableTLS bool `yaml:"enable_tls" env:"OCIS_CACHE_ENABLE_TLS;STORAGE_USERS_FILEMETADATA_CACHE_ENABLE_TLS" desc:"Activate TLS for the connection to the cache store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
|
||||
TLSInsecure bool `yaml:"tls_insecure" env:"OCIS_CACHE_TLS_INSECURE;STORAGE_USERS_FILEMETADATA_CACHE_TLS_INSECURE" desc:"Disable TLS certificate verification for the cache store connection. Only applies when store type 'nats-js-kv' is configured. Do not enable this in production because it disables authentication of the NATS server. Use it only for testing with self-signed certificates." introductionVersion:"8.3.0"`
|
||||
TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OCIS_CACHE_TLS_ROOT_CA_CERTIFICATE;STORAGE_USERS_FILEMETADATA_CACHE_TLS_ROOT_CA_CERTIFICATE" desc:"Path to the PEM-encoded root CA certificate for the cache store TLS connection. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
|
||||
}
|
||||
|
||||
// IDCache holds cache config
|
||||
@@ -245,9 +245,9 @@ type IDCache struct {
|
||||
DisablePersistence bool `yaml:"disable_persistence" env:"OCIS_CACHE_DISABLE_PERSISTENCE;STORAGE_USERS_ID_CACHE_DISABLE_PERSISTENCE" desc:"Disables persistence of the cache. Only applies when store type 'nats-js-kv' is configured. Defaults to false." introductionVersion:"5.0"`
|
||||
AuthUsername string `yaml:"username" env:"OCIS_CACHE_AUTH_USERNAME;STORAGE_USERS_ID_CACHE_AUTH_USERNAME" desc:"The username to authenticate with the cache store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"5.0"`
|
||||
AuthPassword string `yaml:"password" env:"OCIS_CACHE_AUTH_PASSWORD;STORAGE_USERS_ID_CACHE_AUTH_PASSWORD" desc:"The password to authenticate with the cache store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"5.0"`
|
||||
EnableTLS bool `yaml:"enable_tls" env:"OCIS_CACHE_ENABLE_TLS;STORAGE_USERS_ID_CACHE_ENABLE_TLS" desc:"Activate TLS for the connection to the cache store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"9.0.0"`
|
||||
TLSInsecure bool `yaml:"tls_insecure" env:"OCIS_CACHE_TLS_INSECURE;STORAGE_USERS_ID_CACHE_TLS_INSECURE" desc:"Disable TLS certificate verification for the cache store connection. Only applies when store type 'nats-js-kv' is configured. Do not enable this in production because it disables authentication of the NATS server. Use it only for testing with self-signed certificates." introductionVersion:"9.0.0"`
|
||||
TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OCIS_CACHE_TLS_ROOT_CA_CERTIFICATE;STORAGE_USERS_ID_CACHE_TLS_ROOT_CA_CERTIFICATE" desc:"Path to the PEM-encoded root CA certificate for the cache store TLS connection. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"9.0.0"`
|
||||
EnableTLS bool `yaml:"enable_tls" env:"OCIS_CACHE_ENABLE_TLS;STORAGE_USERS_ID_CACHE_ENABLE_TLS" desc:"Activate TLS for the connection to the cache store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
|
||||
TLSInsecure bool `yaml:"tls_insecure" env:"OCIS_CACHE_TLS_INSECURE;STORAGE_USERS_ID_CACHE_TLS_INSECURE" desc:"Disable TLS certificate verification for the cache store connection. Only applies when store type 'nats-js-kv' is configured. Do not enable this in production because it disables authentication of the NATS server. Use it only for testing with self-signed certificates." introductionVersion:"8.3.0"`
|
||||
TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OCIS_CACHE_TLS_ROOT_CA_CERTIFICATE;STORAGE_USERS_ID_CACHE_TLS_ROOT_CA_CERTIFICATE" desc:"Path to the PEM-encoded root CA certificate for the cache store TLS connection. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
|
||||
}
|
||||
|
||||
// S3Driver is the storage driver configuration when using 's3' storage driver
|
||||
|
||||
@@ -48,9 +48,9 @@ type Persistence struct {
|
||||
TTL time.Duration `yaml:"ttl" env:"OCIS_PERSISTENT_STORE_TTL;USERLOG_STORE_TTL" desc:"Time to live for events in the store. Defaults to '336h' (2 weeks). See the Environment Variable Types description for more details." introductionVersion:"pre5.0"`
|
||||
AuthUsername string `yaml:"username" env:"OCIS_PERSISTENT_STORE_AUTH_USERNAME;USERLOG_STORE_AUTH_USERNAME" desc:"The username to authenticate with the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"5.0"`
|
||||
AuthPassword string `yaml:"password" env:"OCIS_PERSISTENT_STORE_AUTH_PASSWORD;USERLOG_STORE_AUTH_PASSWORD" desc:"The password to authenticate with the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"5.0"`
|
||||
EnableTLS bool `yaml:"enable_tls" env:"OCIS_PERSISTENT_STORE_ENABLE_TLS;USERLOG_STORE_ENABLE_TLS" desc:"Activate TLS for the connection to the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"9.0.0"`
|
||||
TLSInsecure bool `yaml:"tls_insecure" env:"OCIS_PERSISTENT_STORE_TLS_INSECURE;USERLOG_STORE_TLS_INSECURE" desc:"Disable TLS certificate verification for the store connection. Only applies when store type 'nats-js-kv' is configured. Do not enable this in production because it disables authentication of the NATS server. Use it only for testing with self-signed certificates." introductionVersion:"9.0.0"`
|
||||
TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OCIS_PERSISTENT_STORE_TLS_ROOT_CA_CERTIFICATE;USERLOG_STORE_TLS_ROOT_CA_CERTIFICATE" desc:"Path to the PEM-encoded root CA certificate for the store TLS connection. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"9.0.0"`
|
||||
EnableTLS bool `yaml:"enable_tls" env:"OCIS_PERSISTENT_STORE_ENABLE_TLS;USERLOG_STORE_ENABLE_TLS" desc:"Activate TLS for the connection to the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
|
||||
TLSInsecure bool `yaml:"tls_insecure" env:"OCIS_PERSISTENT_STORE_TLS_INSECURE;USERLOG_STORE_TLS_INSECURE" desc:"Disable TLS certificate verification for the store connection. Only applies when store type 'nats-js-kv' is configured. Do not enable this in production because it disables authentication of the NATS server. Use it only for testing with self-signed certificates." introductionVersion:"8.3.0"`
|
||||
TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OCIS_PERSISTENT_STORE_TLS_ROOT_CA_CERTIFICATE;USERLOG_STORE_TLS_ROOT_CA_CERTIFICATE" desc:"Path to the PEM-encoded root CA certificate for the store TLS connection. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
|
||||
}
|
||||
|
||||
// Events combines the configuration options for the event bus.
|
||||
|
||||
@@ -84,7 +84,7 @@ type LDAPDriver struct {
|
||||
DisableUserMechanism string `yaml:"disable_user_mechanism" env:"OCIS_LDAP_DISABLE_USER_MECHANISM;USERS_LDAP_DISABLE_USER_MECHANISM" desc:"An option to control the behavior for disabling users. Valid options are 'none', 'attribute' and 'group'. If set to 'group', disabling a user via API will add the user to the configured group for disabled users, if set to 'attribute' this will be done in the ldap user entry, if set to 'none' the disable request is not processed." introductionVersion:"pre5.0"`
|
||||
UserTypeAttribute string `yaml:"user_type_attribute" env:"OCIS_LDAP_USER_SCHEMA_USER_TYPE;USERS_LDAP_USER_TYPE_ATTRIBUTE" desc:"LDAP Attribute to distinguish between 'Member' and 'Guest' users. Default is 'ownCloudUserType'." introductionVersion:"pre5.0"`
|
||||
LdapDisabledUsersGroupDN string `yaml:"ldap_disabled_users_group_dn" env:"OCIS_LDAP_DISABLED_USERS_GROUP_DN;USERS_LDAP_DISABLED_USERS_GROUP_DN" desc:"The distinguished name of the group to which added users will be classified as disabled when 'disable_user_mechanism' is set to 'group'." introductionVersion:"pre5.0"`
|
||||
MasterID string `yaml:"master_id" env:"OCIS_MULTI_INSTANCE_MASTER_ID" desc:"The master instance ID for multi-instance setups. When set, LDAP user filters are enhanced to also match users belonging to the master instance. Also set 'user_filter'. Without an explicit 'user_filter', this instance resolves every user in the shared LDAP directory." introductionVersion:"7.0"`
|
||||
MasterID string `yaml:"master_id" env:"OCIS_MULTI_INSTANCE_MASTER_ID" desc:"The master instance ID for multi-instance setups. When set, LDAP user filters are enhanced to also match users belonging to the master instance." introductionVersion:"7.0"`
|
||||
UserMemberAttribute string `yaml:"user_member_attribute" env:"OCIS_LDAP_USER_MEMBER_ATTRIBUTE" desc:"LDAP attribute that marks a user as a member of an instance." introductionVersion:"7.0"`
|
||||
UserGuestAttribute string `yaml:"user_guest_attribute" env:"OCIS_LDAP_USER_GUEST_ATTRIBUTE" desc:"LDAP attribute that marks a user as a guest of an instance." introductionVersion:"7.0"`
|
||||
UserSchema LDAPUserSchema `yaml:"user_schema"`
|
||||
|
||||
@@ -42,9 +42,5 @@ func Validate(cfg *config.Config) error {
|
||||
return shared.MissingLDAPBindPassword(cfg.Service.Name)
|
||||
}
|
||||
|
||||
if cfg.Driver == "ldap" && cfg.Drivers.LDAP.MasterID != "" && cfg.Drivers.LDAP.UserFilter == "" {
|
||||
return shared.MissingLDAPUserFilterForMasterID(cfg.Service.Name)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
@@ -1,63 +0,0 @@
|
||||
package parser
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
"github.com/owncloud/ocis/v2/services/users/pkg/config"
|
||||
)
|
||||
|
||||
func TestValidateMasterIDRequiresUserFilter(t *testing.T) {
|
||||
cfg := &config.Config{
|
||||
Service: config.Service{Name: "users"},
|
||||
TokenManager: &config.TokenManager{JWTSecret: "secret"},
|
||||
Driver: "ldap",
|
||||
Drivers: config.Drivers{
|
||||
LDAP: config.LDAPDriver{
|
||||
BindPassword: "secret",
|
||||
MasterID: "master-1",
|
||||
UserFilter: "",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
err := Validate(cfg)
|
||||
assert.Error(t, err)
|
||||
}
|
||||
|
||||
func TestValidateMasterIDWithUserFilterPasses(t *testing.T) {
|
||||
cfg := &config.Config{
|
||||
Service: config.Service{Name: "users"},
|
||||
TokenManager: &config.TokenManager{JWTSecret: "secret"},
|
||||
Driver: "ldap",
|
||||
Drivers: config.Drivers{
|
||||
LDAP: config.LDAPDriver{
|
||||
BindPassword: "secret",
|
||||
MasterID: "master-1",
|
||||
UserFilter: "(ownCloudMemberOf=instance-1)",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
err := Validate(cfg)
|
||||
assert.NoError(t, err)
|
||||
}
|
||||
|
||||
func TestValidateNoMasterIDWithEmptyUserFilterPasses(t *testing.T) {
|
||||
cfg := &config.Config{
|
||||
Service: config.Service{Name: "users"},
|
||||
TokenManager: &config.TokenManager{JWTSecret: "secret"},
|
||||
Driver: "ldap",
|
||||
Drivers: config.Drivers{
|
||||
LDAP: config.LDAPDriver{
|
||||
BindPassword: "secret",
|
||||
MasterID: "",
|
||||
UserFilter: "",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
err := Validate(cfg)
|
||||
assert.NoError(t, err)
|
||||
}
|
||||
@@ -2521,36 +2521,6 @@ class SharingNgContext implements Context {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^the last share invitation should have an expiration date approximately "([^"]*)" days from now$/
|
||||
*
|
||||
* @param string $days
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function theLastShareInvitationShouldHaveAnExpirationDateApproximatelyDaysFromNow(
|
||||
string $days,
|
||||
): void {
|
||||
$responseBody = $this->featureContext->getJsonDecodedResponseBodyContent();
|
||||
Assert::assertTrue(
|
||||
isset($responseBody->value[0]->expirationDateTime),
|
||||
"Expected the created share to have an 'expirationDateTime' but none was returned:\n"
|
||||
. print_r($responseBody, true),
|
||||
);
|
||||
$actual = new DateTime($responseBody->value[0]->expirationDateTime);
|
||||
$expected = (new DateTime())->modify("+" . (int)$days . " days");
|
||||
$diffSeconds = \abs($actual->getTimestamp() - $expected->getTimestamp());
|
||||
// allow a 1-minute tolerance to absorb request/processing latency, matching the
|
||||
// backend unit test's own tolerance (BeTemporally("~", expectedDefault, time.Minute))
|
||||
Assert::assertLessThanOrEqual(
|
||||
60,
|
||||
$diffSeconds,
|
||||
"Expected an expiration date approximately $days days from now ("
|
||||
. $expected->format(DATE_ATOM) . "), but got " . $actual->format(DATE_ATOM)
|
||||
. " (difference of {$diffSeconds}s)",
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" lists permissions with following filters for (?:folder|file) "([^"]*)" of the space "([^"]*)" using the Graph API:$/
|
||||
*
|
||||
|
||||
@@ -88,51 +88,6 @@ Feature: Send a drive invitations
|
||||
| Manager |
|
||||
|
||||
|
||||
Scenario Outline: space membership does not get a default expiration when created without one
|
||||
Given using spaces DAV path
|
||||
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
|
||||
And user "Alice" has created a space "NewSpace" with the default quota using the Graph API
|
||||
When user "Alice" sends the following space share invitation using permissions endpoint of the Graph API:
|
||||
| space | NewSpace |
|
||||
| sharee | Brian |
|
||||
| shareType | user |
|
||||
| permissionsRole | <permissions-role> |
|
||||
Then the HTTP status code should be "200"
|
||||
And the JSON data of the response should match
|
||||
"""
|
||||
{
|
||||
"type": "object",
|
||||
"required": [
|
||||
"value"
|
||||
],
|
||||
"properties": {
|
||||
"value": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"maxItems": 1,
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"grantedToV2",
|
||||
"roles"
|
||||
],
|
||||
"not": {
|
||||
"required": [
|
||||
"expirationDateTime"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
"""
|
||||
Examples:
|
||||
| permissions-role |
|
||||
| Space Viewer |
|
||||
| Space Editor |
|
||||
| Manager |
|
||||
|
||||
|
||||
Scenario Outline: send share invitation for disabled project space to user with different roles (permissions endpoint)
|
||||
Given using spaces DAV path
|
||||
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
|
||||
|
||||
@@ -1231,59 +1231,6 @@ Feature: vault
|
||||
"""
|
||||
|
||||
|
||||
Scenario Outline: server sets a default 30-day expiration when a user share is created without one
|
||||
Given user "Brian" has been created with default attributes
|
||||
And the administrator has assigned the role "Space Admin" to user "Brian" using the Graph API
|
||||
And user "Alice" has been set up in oCIS
|
||||
And user "Brian" has been set up in oCIS
|
||||
And user "Alice" has uploaded a file inside space "Personal" with content "to share" to "textfile1.txt" in vault
|
||||
And user "Alice" has created a folder "FolderToShare" in space "Personal" in vault
|
||||
When user "Alice" sends the following resource share invitation using the Graph API:
|
||||
| resource | <resource> |
|
||||
| space | Personal |
|
||||
| sharee | Brian |
|
||||
| shareType | user |
|
||||
| permissionsRole | <permissions-role> |
|
||||
| storage | vault |
|
||||
Then the HTTP status code should be "200"
|
||||
And the JSON data of the response should match
|
||||
"""
|
||||
{
|
||||
"type": "object",
|
||||
"required": [
|
||||
"value"
|
||||
],
|
||||
"properties": {
|
||||
"value": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"maxItems": 1,
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"roles",
|
||||
"grantedToV2",
|
||||
"expirationDateTime"
|
||||
],
|
||||
"properties": {
|
||||
"expirationDateTime": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
"""
|
||||
And the last share invitation should have an expiration date approximately "30" days from now
|
||||
Examples:
|
||||
| permissions-role | resource |
|
||||
| Viewer | textfile1.txt |
|
||||
| Viewer | FolderToShare |
|
||||
|
||||
|
||||
Scenario Outline: try to send share invitation for a project space in vault to a user without the vault mode permission (permissions endpoint)
|
||||
Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
|
||||
And user "Brian" has been created with default attributes
|
||||
|
||||
@@ -92,13 +92,5 @@ if [[ "$ENABLE_VAULT" == "true" ]]; then
|
||||
sed -i "/imgSrc:/i\\ - 'https://keycloak:8443/'" $CFG_DIR/values.yaml
|
||||
fi
|
||||
|
||||
if [[ "$ENABLE_SHORT_ACCESS_TOKEN" == "true" ]]; then
|
||||
sed -i '/shortAccessTokenTest:/{n;s|false|true|}' $CFG_DIR/values.yaml
|
||||
fi
|
||||
|
||||
if [[ "$ENABLE_OIDC_OFFLINE_ACCESS" == "true" ]]; then
|
||||
sed -i "s|webClientScope: 'openid profile email'|webClientScope: 'openid profile email offline_access'|" $CFG_DIR/values.yaml
|
||||
fi
|
||||
|
||||
# copy custom values file
|
||||
cp $CFG_DIR/values.yaml "$CHT_DIR/ci/deployment-values.yaml"
|
||||
@@ -168,10 +168,4 @@
|
||||
value: "1a01c2c4-4309-4483-a845-842fd56d8622"
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- if and (eq .appName "idp") .Values.shortAccessTokenTest.enabled }}
|
||||
{{/* Shortens the access token lifetime so the oidc/oidc-iframe e2e tests can actually
|
||||
observe a token renewal within their wait window - see values.yaml. */}}
|
||||
- name: IDP_ACCESS_TOKEN_EXPIRATION
|
||||
value: "30"
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
@@ -13,8 +13,6 @@ insecure:
|
||||
oidcIdpInsecure: true
|
||||
ocisHttpApiInsecure: true
|
||||
ocmInsecure: true
|
||||
shortAccessTokenTest:
|
||||
enabled: true
|
||||
features:
|
||||
authapp:
|
||||
enabled: false
|
||||
@@ -169,8 +167,6 @@ services:
|
||||
enabled: true
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
config:
|
||||
webClientScope: 'openid profile email'
|
||||
antivirus:
|
||||
events:
|
||||
consumer:
|
||||
|
||||
+2
-3
@@ -403,7 +403,6 @@ type Version struct {
|
||||
|
||||
// CapabilitiesVault holds vault capabilities
|
||||
type CapabilitiesVault struct {
|
||||
Enabled ocsBool `json:"enabled" xml:"enabled" mapstructure:"enabled"`
|
||||
VaultStorageProvider string `json:"vault_storage_provider" xml:"vault_storage_provider" mapstructure:"vault_storage_provider"`
|
||||
DefaultShareExpirationDays int `json:"default_share_expiration_days" xml:"default_share_expiration_days" mapstructure:"default_share_expiration_days"`
|
||||
Enabled ocsBool `json:"enabled" xml:"enabled" mapstructure:"enabled"`
|
||||
VaultStorageProvider string `json:"vault_storage_provider" xml:"vault_storage_provider" mapstructure:"vault_storage_provider"`
|
||||
}
|
||||
Vendored
+1
-1
@@ -1321,7 +1321,7 @@ github.com/orcaman/concurrent-map
|
||||
# github.com/owncloud/libre-graph-api-go v1.0.5-0.20260216101009-eeac018af245
|
||||
## explicit; go 1.18
|
||||
github.com/owncloud/libre-graph-api-go
|
||||
# github.com/owncloud/reva/v2 v2.0.0-20261007144855-b8082819aa39
|
||||
# github.com/owncloud/reva/v2 v2.0.0-20261007080847-2cb387523ac7
|
||||
## explicit; go 1.26.0
|
||||
github.com/owncloud/reva/v2/cmd/revad/internal/grace
|
||||
github.com/owncloud/reva/v2/cmd/revad/runtime
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"af":{},"ar":{"Loading":"جار التحميل","Search":"بحث","Copy":"نسخ","Close":"غلق","Details":"التفاصيل","Cancel":"إلغاء"},"bs":{},"bg":{"Navigate one level up":"Преминаване с едно ниво нагоре","Show actions for current folder":"Показване на действията за текущата папка","Loading":"Зареждане","Search":"Търсене","Copied":"Копирано","Copy":"Копиране","Clear filter":"Изчистване на филтъра","Close":"Затваряне","Read more":"Прочетете още","Details":"Подробности","Pagination":"Странициране","Go to the previous page":"Към предишната страница","Go to the next page":"Към следващата страница","Go to page %{ page }":"Към страница %{ page }","Loading avatar":"Зареждане на аватар","Cancel":"Отказ","Loading results":"Зареждане на резултати","No options available.":"Няма налични опции.","Deselect %{label}":"Премахване на избора от %{label}","Clear input":"Изчистване на въведеното"},"ca":{"Breadcrumbs":"Ruta navegada","Navigate one level up":"Navega a un nivell superior","Show actions for current folder":"Mostra les accions per a la carpeta actual","Loading":"S'està carregant","Clear date":"Neteja la data","The date must be after %{date}":"La data ha de ser posterior a %{date}","Search":"Cerca","Oh no!":"Oh, no!","That emoji couldn’t be found":"No s'ha pogut trobar l'emoji","Pick an emoji…":"Trieu un emoji...","Add custom emoji":"Afegeix un emoji personalitzat","Activity":"Activitat","Custom":"Personalitzat","Flags":"Banderes","Food & Drink":"Menjar i beguda","Frequently used":"Utilitzats freqüentment","Animals & Nature":"Animals i natura","Objects":"Objectes","Smileys & People":"Somriures i persones","Travel & Places":"Viatges i llocs","Search Results":"Resultats de la cerca","Symbols":"Símbols","Choose default skin tone":"Tria el mode de l'aparença per defecte","Default":"Per defecte","Light":"Clar","Medium-Light":"Mitjà-Clar","Medium":"Mitjà","Medium-Dark":"Mitjà-Fosc","Dark":"Fosc","Copied":"Copiat","Copy":"Copia","Copy the following information and pass them to technical support to troubleshoot the problem:":"Copiar la següent informació i passa-la al suport tècnic per resoldre el problema:","Clear filter":"Neteja el filtre","${filterLabel} filter removed":{"Accessibility announcement when a toggle filter is deactivated":"S'ha eliminat el filtre ${filterLabel}"},"${filterLabel} filter applied":{"Accessibility announcement when a toggle filter is activated":"S'ha aplicat el filtre ${filterLabel}"},"Close":"Tanca","Read more":"Llegeix més","Details":"Detalls","Pagination":"Paginació","Go to the previous page":"Ves a la pàgina anterior","Go to the next page":"Ves a la pàgina següent","Go to page %{ page }":"Ves a la pàgina %{ page }","Loading avatar":"Carregant l'avatar","Cancel":"Cancel·la","Loading results":"Carregant resultats","No options available.":"No hi ha opcions disponibles.","Deselect %{label}":"Desselecciona %{label}","Column headers with buttons are sortable.":{"Table component caption sorting explanation available only to screen readers.":"Les capçaleres de columna amb botons són ordenables."},"Icons":{"Sets a hidden table header text for screen readers":"Icones"},"Clear input":"Neteja l'entrada","Hide password":"Amaga contrasenya","Show password":"Mostra la contrasenya","Copy password":"Copia la contrasenya","Generate password":"Genera contrasenya","Fulfilled":"Complert","Not fulfilled":"No complert","Password policy":"Política de contrasenyes","Password meets all requirements":"La contrasenya compleix tots els requisits","Password requirements: %{requirements}":"Requisits de contrasenya: %{requirements}"},"de":{"Breadcrumbs":"Brotkrumennavigation","Navigate one level up":"Eine Ebene höher navigieren","Show actions for current folder":"Aktionen für den aktuellen Ordner anzeigen","Loading":"Lade ...","Clear date":"Lösche das Datum","The date must be after %{date}":"Das Datum muss nach dem %{date} sein","Search":"Suchen","Oh no!":"Oh nein!","That emoji couldn’t be found":"Das Emoji konnte nicht gefunden werden","Pick an emoji…":"Emoji auswählen","Add custom emoji":"Füge ein benutzerdefiniertes Emoji hinzu","Activity":"Aktivität","Custom":"Benutzerdefiniert","Flags":"Flaggen","Food & Drink":"Essen & Trinken","Frequently used":"Oft genutzt","Animals & Nature":"Tiere & Natur","Objects":"Objekte","Smileys & People":"Smileys & Personen","Travel & Places":"Reisen & Orte","Search Results":"Suchergebnisse","Symbols":"Symbole","Choose default skin tone":"Wähle eine Standard-Hautfarbe","Default":"Standard","Light":"Hell","Medium-Light":"Mittelhell","Medium":"Mittel","Medium-Dark":"Mitteldunkel","Dark":"Dunkel","Copied":"Kopiert","Copy":"Kopieren","CoLine truncated
|
||||
{"af":{},"ar":{"Loading":"جار التحميل","Search":"بحث","Copy":"نسخ","Close":"غلق","Details":"التفاصيل","Cancel":"إلغاء"},"bs":{},"bg":{"Navigate one level up":"Преминаване с едно ниво нагоре","Show actions for current folder":"Показване на действията за текущата папка","Loading":"Зареждане","Search":"Търсене","Copied":"Копирано","Copy":"Копиране","Clear filter":"Изчистване на филтъра","Close":"Затваряне","Read more":"Прочетете още","Details":"Подробности","Pagination":"Странициране","Go to the previous page":"Към предишната страница","Go to the next page":"Към следващата страница","Go to page %{ page }":"Към страница %{ page }","Loading avatar":"Зареждане на аватар","Cancel":"Отказ","Loading results":"Зареждане на резултати","No options available.":"Няма налични опции.","Deselect %{label}":"Премахване на избора от %{label}","Clear input":"Изчистване на въведеното"},"ca":{"Breadcrumbs":"Ruta navegada","Navigate one level up":"Navega a un nivell superior","Show actions for current folder":"Mostra les accions per a la carpeta actual","Loading":"S'està carregant","Clear date":"Neteja la data","The date must be after %{date}":"La data ha de ser posterior a %{date}","Search":"Cerca","Oh no!":"Oh, no!","That emoji couldn’t be found":"No s'ha pogut trobar l'emoji","Pick an emoji…":"Trieu un emoji...","Add custom emoji":"Afegeix un emoji personalitzat","Activity":"Activitat","Custom":"Personalitzat","Flags":"Banderes","Food & Drink":"Menjar i beguda","Frequently used":"Utilitzats freqüentment","Animals & Nature":"Animals i natura","Objects":"Objectes","Smileys & People":"Somriures i persones","Travel & Places":"Viatges i llocs","Search Results":"Resultats de la cerca","Symbols":"Símbols","Choose default skin tone":"Tria el mode de l'aparença per defecte","Default":"Per defecte","Light":"Clar","Medium-Light":"Mitjà-Clar","Medium":"Mitjà","Medium-Dark":"Mitjà-Fosc","Dark":"Fosc","Copied":"Copiat","Copy":"Copia","Copy the following information and pass them to technical support to troubleshoot the problem:":"Copiar la següent informació i passa-la al suport tècnic per resoldre el problema:","Clear filter":"Neteja el filtre","${filterLabel} filter removed":{"Accessibility announcement when a toggle filter is deactivated":"S'ha eliminat el filtre ${filterLabel}"},"${filterLabel} filter applied":{"Accessibility announcement when a toggle filter is activated":"S'ha aplicat el filtre ${filterLabel}"},"Close":"Tanca","Read more":"Llegeix més","Details":"Detalls","Pagination":"Paginació","Go to the previous page":"Ves a la pàgina anterior","Go to the next page":"Ves a la pàgina següent","Go to page %{ page }":"Ves a la pàgina %{ page }","Loading avatar":"Carregant l'avatar","Cancel":"Cancel·la","Loading results":"Carregant resultats","No options available.":"No hi ha opcions disponibles.","Deselect %{label}":"Desselecciona %{label}","Column headers with buttons are sortable.":{"Table component caption sorting explanation available only to screen readers.":"Les capçaleres de columna amb botons són ordenables."},"Icons":{"Sets a hidden table header text for screen readers":"Icones"},"Clear input":"Neteja l'entrada","Hide password":"Amaga contrasenya","Show password":"Mostra la contrasenya","Copy password":"Copia la contrasenya","Generate password":"Genera contrasenya","Fulfilled":"Complert","Not fulfilled":"No complert","Password policy":"Política de contrasenyes","Password meets all requirements":"La contrasenya compleix tots els requisits","Password requirements: %{requirements}":"Requisits de contrasenya: %{requirements}"},"cs":{"Navigate one level up":"Přejít o úroveň výše","Show actions for current folder":"Zobrazit akce pro aktuální složku","Loading":"Načítání","Search":"Hledat","Copied":"Zkopírováno","Copy":"Kopírovat","Clear filter":"Zrušit filter","Close":"Zavřít","Read more":"Číst dále","Details":"Detaily","Pagination":"Stránkování","Go to the previous page":"Jít na předchozí stránku","Go to the next page":"Jít na další stránku","Go to page %{ page }":"Jít na stránku %{ page }","Loading avatar":"Načítání avatara","Cancel":"Zrušit","Loading results":"Načítání výsledků","No options available.":"Žádné možnosti nejsou dostupné.","Deselect %{label}":"Zrušit výběr %{label}","Clear input":"Vymazat vstup"},"de":{"Breadcrumbs":"Brotkrumennavigation","Navigate one level up":"Eine Ebene höher navigieren","Show actions for current folder":"Aktionen für den aktuellen Ordner anzeigen","Loading":"Lade ...","Clear date":"Lösche das Datum","The date must be after %{date}":"Das Datum muss nach dem %{date} sein","Search":Line truncated
|
||||
@@ -1 +1 @@
|
||||
{"af":{},"ar":{},"bs":{},"bg":{"Activities":"Дейности"},"ca":{"Activity unknown":"Activitat desconeguda","The resource is unavailable, it may have been deleted.":"El recurs no està disponible, pot ser que s'hagi suprimit.","Activities":"Activitats","Location":"Ubicació","Filter location":"Filtrar ubicació","No activities found":"No s'ha trobat cap activitat"},"cs":{"Activities":"Aktivity"},"de":{"Activity unknown":"Unbekannte Aktivität","The resource is unavailable, it may have been deleted.":"Die Ressource ist nicht mehr verfügbar, sie wurde möglicherweise gelöscht.","Activities":"Aktivitäten","Location":"Ort","Filter location":"Ort filtern","No activities found":"Keine Aktivitäten gefunden"},"el":{},"es":{"Activity unknown":"Actividad desconocida","The resource is unavailable, it may have been deleted.":"El recurso no está disponible, puede haber sido borrado.","Activities":"Actividades","Location":"Localización","Filter location":"Filtrar ubicación","No activities found":"Sin actividades"},"et":{},"fr":{"Activity unknown":"Activité inconnue","The resource is unavailable, it may have been deleted.":"La ressource n'est pas disponible, elle a peut-être été supprimée.","Activities":"Activités","Location":"Localisation","Filter location":"Filter la localisation","No activities found":"Aucune activité trouvée"},"gl":{},"he":{"Activity unknown":"פעילות לא ידועה","The resource is unavailable, it may have been deleted.":"המשאב לא זמין, ייתכן והוא נמחק.","Activities":"פעילויות","Location":"מיקום","Filter location":"סינון מיקום","No activities found":"לא נמצאו פעילויות"},"hr":{"The resource is unavailable, it may have been deleted.":"Ovaj resurs je nedostupan, moguče da je izbrisan.","Activities":"Aktivnosti","Location":"Lokacija","Filter location":"Filtriraj lokaciju","No activities found":"Nema pronađenih aktivnosti"},"id":{"The resource is unavailable, it may have been deleted.":"Sumber daya tidak tersedia, mungkin telah dihapus.","Activities":"Aktifitas","Location":"Lokasi","Filter location":"Lokasi filter","No activities found":"Aktifitas tidak ditemukan"},"it":{"Activity unknown":"Attività sconosciuta","The resource is unavailable, it may have been deleted.":"La risorsa non è disponibile, potrebbe essere stata cancellata.","Activities":"Attività","Location":"Posizione","Filter location":"Filtro posizione","No activities found":"Nessuna attività trovata"},"ja":{"Activity unknown":"不明なアクティビティ","The resource is unavailable, it may have been deleted.":"このリソースは利用できません。削除された可能性があります。","Activities":"アクティビティ","Location":"場所","Filter location":"場所で絞り込む","No activities found":"アクティビティはありません"},"pl":{"Activities":"Aktywności","Location":"Lokalizacja"},"pt":{"Activity unknown":"Atividade desconhecida","The resource is unavailable, it may have been deleted.":"O recurso está indisponível, ele pode ter sido excluído.","Activities":"Atividades","Location":"Localização","Filter location":"Filtrar localização","No activities found":"Nenhuma atividade encontrada"},"nl":{"The resource is unavailable, it may have been deleted.":"De bron is niet beschikbaar, deze is mogelijk verwijderd.","Activities":"Activiteit","Location":"Locatie","Filter location":"Locatie filteren","No activities found":"Geen activiteiten gevonden"},"ka":{},"ko":{"Activities":"활동"},"ro":{},"ru":{"Activity unknown":"Неизвестная деятельность","The resource is unavailable, it may have been deleted.":"Ресурс недоступен, возможно, он был удален.","Activities":"Активности","Location":"Местоположение","Filter location":"Фильтр местоположения","No activities found":"Нет найденных активностей"},"si":{},"sk":{},"sq":{"Activity unknown":"Veprimtari e panjohur","The resource is unavailable, it may have been deleted.":"Burimi s’gjendet, mund të jetë fshirë.","Activities":"Veprimtari","Location":"Vendndodhje","Filter location":"Filtro vendndodhjen","No activities found":"S’u gjetën veprimtari"},"sv":{"Activity unknown":"Okänd aktivitet","The resource is unavailable, it may have been deleted.":"Resursen är inte tillgänglig och kan ha tagits bort.","Activities":"Aktiviteter","Location":"Plats","Filter location":"Filtrera plats","No activities found":"Inga aktiviteter hittades"},"sr":{},"ta":{},"tr":{"Activities":"Aktiviteler"},"ug":{},"zh":{"Activity unknown":"活动未知","The resource is unavailable, it may have been deleted.":"资源不可用,可能已经被删除","Activities":"活动","Location":"地点","Filter location":"过滤器地点","No activities found":"未发现活动"},"uk":{"Activity unknown":"Активність невідома","The resource is unavailable, it may hLine truncated
|
||||
{"af":{},"ar":{},"bs":{},"bg":{"Activities":"Дейности"},"ca":{"Activity unknown":"Activitat desconeguda","The resource is unavailable, it may have been deleted.":"El recurs no està disponible, pot ser que s'hagi suprimit.","Activities":"Activitats","Location":"Ubicació","Filter location":"Filtrar ubicació","No activities found":"No s'ha trobat cap activitat"},"cs":{"Activities":"Aktivity"},"de":{"Activity unknown":"Unbekannte Aktivität","The resource is unavailable, it may have been deleted.":"Die Ressource ist nicht mehr verfügbar, sie wurde möglicherweise gelöscht.","Activities":"Aktivitäten","Location":"Ort","Filter location":"Ort filtern","No activities found":"Keine Aktivitäten gefunden"},"el":{},"es":{"Activity unknown":"Actividad desconocida","The resource is unavailable, it may have been deleted.":"El recurso no está disponible, puede haber sido borrado.","Activities":"Actividades","Location":"Localización","Filter location":"Filtrar ubicación","No activities found":"Sin actividades"},"et":{},"fr":{"Activity unknown":"Activité inconnue","The resource is unavailable, it may have been deleted.":"La ressource n'est pas disponible, elle a peut-être été supprimée.","Activities":"Activités","Location":"Localisation","Filter location":"Filter la localisation","No activities found":"Aucune activité trouvée"},"gl":{},"he":{"Activity unknown":"פעילות לא ידועה","The resource is unavailable, it may have been deleted.":"המשאב לא זמין, ייתכן והוא נמחק.","Activities":"פעילויות","Location":"מיקום","Filter location":"סינון מיקום","No activities found":"לא נמצאו פעילויות"},"id":{"The resource is unavailable, it may have been deleted.":"Sumber daya tidak tersedia, mungkin telah dihapus.","Activities":"Aktifitas","Location":"Lokasi","Filter location":"Lokasi filter","No activities found":"Aktifitas tidak ditemukan"},"hr":{"The resource is unavailable, it may have been deleted.":"Ovaj resurs je nedostupan, moguče da je izbrisan.","Activities":"Aktivnosti","Location":"Lokacija","Filter location":"Filtriraj lokaciju","No activities found":"Nema pronađenih aktivnosti"},"it":{"Activity unknown":"Attività sconosciuta","The resource is unavailable, it may have been deleted.":"La risorsa non è disponibile, potrebbe essere stata cancellata.","Activities":"Attività","Location":"Posizione","Filter location":"Filtro posizione","No activities found":"Nessuna attività trovata"},"ja":{"Activity unknown":"不明なアクティビティ","The resource is unavailable, it may have been deleted.":"このリソースは利用できません。削除された可能性があります。","Activities":"アクティビティ","Location":"場所","Filter location":"場所で絞り込む","No activities found":"アクティビティはありません"},"nl":{"The resource is unavailable, it may have been deleted.":"De bron is niet beschikbaar, deze is mogelijk verwijderd.","Activities":"Activiteit","Location":"Locatie","Filter location":"Locatie filteren","No activities found":"Geen activiteiten gevonden"},"pl":{"Activities":"Aktywności","Location":"Lokalizacja"},"pt":{"Activity unknown":"Atividade desconhecida","The resource is unavailable, it may have been deleted.":"O recurso está indisponível, ele pode ter sido excluído.","Activities":"Atividades","Location":"Localização","Filter location":"Filtrar localização","No activities found":"Nenhuma atividade encontrada"},"ka":{},"ko":{"Activities":"활동"},"ro":{},"ru":{"Activity unknown":"Неизвестная деятельность","The resource is unavailable, it may have been deleted.":"Ресурс недоступен, возможно, он был удален.","Activities":"Активности","Location":"Местоположение","Filter location":"Фильтр местоположения","No activities found":"Нет найденных активностей"},"si":{},"sk":{},"sq":{"Activity unknown":"Veprimtari e panjohur","The resource is unavailable, it may have been deleted.":"Burimi s’gjendet, mund të jetë fshirë.","Activities":"Veprimtari","Location":"Vendndodhje","Filter location":"Filtro vendndodhjen","No activities found":"S’u gjetën veprimtari"},"sv":{"Activity unknown":"Okänd aktivitet","The resource is unavailable, it may have been deleted.":"Resursen är inte tillgänglig och kan ha tagits bort.","Activities":"Aktiviteter","Location":"Plats","Filter location":"Filtrera plats","No activities found":"Inga aktiviteter hittades"},"sr":{},"ta":{},"tr":{"Activities":"Aktiviteler"},"ug":{},"uk":{"Activity unknown":"Активність невідома","The resource is unavailable, it may have been deleted.":"Ресурс недоступний, можливо його видалили.","Activities":"Активності","Location":"Місцезнаходження","Filter location":"Фільтр розташування","No activities fouLine truncated
|
||||
@@ -1 +1 @@
|
||||
{"af":{},"ar":{"Appearance":"ظهور","Logo":"شعار","Show context menu":"إظهار قائمة السياق","Info":"معلومات","ownCloud":"السحابة الخاصة","Edition":"الطبعه","Version":"النسخة","Web client version":"إصدار عميل الويب","Group name":"اسم المجموعة","Group was created successfully":"تم إنشاء المجموعة بنجاح","Failed to create group":"فشل إنشاء مجموعة","Group name cannot be empty":"لا يمكن أن يكون اسم المجموعة فارغا","Group name cannot exceed 255 characters":"لا يمكن أن يتجاوز اسم المجموعة 255 حرفا","Select all groups":"حدد كل المجموعات","Show details":"اظهر التفاصيل","Edit":"يحرر","This group is read-only and can't be edited":"هذه المجموعة للقراءة فقط ولا يمكن تحريرها","Members":"اعضاء","Actions":"إجراءات","Select a group to view details":"حدد مجموعة لعرض التفاصيل","Overview of the information about the selected group":"نظرة عامة على المعلومات حول المجموعة المحددة","%{count} groups selected":"٪{عدد} المجموعات المحددة","Failed to edit group":"فشل تحرير المجموعة","Filter members":"تصفية الأعضاء","No members found":"لم يتم العثور على أعضاء","Search":"بحث","Select all spaces":"حدد كل المسافات","Disabled":"تعطيل","Enabled":"تمكين","Name":"اسم","Status":"حالة","Manager":"مدير","Total quota":"إجمالي الحصة","Used quota":"الحصة المستخدمة","Remaining quota":"الحصة المتبقية","Modified":"تم التعديل","User name":"اسم المستخدم","First and last name":"الاسم الأول والأخير","Email":"بريد إلكتروني","Password":"كلمة المرور","User was created successfully":"تم إنشاء المستخدم بنجاح","Failed to create user":"فشل إنشاء مستخدم","User name cannot be empty":"لا يمكن أن يكون اسم المستخدم فارغا","User name cannot contain white spaces":"لا يمكن أن يحتوي اسم المستخدم على مسافات بيضاء","User name cannot exceed 255 characters":"لا يمكن أن يتجاوز اسم المستخدم 255 حرفا","User name cannot start with a number":"لا يمكن أن يبدأ اسم المستخدم برقم","First and last name cannot be empty":"لا يمكن أن يكون الاسم الأول واسم العائلة فارغين","First and last name cannot exceed 255 characters":"لا يمكن أن يتجاوز الاسم الأول والأخير 255 حرفا","Please enter a valid email":"الرجاء إدخال بريد إلكتروني صحيح","Password cannot be empty":"لا يمكن أن تكون كلمة المرور فارغة","Groups":"المجموعات","Login":"تسجيل الدخول","Select...":"اختار...","Your own login status will remain unchanged.":"ستبقى حالة تسجيل الدخول الخاصة بك دون تغيير.","Allowed":"مسموح","Forbidden":"ممنوع","Select a user to view details":"حدد مستخدما لعرض التفاصيل","Overview of the information about the selected user":"نظرة عامة على المعلومات حول المستخدم المحدد","Role":"دور","Quota":"الحصه النسبيه","No groups assigned.":"لم يتم تعيين مجموعات","%{count} users selected":"٪{عدد} المستخدمين المحددين","No restriction":"لا قيود","Personal quota":"الحصة الشخصية","To set an individual quota, the user needs to have logged in once.":"لتعيين حصة فردية ، يحتاج المستخدم إلى تسجيل الدخول مرة واحدة.","Failed to edit user":"فشل تحرير المستخدم","Select all users":"حدد جميع المستخدمين","Logo was reset successfully. Reloading page...":"تمت إعادة تعيين الشعار بنجاح. إعادة تحميل الصفحة","Failed to reset logo":"فشل إعادة تعيين الشعار","Reset logo":"إعادة تعيين الشعار","The file type is unsupported":"نوع الملف غير معتمد","Logo was uploaded successfully":"تم تحميل الشعار بنجاح","Failed to upload logo":"فشل تحميل الشعار","Upload logo":"تحميل الشعار","New group":"مجموعة جديدة","Create group":"إنشاء مجموعة","Delete":"حذف","Add to groups":"إضافة إلى المجموعات","New user":"مستخدم جديد","Create user":"إنشاء مستخدم","Edit login":"تعديل تسجيل الدخول","Quota will only be applied to users who logged in at least once.":"سيتم تطبيق الحصة النسبية فقط على المستخدمين الذين قاموا بتسجيل الدخول مرة واحدة على الLine truncated
|
||||
{"af":{},"bs":{},"ar":{"Appearance":"ظهور","Logo":"شعار","Show context menu":"إظهار قائمة السياق","Info":"معلومات","ownCloud":"السحابة الخاصة","Edition":"الطبعه","Version":"النسخة","Web client version":"إصدار عميل الويب","Group name":"اسم المجموعة","Group was created successfully":"تم إنشاء المجموعة بنجاح","Failed to create group":"فشل إنشاء مجموعة","Group name cannot be empty":"لا يمكن أن يكون اسم المجموعة فارغا","Group name cannot exceed 255 characters":"لا يمكن أن يتجاوز اسم المجموعة 255 حرفا","Select all groups":"حدد كل المجموعات","Show details":"اظهر التفاصيل","Edit":"يحرر","This group is read-only and can't be edited":"هذه المجموعة للقراءة فقط ولا يمكن تحريرها","Members":"اعضاء","Actions":"إجراءات","Select a group to view details":"حدد مجموعة لعرض التفاصيل","Overview of the information about the selected group":"نظرة عامة على المعلومات حول المجموعة المحددة","%{count} groups selected":"٪{عدد} المجموعات المحددة","Failed to edit group":"فشل تحرير المجموعة","Filter members":"تصفية الأعضاء","No members found":"لم يتم العثور على أعضاء","Search":"بحث","Select all spaces":"حدد كل المسافات","Disabled":"تعطيل","Enabled":"تمكين","Name":"اسم","Status":"حالة","Manager":"مدير","Total quota":"إجمالي الحصة","Used quota":"الحصة المستخدمة","Remaining quota":"الحصة المتبقية","Modified":"تم التعديل","User name":"اسم المستخدم","First and last name":"الاسم الأول والأخير","Email":"بريد إلكتروني","Password":"كلمة المرور","User was created successfully":"تم إنشاء المستخدم بنجاح","Failed to create user":"فشل إنشاء مستخدم","User name cannot be empty":"لا يمكن أن يكون اسم المستخدم فارغا","User name cannot contain white spaces":"لا يمكن أن يحتوي اسم المستخدم على مسافات بيضاء","User name cannot exceed 255 characters":"لا يمكن أن يتجاوز اسم المستخدم 255 حرفا","User name cannot start with a number":"لا يمكن أن يبدأ اسم المستخدم برقم","First and last name cannot be empty":"لا يمكن أن يكون الاسم الأول واسم العائلة فارغين","First and last name cannot exceed 255 characters":"لا يمكن أن يتجاوز الاسم الأول والأخير 255 حرفا","Please enter a valid email":"الرجاء إدخال بريد إلكتروني صحيح","Password cannot be empty":"لا يمكن أن تكون كلمة المرور فارغة","Groups":"المجموعات","Login":"تسجيل الدخول","Select...":"اختار...","Your own login status will remain unchanged.":"ستبقى حالة تسجيل الدخول الخاصة بك دون تغيير.","Allowed":"مسموح","Forbidden":"ممنوع","Select a user to view details":"حدد مستخدما لعرض التفاصيل","Overview of the information about the selected user":"نظرة عامة على المعلومات حول المستخدم المحدد","Role":"دور","Quota":"الحصه النسبيه","No groups assigned.":"لم يتم تعيين مجموعات","%{count} users selected":"٪{عدد} المستخدمين المحددين","No restriction":"لا قيود","Personal quota":"الحصة الشخصية","To set an individual quota, the user needs to have logged in once.":"لتعيين حصة فردية ، يحتاج المستخدم إلى تسجيل الدخول مرة واحدة.","Failed to edit user":"فشل تحرير المستخدم","Select all users":"حدد جميع المستخدمين","Logo was reset successfully. Reloading page...":"تمت إعادة تعيين الشعار بنجاح. إعادة تحميل الصفحة","Failed to reset logo":"فشل إعادة تعيين الشعار","Reset logo":"إعادة تعيين الشعار","The file type is unsupported":"نوع الملف غير معتمد","Logo was uploaded successfully":"تم تحميل الشعار بنجاح","Failed to upload logo":"فشل تحميل الشعار","Upload logo":"تحميل الشعار","New group":"مجموعة جديدة","Create group":"إنشاء مجموعة","Delete":"حذف","Add to groups":"إضافة إلى المجموعات","New user":"مستخدم جديد","Create user":"إنشاء مستخدم","Edit login":"تعديل تسجيل الدخول","Quota will only be applied to users who logged in at least once.":"سيتم تطبيق الحصة النسبية فقط على المستخدمين الذين قاموا بتسجيل الدخول مرة واحدة علLine truncated
|
||||
@@ -1 +1 @@
|
||||
{"af":{},"ar":{"Download":"تحميل","Details":"التفاصيل","Search":"بحث"},"bs":{},"bg":{"Download":"Изтегляне","Details":"Подробности","Tags":"Етикети","Search":"Търсене"},"ca":{"How to install?":"Com instal·lar?","The App Store app lets you download apps as .zip files. Please follow the link below to learn how to install these apps into your oCIS.":"La botiga d'aplicacions us permet baixar aplicacions com a fitxers .zip. Si us plau, segueix l'enllaç següent per saber com instal·lar aquestes aplicacions a la teva instància d'oCIS.","Previous image":"Imatge anterior","Show image %{index}":"Mostra la imatge %{index}","Next image":"Imatge següent","most recent":"més recent","App Version":"Versió de l'aplicació","Infinite Scale Version":"Versió Infinite Scale","Download":"Baixa","App Store":"Botiga d'aplicacions","App Details":"Detalls de l'aplicació","Back to list":"Torna a la llista","Details":"Detalls","Tags":"Etiquetes","Author":"Autor","Resources":"Recursos","Releases":"Llançaments","Search":"Cerca","No apps found matching your search":"No s'ha trobat cap aplicació que coincideixi amb la cerca"},"cs":{"Download":"Stáhnout","Details":"Detaily","Search":"Hledat"},"de":{"How to install?":"Wie installieren?","The App Store app lets you download apps as .zip files. Please follow the link below to learn how to install these apps into your oCIS.":"Mit der App Store App können Apps als .zip Dateien heruntergeladen werden. Die Dokumentation zur Installation kann über den untenstehenden Link nachgelesen werden.","most recent":"neueste","App Version":"App Version","Infinite Scale Version":"Infinite Scale Version","Download":"Herunterladen","App Store":"App Store","App Details":"App Details","Back to list":"Zurück zur Liste","Details":"Details","Tags":"Schlagworte","Author":"Autor","Resources":"Ressourcen","Releases":"Versionen","Search":"Suchen","No apps found matching your search":"Es wurden keine Apps für diese Suche gefunden"},"el":{"Download":"Λήψη","Search":"Αναζήτηση"},"es":{"How to install?":"¿Cómo instalar?","The App Store app lets you download apps as .zip files. Please follow the link below to learn how to install these apps into your oCIS.":"La aplicación App Store te permite descargar aplicaciones como archivos .zip. Sigue el enlace que aparece a continuación para saber cómo instalar estas aplicaciones en tu oCIS.","Previous image":"Imagen previa","Show image %{index}":"Mostrar imagen %{index}","Next image":"Siguiente imagen","most recent":"Más reciente","App Version":"Versión","Infinite Scale Version":"Versión Infinite Scale","Download":"Descargar","App Store":"App Store","App Details":"Detalle de la App","Back to list":"Volver a la lista","Details":"Detalles","Tags":"Etiquetas","Author":"Autor","Resources":"Recursos","Releases":"Lanzamientos","Search":"Buscar","No apps found matching your search":"No se encontraron apps que correspondan a su búsqueda."},"et":{},"fr":{"How to install?":"Comment installer ?","The App Store app lets you download apps as .zip files. Please follow the link below to learn how to install these apps into your oCIS.":"L'application App Store vous permet de télécharger des applications sous forme de fichiers .zip. Veuillez suivre le lien ci-dessous pour savoir comment installer ces applications dans votre oCIS.","most recent":"plus récent","App Version":"Version de l'application","Infinite Scale Version":"Version d'Infinite Scale","Download":"Télécharger","App Store":"App Store","App Details":"Détails de l'app","Back to list":"Retourner à la liste","Details":"Détails","Tags":"Étiquettes","Author":"Auteur","Resources":"Resources","Releases":"Versions","Search":"Recherche","No apps found matching your search":"Aucune application ne correspond à votre recherche"},"gl":{"Download":"Descargar","Search":"Buscar"},"he":{"Download":"הורדה","Details":"פרטים","Search":"חיפוש"},"hr":{"How to install?":"Kako instalirati?","The App Store app lets you download apps as .zip files. Please follow the link below to learn how to install these apps into your oCIS.":"Trgovina Aplikacija dozvoljava preuzimanje aplikacija kao zip.datoteke.\nMolimo vas da pratite link ispod da saznate kako instalirati aplikacije u vaš oCIS.","most recent":"Najnoviji","App Version":"Verzija Aplikacije","Infinite Scale Version":"Verzija Beskonačnog Skaliranja","Download":"Preuzmi","App Store":"Trgovina Aplikacija","App Details":"Detalji Aplikacije","Back to list":"Nazad na listu","Details":"Detalji","Tags":"Oznake","Author":"Autor","Resources":"Resursi","Releases":"Izdanja","Search":"Pretraga","No apps found matching your search":"Vaša pretraga nije pronašla aplikacije koje tražite"},"id":{"Search":"Cari"},"it":{"How to install?":"Come installare?","The App Store app lets you download apps as .zip files. Please follow the link below to learn how to install these apps into your oCIS.":"L'applicazione App StLine truncated
|
||||
{"af":{},"ar":{"Download":"تحميل","Details":"التفاصيل","Search":"بحث"},"bs":{},"bg":{"Download":"Изтегляне","Details":"Подробности","Tags":"Етикети","Search":"Търсене"},"ca":{"How to install?":"Com instal·lar?","The App Store app lets you download apps as .zip files. Please follow the link below to learn how to install these apps into your oCIS.":"La botiga d'aplicacions us permet baixar aplicacions com a fitxers .zip. Si us plau, segueix l'enllaç següent per saber com instal·lar aquestes aplicacions a la teva instància d'oCIS.","Previous image":"Imatge anterior","Show image %{index}":"Mostra la imatge %{index}","Next image":"Imatge següent","most recent":"més recent","App Version":"Versió de l'aplicació","Infinite Scale Version":"Versió Infinite Scale","Download":"Baixa","App Store":"Botiga d'aplicacions","App Details":"Detalls de l'aplicació","Back to list":"Torna a la llista","Details":"Detalls","Tags":"Etiquetes","Author":"Autor","Resources":"Recursos","Releases":"Llançaments","Search":"Cerca","No apps found matching your search":"No s'ha trobat cap aplicació que coincideixi amb la cerca"},"cs":{"Download":"Stáhnout","Details":"Detaily","Search":"Hledat"},"de":{"How to install?":"Wie installieren?","The App Store app lets you download apps as .zip files. Please follow the link below to learn how to install these apps into your oCIS.":"Mit der App Store App können Apps als .zip Dateien heruntergeladen werden. Die Dokumentation zur Installation kann über den untenstehenden Link nachgelesen werden.","most recent":"neueste","App Version":"App Version","Infinite Scale Version":"Infinite Scale Version","Download":"Herunterladen","App Store":"App Store","App Details":"App Details","Back to list":"Zurück zur Liste","Details":"Details","Tags":"Schlagworte","Author":"Autor","Resources":"Ressourcen","Releases":"Versionen","Search":"Suchen","No apps found matching your search":"Es wurden keine Apps für diese Suche gefunden"},"el":{"Download":"Λήψη","Search":"Αναζήτηση"},"es":{"How to install?":"¿Cómo instalar?","The App Store app lets you download apps as .zip files. Please follow the link below to learn how to install these apps into your oCIS.":"La aplicación App Store te permite descargar aplicaciones como archivos .zip. Sigue el enlace que aparece a continuación para saber cómo instalar estas aplicaciones en tu oCIS.","Previous image":"Imagen previa","Show image %{index}":"Mostrar imagen %{index}","Next image":"Siguiente imagen","most recent":"Más reciente","App Version":"Versión","Infinite Scale Version":"Versión Infinite Scale","Download":"Descargar","App Store":"App Store","App Details":"Detalle de la App","Back to list":"Volver a la lista","Details":"Detalles","Tags":"Etiquetas","Author":"Autor","Resources":"Recursos","Releases":"Lanzamientos","Search":"Buscar","No apps found matching your search":"No se encontraron apps que correspondan a su búsqueda."},"fr":{"How to install?":"Comment installer ?","The App Store app lets you download apps as .zip files. Please follow the link below to learn how to install these apps into your oCIS.":"L'application App Store vous permet de télécharger des applications sous forme de fichiers .zip. Veuillez suivre le lien ci-dessous pour savoir comment installer ces applications dans votre oCIS.","most recent":"plus récent","App Version":"Version de l'application","Infinite Scale Version":"Version d'Infinite Scale","Download":"Télécharger","App Store":"App Store","App Details":"Détails de l'app","Back to list":"Retourner à la liste","Details":"Détails","Tags":"Étiquettes","Author":"Auteur","Resources":"Resources","Releases":"Versions","Search":"Recherche","No apps found matching your search":"Aucune application ne correspond à votre recherche"},"et":{},"gl":{"Download":"Descargar","Search":"Buscar"},"he":{"Download":"הורדה","Details":"פרטים","Search":"חיפוש"},"hr":{"How to install?":"Kako instalirati?","The App Store app lets you download apps as .zip files. Please follow the link below to learn how to install these apps into your oCIS.":"Trgovina Aplikacija dozvoljava preuzimanje aplikacija kao zip.datoteke.\nMolimo vas da pratite link ispod da saznate kako instalirati aplikacije u vaš oCIS.","most recent":"Najnoviji","App Version":"Verzija Aplikacije","Infinite Scale Version":"Verzija Beskonačnog Skaliranja","Download":"Preuzmi","App Store":"Trgovina Aplikacija","App Details":"Detalji Aplikacije","Back to list":"Nazad na listu","Details":"Detalji","Tags":"Oznake","Author":"Autor","Resources":"Resursi","Releases":"Izdanja","Search":"Pretraga","No apps found matching your search":"Vaša pretraga nije pronašla aplikacije koje tražite"},"id":{"Search":"Cari"},"it":{"How to install?":"Come installare?","The App Store app lets you download apps as .zip files. Please follow the link below to learn how to install these apps into your oCIS.":"L'applicazione App StLine truncated
|
||||
@@ -1 +1 @@
|
||||
{"af":{},"ar":{"Close":"غلق","Download":"تحميل","File name":"اسم الملف","Favorites":"التفضيلات","Status":"حالة"},"bs":{},"bg":{"Close":"Затваряне","Download":"Изтегляне","Copied":"Копирано","Copy link":"Копиране на връзка","Language":"Език","File name":"Име на файл","Size":"Размер","Favorites":"Любими","Status":"Статус"},"ca":{"Decrease font size":"Disminueix la mida de la lletra","Reset font size":"Restableix la mida de la lletra","Increase font size":"Augmenta la mida de la lletra","Chapter":"Capítol","Navigate to previous page":"Ves a la pàgina anterior","Navigate to next page":"Ves a la pàgina següent","Close":"Tanca","Download":"Baixa","Copied":"Copiat","Copy link":"Copiar enllaç","Language":"Idioma","File name":"Nom del fitxer","Location":"Ubicació","Size":"Mida","Favorites":"Preferits","Author":"Autor","Status":"Estat","Epub Reader":"Lector epub","Sort by":"Ordena per","View mode":"Mode de visualització","Title":"Títol"},"cs":{"Close":"Zavřít","Download":"Stáhnout","Copied":"Zkopírováno","File name":"Název souboru","Size":"Velikost","Favorites":"Oblíbené","Status":"Stav","Sort by":"Seřadit podle"},"de":{"Decrease font size":"Schriftgröße verkleinern","Reset font size":"Schriftgröße zurücksetzen","Increase font size":"Schriftgröße vergrößern","Chapter":"Kapitel","Navigate to previous page":"Zur vorherigen Seite navigieren","Navigate to next page":"Zur nächsten Seite navigieren","Close":"Schließen","Download":"Export Herunterladen","Copied":"Kopiert","Copy link":"Link kopieren","Language":"Sprache","File name":"Dateiname","Location":"Ort","Size":"Größe","Favorites":"Favoriten","Author":"Autor","Space":"Space","Status":"Status","Epub Reader":"Epub-Reader","Sort by":"Sortieren nach","View mode":"Anzeigemodus","Title":"Titel"},"el":{"Download":"Λήψη","Size":"Μέγεθος","Favorites":"Αγαπημένα"},"es":{"Decrease font size":"Reducir tamaño de fuente","Reset font size":"Restablecer tamaño de fuente","Increase font size":"Aumentar tamaño de fuente","Chapter":"Capítulo","Navigate to previous page":"Ir a la anterior página","Navigate to next page":"Ir a la siguiente página","Close":"Cerrar","Download":"Descargar","Copied":"Copiado/a","Copy link":"Enlace copiado","Language":"Idioma","File name":"Nombre de archivo","Location":"Localización","Size":"Tamaño","Favorites":"Favoritos","Author":"Autor","Status":"Estado","Epub Reader":"Lector epub","Sort by":"Ordenado por","View mode":"Mode de visualització","Title":"Título"},"et":{},"fr":{"Decrease font size":"Réduire la taille de la police","Reset font size":"Réinitialiser la taille de la police","Increase font size":"Augmenter la taille de la police","Chapter":"Chapitre","Navigate to previous page":"Aller à la page précédente","Navigate to next page":"Aller à la page suivante","Close":"Fermer","Download":"Télécharger","Copied":"Copié","Copy link":"Copier le lien","Language":"Langue","File name":"Nom de fichier","Location":"Localisation","Size":"Taille","Favorites":"Favoris","Author":"Auteur","Status":"État","Epub Reader":"Lecteur Epub","Sort by":"trier par","Title":"Titre"},"gl":{"Download":"Descargar","File name":"Nome de ficheiro","Size":"Tamaño","Favorites":"Favoritos","Status":"Estado"},"he":{"Close":"סגירה","Download":"הורדה","Copied":"הועתק","Language":"שפה","File name":"שם קובץ","Location":"מיקום","Size":"גודל","Favorites":"מועדפים","Space":"מרחב","Status":"מצב"},"hr":{"Download":"Preuzmi","Location":"Lokacija","Author":"Autor"},"id":{"Location":"Lokasi"},"it":{"Decrease font size":"Diminuisci la dimensione del carattere","Reset font size":"Ripristina la dimensione del carattere","Increase font size":"Aumenta la dimensione del carattere","Chapter":"Capitolo","Navigate to previous page":"Torna alla pagina precedente","Navigate to next page":"Passa alla pagina successiva","Close":"Chiudi","Download":"Scarica","Copied":"Copiato","Copy link":"Copia collegamento","Language":"Lingua","File name":"Nome file","Location":"Posizione","Size":"Dimensione","Favorites":"Preferiti","Author":"Autore","Status":"Stato","Epub Reader":"Lettore Epub"},"ja":{"Decrease font size":"フォントサイズを縮小","Reset font size":"フォントサイズをリセット","Increase font size":"フォントサイズを拡大","Chapter":"章","Navigate to previous page":"前のページへ移動","Navigate to next page":"次のページへ移動","Close book details":"書籍の詳細を閉じる","Book details":"書籍の詳細","Close":"閉じる","Remove favorite":"お気に入りから削除","Add favorite":"お気に入りに追加","Favorited":"お気に入り登録済み","Favorite":"お気に入り","Unknown author":"著者不明","Show in folder":"フォルダ内で表示","Download":"ダウンロード","Copied":"コピーしました","Copy link":"リンクをコピLine truncated
|
||||
{"af":{},"ar":{"Close":"غلق","Download":"تحميل","File name":"اسم الملف","Favorites":"التفضيلات","Status":"حالة"},"bs":{},"bg":{"Close":"Затваряне","Download":"Изтегляне","Copied":"Копирано","Copy link":"Копиране на връзка","Language":"Език","File name":"Име на файл","Size":"Размер","Favorites":"Любими","Status":"Статус"},"ca":{"Decrease font size":"Disminueix la mida de la lletra","Reset font size":"Restableix la mida de la lletra","Increase font size":"Augmenta la mida de la lletra","Chapter":"Capítol","Navigate to previous page":"Ves a la pàgina anterior","Navigate to next page":"Ves a la pàgina següent","Close":"Tanca","Download":"Baixa","Copied":"Copiat","Copy link":"Copiar enllaç","Language":"Idioma","File name":"Nom del fitxer","Location":"Ubicació","Size":"Mida","Favorites":"Preferits","Author":"Autor","Status":"Estat","Epub Reader":"Lector epub","Sort by":"Ordena per","View mode":"Mode de visualització","Title":"Títol"},"cs":{"Close":"Zavřít","Download":"Stáhnout","Copied":"Zkopírováno","File name":"Název souboru","Size":"Velikost","Favorites":"Oblíbené","Status":"Stav","Sort by":"Seřadit podle"},"de":{"Decrease font size":"Schriftgröße verkleinern","Reset font size":"Schriftgröße zurücksetzen","Increase font size":"Schriftgröße vergrößern","Chapter":"Kapitel","Navigate to previous page":"Zur vorherigen Seite navigieren","Navigate to next page":"Zur nächsten Seite navigieren","Close":"Schließen","Download":"Export Herunterladen","Copied":"Kopiert","Copy link":"Link kopieren","Language":"Sprache","File name":"Dateiname","Location":"Ort","Size":"Größe","Favorites":"Favoriten","Author":"Autor","Space":"Space","Status":"Status","Epub Reader":"Epub-Reader","Sort by":"Sortieren nach","View mode":"Anzeigemodus","Title":"Titel"},"el":{"Download":"Λήψη","Size":"Μέγεθος","Favorites":"Αγαπημένα"},"es":{"Decrease font size":"Reducir tamaño de fuente","Reset font size":"Restablecer tamaño de fuente","Increase font size":"Aumentar tamaño de fuente","Chapter":"Capítulo","Navigate to previous page":"Ir a la anterior página","Navigate to next page":"Ir a la siguiente página","Close":"Cerrar","Download":"Descargar","Copied":"Copiado/a","Copy link":"Enlace copiado","Language":"Idioma","File name":"Nombre de archivo","Location":"Localización","Size":"Tamaño","Favorites":"Favoritos","Author":"Autor","Status":"Estado","Epub Reader":"Lector epub","Sort by":"Ordenado por","View mode":"Mode de visualització","Title":"Título"},"et":{},"fr":{"Decrease font size":"Réduire la taille de la police","Reset font size":"Réinitialiser la taille de la police","Increase font size":"Augmenter la taille de la police","Chapter":"Chapitre","Navigate to previous page":"Aller à la page précédente","Navigate to next page":"Aller à la page suivante","Close":"Fermer","Download":"Télécharger","Copied":"Copié","Copy link":"Copier le lien","Language":"Langue","File name":"Nom de fichier","Location":"Localisation","Size":"Taille","Favorites":"Favoris","Author":"Auteur","Status":"État","Epub Reader":"Lecteur Epub","Sort by":"trier par","Title":"Titre"},"gl":{"Download":"Descargar","File name":"Nome de ficheiro","Size":"Tamaño","Favorites":"Favoritos","Status":"Estado"},"he":{"Close":"סגירה","Download":"הורדה","Copied":"הועתק","Language":"שפה","File name":"שם קובץ","Location":"מיקום","Size":"גודל","Favorites":"מועדפים","Space":"מרחב","Status":"מצב"},"hr":{"Download":"Preuzmi","Location":"Lokacija","Author":"Autor"},"id":{"Location":"Lokasi"},"it":{"Decrease font size":"Diminuisci la dimensione del carattere","Reset font size":"Ripristina la dimensione del carattere","Increase font size":"Aumenta la dimensione del carattere","Chapter":"Capitolo","Navigate to previous page":"Torna alla pagina precedente","Navigate to next page":"Passa alla pagina successiva","Close":"Chiudi","Download":"Scarica","Copied":"Copiato","Copy link":"Copia collegamento","Language":"Lingua","File name":"Nome file","Location":"Posizione","Size":"Dimensione","Favorites":"Preferiti","Author":"Autore","Status":"Stato","Epub Reader":"Lettore Epub"},"ja":{"Decrease font size":"フォントサイズを縮小","Reset font size":"フォントサイズをリセット","Increase font size":"フォントサイズを拡大","Chapter":"章","Navigate to previous page":"前のページへ移動","Navigate to next page":"次のページへ移動","Close book details":"書籍の詳細を閉じる","Book details":"書籍の詳細","Close":"閉じる","Remove favorite":"お気に入りから削除","Add favorite":"お気に入りに追加","Favorited":"お気に入り登録済み","Favorite":"お気に入り","Unknown author":"著者不明","Show in folder":"フォルダ内で表示","Download":"ダウンロード","Copied":"コピーしました","Copy link":"リンクをコピLine truncated
|
||||
@@ -1 +1 @@
|
||||
{"af":{"An error occurred":"Ein Fehler ist aufgetreten"},"ar":{"Save":"حفظ","File name":"اسم الملف"},"bs":{},"bg":{"Save":"Запазване","File name":"Име на файл","\"%{appName}\" app content area":"Област на съдържанието на приложението \"%{appName}\".","An error occurred":"Възникна грешка","This file is currently being processed and is not yet available for use. Please try again shortly.":"Този файл в момента се обработва и все още не е на разположение за използване. Моля, опитайте отново след малко.","Open in %{app}":"Отваряне в %{app}","One moment please…":"Един момент, моля...","You are being redirected.":"Вие сте пренасочени."},"ca":{"The file name cannot be empty.":"El nom del fitxer no pot estar buit.","The file name cannot contain \"/\" or \"\\\".":"El nom del fitxer no pot contenir \"/\" ni \"\\\".","The file name cannot be \".\" or \"..\".":"El nom del fitxer no pot ser \".\" o \"..\".","Cannot save a copy: file is read-only":"No es pot desar una còpia: el fitxer és de només lectura","Save a copy":"Desa una còpia","Save":"Desa","File name":"Nom del fitxer","Cannot save a copy: the editor is not available":"No es pot desar una còpia: l'editor no està disponible","\"%{appName}\" app content area":"Àrea de contingut de l'aplicació \"%{appName}\"","An error occurred":"S'ha produït un error","Cannot open file in edit mode as it is read-only":"No es pot obrir el fitxer en mode d'edició, ja que és de només lectura","This file is currently being processed and is not yet available for use. Please try again shortly.":"Aquest fitxer s'està processant i encara no està disponible per al seu ús. Torneu-ho a provar en breu.","Create from template via %{ name }":"Crea a partir de la plantilla mitjançant %{ name }","Failed to create document from template":"No s'ha pogut crear el document a partir de la plantilla","External":"Extern","Redirecting to external app":"Redirigint a una aplicació externa","Open in %{app}":"Obre a %{app}","We could not open this file":"No hem pogut obrir aquest fitxer","One moment please…":"Un moment, si us plau...","You are being redirected.":"Estas sent redirigit.","No file was specified to open.":"No s'ha especificat cap fitxer per obrir.","The file could not be loaded. It may have been deleted or you might not have access to it.":"No s'ha pogut carregar el fitxer. Potser s'ha suprimit o potser no hi teniu accés.","No application is available to open this file type.":"No hi ha cap aplicació disponible per obrir aquest tipus de fitxer."},"cs":{"Save":"Uložit","File name":"Název souboru","\"%{appName}\" app content area":"Oblast obsahu aplikace \"%{appName}\"","An error occurred":"Objevila se chyba","This file is currently being processed and is not yet available for use. Please try again shortly.":"Tento soubor se právě zpracovává a zatím není k dispozici pro použití. Zkuste to za chvíli znovu."},"de":{"Save":"Speichern","File name":"Dateiname","\"%{appName}\" app content area":"\"%{appName}\" Inhaltsbereich","An error occurred":"Ein Fehler ist aufgetreten.","Cannot open file in edit mode as it is read-only":"Datei kann nicht im Bearbeitungsmodus geöffnet werden, da sie schreibgeschützt ist","This file is currently being processed and is not yet available for use. Please try again shortly.":"Diese Datei wird derzeit bearbeitet und kann noch nicht verwendet werden. Bitte in Kürze erneut versuchen.","Create from template via %{ name }":"Aus Vorlage erstellen via %{ name } ","Failed to create document from template":"Dokumenterstellung aus Vorlage fehlgeschlagen","External":"Extern","Redirecting to external app":"Weiterleiten zu externer App","Open in %{app}":"In %{app} öffnen","One moment please…":"Einen Moment bitte ...","You are being redirected.":"Sie werden weitergeleitet."},"el":{"Save":"Αποθήκευση"},"es":{"The file name cannot be empty.":"El nombre del archivo no puede estar vacío.","The file name cannot contain \"/\" or \"\\\".":"El nombre del archivo no puede contener \"/\" o \"\\\".","The file name cannot be \".\" or \"..\".":"El nombre del archivo no puede ser \".\" o \"..\".","Cannot save a copy: file is read-only":"No se puede guardar una copia: el archivo es de solo lectura","Save a copy":"Guardar una copia","Save":"Guardar","File name":"Nombre de archivo","Cannot save a copy: the editor is not available":"No se puede guardar una copia: el editor no está disponible","\"%{appName}\" app content area":"\"%{appName}\" área de contenido de la aplicación","An error occurred":"Ocurrió un error","Cannot open file in edit mode as it is read-only":"No se puede abrir el archivo en modo edición porque es de solo lectura.","This file is currently being processed and is not yet available for use. Please try again shortly.":"Este arLine truncated
|
||||
{"af":{"An error occurred":"Ein Fehler ist aufgetreten"},"ar":{"Save":"حفظ","File name":"اسم الملف"},"bs":{},"bg":{"Save":"Запазване","File name":"Име на файл","\"%{appName}\" app content area":"Област на съдържанието на приложението \"%{appName}\".","An error occurred":"Възникна грешка","This file is currently being processed and is not yet available for use. Please try again shortly.":"Този файл в момента се обработва и все още не е на разположение за използване. Моля, опитайте отново след малко.","Open in %{app}":"Отваряне в %{app}","One moment please…":"Един момент, моля...","You are being redirected.":"Вие сте пренасочени."},"ca":{"The file name cannot be empty.":"El nom del fitxer no pot estar buit.","The file name cannot contain \"/\" or \"\\\".":"El nom del fitxer no pot contenir \"/\" ni \"\\\".","The file name cannot be \".\" or \"..\".":"El nom del fitxer no pot ser \".\" o \"..\".","Cannot save a copy: file is read-only":"No es pot desar una còpia: el fitxer és de només lectura","Save a copy":"Desa una còpia","Save":"Desa","File name":"Nom del fitxer","Cannot save a copy: the editor is not available":"No es pot desar una còpia: l'editor no està disponible","\"%{appName}\" app content area":"Àrea de contingut de l'aplicació \"%{appName}\"","An error occurred":"S'ha produït un error","Cannot open file in edit mode as it is read-only":"No es pot obrir el fitxer en mode d'edició, ja que és de només lectura","This file is currently being processed and is not yet available for use. Please try again shortly.":"Aquest fitxer s'està processant i encara no està disponible per al seu ús. Torneu-ho a provar en breu.","Create from template via %{ name }":"Crea a partir de la plantilla mitjançant %{ name }","Failed to create document from template":"No s'ha pogut crear el document a partir de la plantilla","External":"Extern","Redirecting to external app":"Redirigint a una aplicació externa","Open in %{app}":"Obre a %{app}","We could not open this file":"No hem pogut obrir aquest fitxer","One moment please…":"Un moment, si us plau...","You are being redirected.":"Estas sent redirigit.","No file was specified to open.":"No s'ha especificat cap fitxer per obrir.","The file could not be loaded. It may have been deleted or you might not have access to it.":"No s'ha pogut carregar el fitxer. Potser s'ha suprimit o potser no hi teniu accés.","No application is available to open this file type.":"No hi ha cap aplicació disponible per obrir aquest tipus de fitxer."},"cs":{"Save":"Uložit","File name":"Název souboru","\"%{appName}\" app content area":"Oblast obsahu aplikace \"%{appName}\"","An error occurred":"Objevila se chyba","This file is currently being processed and is not yet available for use. Please try again shortly.":"Tento soubor se právě zpracovává a zatím není k dispozici pro použití. Zkuste to za chvíli znovu."},"de":{"Save":"Speichern","File name":"Dateiname","\"%{appName}\" app content area":"\"%{appName}\" Inhaltsbereich","An error occurred":"Ein Fehler ist aufgetreten.","Cannot open file in edit mode as it is read-only":"Datei kann nicht im Bearbeitungsmodus geöffnet werden, da sie schreibgeschützt ist","This file is currently being processed and is not yet available for use. Please try again shortly.":"Diese Datei wird derzeit bearbeitet und kann noch nicht verwendet werden. Bitte in Kürze erneut versuchen.","Create from template via %{ name }":"Aus Vorlage erstellen via %{ name } ","Failed to create document from template":"Dokumenterstellung aus Vorlage fehlgeschlagen","External":"Extern","Redirecting to external app":"Weiterleiten zu externer App","Open in %{app}":"In %{app} öffnen","One moment please…":"Einen Moment bitte ...","You are being redirected.":"Sie werden weitergeleitet."},"el":{"Save":"Αποθήκευση"},"es":{"The file name cannot be empty.":"El nombre del archivo no puede estar vacío.","The file name cannot contain \"/\" or \"\\\".":"El nombre del archivo no puede contener \"/\" o \"\\\".","The file name cannot be \".\" or \"..\".":"El nombre del archivo no puede ser \".\" o \"..\".","Cannot save a copy: file is read-only":"No se puede guardar una copia: el archivo es de solo lectura","Save a copy":"Guardar una copia","Save":"Guardar","File name":"Nombre de archivo","Cannot save a copy: the editor is not available":"No se puede guardar una copia: el editor no está disponible","\"%{appName}\" app content area":"\"%{appName}\" área de contenido de la aplicación","An error occurred":"Ocurrió un error","Cannot open file in edit mode as it is read-only":"No se puede abrir el archivo en modo edición porque es de solo lectura.","This file is currently being processed and is not yet available for use. Please try again shortly.":"Este arLine truncated
|
||||
@@ -1 +1 @@
|
||||
{"af":{},"ar":{"New":"جديد","Paste here":"الصق هنا","New folder":"ملف جديد","You have no permission to upload!":"ليس لديك إذن للتحميل!","Shared with me":"مشاركة معي","Shared with others":"مشاركة مع الآخرين","Shared via link":"تمت المشاركة عبر الرابط","Files":"ملفات","File name":"اسم الملف","Cancel":"إلغاء","Resource not found":"لم يتم العثور على المورد","We went looking everywhere, but were unable to find the selected resource.":"قمنا بالبحث في كل مكان ، ولكن لم نتمكن من العثور على المورد المحدد.","Reload public link":"إعادة تحميل الرابط العام","Expiration date":"تاريخ إنتهاء الصلاحية\n ","Confirm":"تأكيد","Password":"كلمة المرور","Filter:":"تصفيه","Search":"بحث","Shared by":"تمت المشاركة بواسطة","Owner":"المالك","(me)":"(أنا)","Versions":"إصدارات","Spaces":"مسافات","Remove expiration date":"إزالة تاريخ انتهاء الصلاحية","Share":"شارك","Person was added":"تمت إضافة الشخص","Internal":"داخلي","Group":"مجموعة","User":"مستخدم","Access denied":"الدخول مرفوض","Name":"اسم","Custom permissions":"صلاحيات مخصصة","Delete":"حذف","You don't have permission to share this file.":"ليس لديك إذن بمشاركة هذا الملف.","You don't have permission to share this folder.":"ليس لديك إذن بمشاركة هذا المجلد.","Save":"حفظ","Rename":"إعادة تسمية","Remove password":"إزالة كلمة المرور ","Members":"اعضاء","Filter members":"تصفية الأعضاء","Restore":"استرجع","Download":"تحميل","Show context menu":{"":"إظهار قائمة السياق","Accessibility label":"إظهار قائمة السياق"},"The file type is unsupported":"نوع الملف غير معتمد","Details":"التفاصيل","Actions":"إجراءات","Favorites":"التفضيلات","Deleted files":"الملفات المحذوفة","There are no resources marked as favorite":"لا توجد موارد تم تحديدها كمفضلة","An error occurred while loading the public link":"حدث خطأ أثناء تحميل الرابط العام","Public link":"رابط عام","You have no deleted files":"ليس لديك ملفات محذوفة","Disabled":"تعطيل","Enabled":"تمكين"},"bs":{},"ca":{"New":"Nou","Folder":"Carpeta","Shortcut":"Drecera","New Folder":"Nova carpeta","Upload":{"":"Carrega","The label of the upload button in secret file upload view":"Carrega"},"Paste here":"Enganxa aquí","Clear clipboard":"Esborra el porta-retalls","You have no permission to paste files here.":"No teniu permís per enganxar fitxers aquí.","You cannot cut and paste resources into the same folder.":"No podeu retallar i enganxar recursos a la mateixa carpeta.","You have no permission to create new files!":"No teniu permís per crear fitxers nous!","New folder":"Nova carpeta","Create new files or folders":"Crea fitxers o carpetes noves","You have no permission to upload!":"No teniu permís per carregar elements!","Upload files or folders":"Carrega fitxers o carpetes","Shares pages navigation":"Navegació per les pàgines de compartició","Shared with me":"Compartit amb mi","Shared with others":"Compartit amb altres","Shared via link":"Compartit via enllaç","Please wait until all imports have finished":"Espereu fins que finalitzin totes les importacions","Files":"Fitxers","File name":"Nom del fitxer","Cancel":"Cancel·la","Share link(s)":"Comparteix els enllaços","Choose":"Escull","Attach as copy":"Adjunta com a còpia","Resource not found":"No s'ha trobat el recurs","We went looking everywhere, but were unable to find the selected resource.":"Hem mirat pertot arreu, però no hem pogut trobar el recurs seleccionat.","Go to »Spaces Overview«":"Ves a »Vista General d'Espais«","Go to »Personal« page":"Ves a la pàgina »Personal«","Reload public link":"Torna a carregar l'enllaç públic","Expiration date":"Data de venciment","Confirm":"Confirmar","Password":"Contrasenya","Link was updated successfully":"L'enllaç s'ha actualitzat correctament","Failed to update link":"No s'ha pogut actualitzar l'enllaç","Filter:":"Filtre:","Type":"Tipus","Tags":"Etiquetes","Filter tags":"Filtra les etiquetes","Last Modified":"Darrera modificació","No results found":"No s'han trobat resultats","Search for files":"Cerca fitxers","today":"avui","yesterday":"ahir","this week":"aquesta setmana","last week":"la setmana passada","last 7 days":"darrers 7 dies","this month":"aquest mes","last month":"mes passat","last 30 days":"darrers 30 dies","this year":"aquest any","last year":"l'any passat","File":"Fitxer","Document":"Document","Spreadsheet":"Full de càlcul","Presentation":"Presentació","PDF":"PDF","Image":"Imatge","Video":"Vídeo"Line truncated
|
||||
{"af":{},"ar":{"New":"جديد","Paste here":"الصق هنا","New folder":"ملف جديد","You have no permission to upload!":"ليس لديك إذن للتحميل!","Shared with me":"مشاركة معي","Shared with others":"مشاركة مع الآخرين","Shared via link":"تمت المشاركة عبر الرابط","Files":"ملفات","File name":"اسم الملف","Cancel":"إلغاء","Resource not found":"لم يتم العثور على المورد","We went looking everywhere, but were unable to find the selected resource.":"قمنا بالبحث في كل مكان ، ولكن لم نتمكن من العثور على المورد المحدد.","Reload public link":"إعادة تحميل الرابط العام","Expiration date":"تاريخ إنتهاء الصلاحية\n ","Confirm":"تأكيد","Password":"كلمة المرور","Filter:":"تصفيه","Search":"بحث","Shared by":"تمت المشاركة بواسطة","Owner":"المالك","(me)":"(أنا)","Versions":"إصدارات","Spaces":"مسافات","Remove expiration date":"إزالة تاريخ انتهاء الصلاحية","Share":"شارك","Person was added":"تمت إضافة الشخص","Internal":"داخلي","Group":"مجموعة","User":"مستخدم","Access denied":"الدخول مرفوض","Name":"اسم","Custom permissions":"صلاحيات مخصصة","Delete":"حذف","You don't have permission to share this file.":"ليس لديك إذن بمشاركة هذا الملف.","You don't have permission to share this folder.":"ليس لديك إذن بمشاركة هذا المجلد.","Save":"حفظ","Rename":"إعادة تسمية","Remove password":"إزالة كلمة المرور ","Members":"اعضاء","Filter members":"تصفية الأعضاء","Restore":"استرجع","Download":"تحميل","Show context menu":{"":"إظهار قائمة السياق","Accessibility label":"إظهار قائمة السياق"},"The file type is unsupported":"نوع الملف غير معتمد","Details":"التفاصيل","Actions":"إجراءات","Favorites":"التفضيلات","Deleted files":"الملفات المحذوفة","There are no resources marked as favorite":"لا توجد موارد تم تحديدها كمفضلة","An error occurred while loading the public link":"حدث خطأ أثناء تحميل الرابط العام","Public link":"رابط عام","You have no deleted files":"ليس لديك ملفات محذوفة","Disabled":"تعطيل","Enabled":"تمكين"},"bs":{},"bg":{"New":"Нов","Folder":"Папка","New Folder":"Нова папка","Upload":{"":"Качване","The label of the upload button in secret file upload view":"Качване"},"Paste here":"Поставяне тук","You have no permission to create new files!":"Нямате необходимите права за създаване на нови файлове!","New folder":"Нова папка","Create new files or folders":"Създаване на нови файлове или папки","You have no permission to upload!":"Нямате необходимите права за качване!","Upload files or folders":"Качване на файлове и папки","Shares pages navigation":"Навигация на страниците със споделяния","Shared with me":"Споделено с мен","Shared with others":"Споделено с други","Shared via link":"Споделено чрез връзка","Files":"Файлове","File name":"Име на файл","Cancel":"Отказ","Resource not found":"Ресурсът не е намерен","We went looking everywhere, but were unable to find the selected resource.":"Търсихме навсякъде, но не успяхме да открием избрания ресурс.","Go to »Spaces Overview«":"Отидете на \"Преглед на пространства\"","Go to »Personal« page":"Отидете на страницата »Лични«.","Reload public link":"Презареждане на публичната връзка","Confirm":"Потвърждаване","Password":"Парола","Link was updated successfully":"Връзката е актуализирана успешно","Failed to update link":"Неуспех при актуализирането на връзка","Filter:":"Филтър:","Type":"Тип","Tags":"Етикети","Filter tags":"Филтър за етикети","No results found":"Няма намерени резултати","Search for files":"Търсене на файлове","Search results for \"%{searchTerm}\"":"Резултати от търсенето за \"%{searchTerm}\"","Search":"Търсене","Showing up to %{searchLimit} results":"Показват се до %{searchLimit} резултатa","Found %{totalResults}, showing the %{itemCount} best matching results":"Намерени %{totalResults}, показващи %{itemCount} от най-подходяLine truncated
|
||||
@@ -42,8 +42,8 @@ interface Emits {
|
||||
}
|
||||
defineEmits<Emits>()
|
||||
const { currentDate = null, minDate = null, isClearable = true } = defineProps<Props>()
|
||||
const dateTime = ref<DateTime>(currentDate)
|
||||
const confirmDisabled = ref(!currentDate)
|
||||
const dateTime = ref<DateTime>()
|
||||
const confirmDisabled = ref(true)
|
||||
const onDateChanged = ({ date, error }: { date: DateTime; error: boolean }) => {
|
||||
confirmDisabled.value = error || !date
|
||||
dateTime.value = date
|
||||
|
||||
+4
-7
@@ -36,14 +36,10 @@ import { useModals } from '@ownclouders/web-pkg'
|
||||
import { useGettext } from 'vue3-gettext'
|
||||
import DatePickerModal from '../../../../Modals/DatePickerModal.vue'
|
||||
|
||||
interface Props {
|
||||
suggestedDate?: DateTime
|
||||
}
|
||||
interface Emits {
|
||||
(e: 'optionChange', data: { expirationDate: DateTime | null }): void
|
||||
}
|
||||
|
||||
const { suggestedDate = null } = defineProps<Props>()
|
||||
const emit = defineEmits<Emits>()
|
||||
const language = useGettext()
|
||||
const { dispatchModal } = useModals()
|
||||
@@ -63,13 +59,14 @@ const dateCurrent = customRef<DateTime>((track, trigger) => {
|
||||
})
|
||||
|
||||
const showDatePickerModal = () => {
|
||||
const resolvedCurrentDate = unref(dateCurrent) ?? suggestedDate
|
||||
const resolvedMinDate = DateTime.now()
|
||||
dispatchModal({
|
||||
title: language.$gettext('Set expiration date'),
|
||||
hideActions: true,
|
||||
customComponent: DatePickerModal,
|
||||
customComponentAttrs: () => ({ currentDate: resolvedCurrentDate, minDate: resolvedMinDate }),
|
||||
customComponentAttrs: () => ({
|
||||
currentDate: unref(dateCurrent),
|
||||
minDate: DateTime.now()
|
||||
}),
|
||||
onConfirm: (expirationDateTime: DateTime) => {
|
||||
dateCurrent.value = expirationDateTime
|
||||
}
|
||||
|
||||
+5
-42
@@ -82,29 +82,6 @@
|
||||
</template>
|
||||
</oc-select>
|
||||
</div>
|
||||
<!--
|
||||
This status region stays mounted even when the notice has nothing to say: a role="status"
|
||||
element only reliably announces to screen readers when its content changes while the region
|
||||
already exists in the DOM, not when the whole region is freshly inserted via v-if.
|
||||
-->
|
||||
<div id="vault-default-expiration-notice-status" role="status">
|
||||
<div
|
||||
v-if="isVaultResource && vaultDefaultExpirationDays && !expirationDate"
|
||||
class="oc-flex oc-flex-middle oc-gap-s oc-background-muted oc-rounded oc-p-s oc-mb-s oc-text-small"
|
||||
data-testid="vault-default-expiration-notice"
|
||||
>
|
||||
<oc-icon name="information" size="small" aria-hidden="true" />
|
||||
<span
|
||||
v-text="
|
||||
$pgettext(
|
||||
'Notice shown when sharing a resource inside the vault, telling the sharer the share will expire automatically unless they open "Show more actions" next to the share button and set a different date',
|
||||
'Expires in %{days} days by default — change it under "Show more actions"',
|
||||
{ days: String(vaultDefaultExpirationDays) }
|
||||
)
|
||||
"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="oc-flex oc-flex-between oc-flex-middle oc-mb-l oc-mt-s">
|
||||
<role-dropdown
|
||||
mode="create"
|
||||
@@ -124,11 +101,6 @@
|
||||
id="show-more-share-options-btn"
|
||||
class="oc-mx-s"
|
||||
:aria-label="$gettext('Show more actions')"
|
||||
:aria-describedby="
|
||||
isVaultResource && vaultDefaultExpirationDays && !expirationDate
|
||||
? 'vault-default-expiration-notice-status'
|
||||
: undefined
|
||||
"
|
||||
appearance="raw"
|
||||
>
|
||||
<oc-icon name="more-2" />
|
||||
@@ -139,13 +111,12 @@
|
||||
mode="click"
|
||||
padding-size="small"
|
||||
>
|
||||
<oc-list class="collaborator-edit-dropdown-options-list" aria-label="shareEditOptions">
|
||||
<oc-list
|
||||
class="collaborator-edit-dropdown-options-list"
|
||||
:aria-label="'shareEditOptions'"
|
||||
>
|
||||
<li class="oc-rounded oc-menu-item-hover">
|
||||
<expiration-datepicker
|
||||
v-if="!saving"
|
||||
:suggested-date="suggestedExpirationDate()"
|
||||
@option-change="collaboratorExpiryChanged"
|
||||
/>
|
||||
<expiration-datepicker v-if="!saving" @option-change="collaboratorExpiryChanged" />
|
||||
</li>
|
||||
</oc-list>
|
||||
</oc-drop>
|
||||
@@ -327,14 +298,6 @@ const isVaultResource = computed(() => {
|
||||
return storageId.split('$')[0] === VAULT_STORAGE_PROVIDER_ID
|
||||
})
|
||||
|
||||
// no local fallback: the default lives only in the server's vault config
|
||||
const vaultDefaultExpirationDays = capabilityRefs.vaultDefaultShareExpirationDays
|
||||
|
||||
const suggestedExpirationDate = () =>
|
||||
unref(isVaultResource) && unref(vaultDefaultExpirationDays)
|
||||
? DateTime.now().plus({ days: unref(vaultDefaultExpirationDays) })
|
||||
: undefined
|
||||
|
||||
const createSharesConcurrentRequests = computed(() => {
|
||||
return configStore.options.concurrentRequests.shares.create
|
||||
})
|
||||
|
||||
@@ -11,13 +11,13 @@
|
||||
<template v-else>
|
||||
<no-content-message
|
||||
v-if="isEmpty"
|
||||
:id="loadFailed ? 'files-trashbin-forbidden' : 'files-trashbin-empty'"
|
||||
id="files-trashbin-empty"
|
||||
class="files-empty"
|
||||
icon="delete-bin-7"
|
||||
icon-fill-type="line"
|
||||
>
|
||||
<template #message>
|
||||
<span>{{ loadFailed ? loadFailedMessage : emptyTrashMessage }}</span>
|
||||
<span>{{ emptyTrashMessage }}</span>
|
||||
</template>
|
||||
</no-content-message>
|
||||
<resource-table
|
||||
@@ -55,13 +55,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { storeToRefs } from 'pinia'
|
||||
|
||||
import {
|
||||
AppBar,
|
||||
ContextActions,
|
||||
FileSideBar,
|
||||
useResourcesStore,
|
||||
useUserStore
|
||||
} from '@ownclouders/web-pkg'
|
||||
import { AppBar, ContextActions, FileSideBar, useUserStore } from '@ownclouders/web-pkg'
|
||||
import FilesViewWrapper from '../../components/FilesViewWrapper.vue'
|
||||
import ListInfo from '../../components/FilesList/ListInfo.vue'
|
||||
import { ResourceTable } from '@ownclouders/web-pkg'
|
||||
@@ -85,8 +79,6 @@ const { space = null } = defineProps<Props>()
|
||||
const { $gettext } = useGettext()
|
||||
const userStore = useUserStore()
|
||||
const { user } = storeToRefs(userStore)
|
||||
const resourcesStore = useResourcesStore()
|
||||
const { currentFolder } = storeToRefs(resourcesStore)
|
||||
|
||||
let loadResourcesEventToken: string
|
||||
const emptyTrashMessage = computed(() => {
|
||||
@@ -95,12 +87,6 @@ const emptyTrashMessage = computed(() => {
|
||||
: $gettext('Space has no deleted files')
|
||||
})
|
||||
|
||||
// the trash root is only set when listing succeeded, e.g. it stays unset on a 403
|
||||
const loadFailed = computed(() => !unref(areResourcesLoading) && !unref(currentFolder))
|
||||
const loadFailedMessage = computed(() =>
|
||||
$gettext('Unable to load deleted files. You may not have permission to view them.')
|
||||
)
|
||||
|
||||
const titleSegments = computed(() => {
|
||||
const segments = [$gettext('Deleted files')]
|
||||
segments.unshift(space.name)
|
||||
|
||||
+1
-33
@@ -1,48 +1,16 @@
|
||||
import ExpirationDatepicker from '../../../../../../../src/components/SideBar/Shares/Collaborators/InviteCollaborator/ExpirationDatepicker.vue'
|
||||
import { defaultPlugins, mount } from '@ownclouders/web-test-helpers'
|
||||
import { useModals } from '@ownclouders/web-pkg'
|
||||
import { DateTime } from 'luxon'
|
||||
|
||||
vi.mock('@ownclouders/web-pkg', async (importOriginal) => ({
|
||||
...(await importOriginal<any>()),
|
||||
useModals: vi.fn()
|
||||
}))
|
||||
|
||||
describe('InviteCollaborator ExpirationDatepicker', () => {
|
||||
const dispatchModal = vi.fn()
|
||||
|
||||
beforeEach(() => {
|
||||
dispatchModal.mockClear()
|
||||
vi.mocked(useModals).mockReturnValue({ dispatchModal } as any)
|
||||
})
|
||||
|
||||
it('renders a button to open the datepicker and set an expiration date', () => {
|
||||
const { wrapper } = createWrapper()
|
||||
expect(wrapper.find('[data-testid="recipient-datepicker-btn"]').exists()).toBe(true)
|
||||
})
|
||||
|
||||
it('opens the picker with no suggested date by default', async () => {
|
||||
const { wrapper } = createWrapper()
|
||||
await wrapper.find('[data-testid="recipient-datepicker-btn"]').trigger('click')
|
||||
|
||||
const attrs = dispatchModal.mock.calls[0][0].customComponentAttrs()
|
||||
expect(attrs.currentDate).toBeNull()
|
||||
})
|
||||
|
||||
it('pre-fills the suggested date when no date has been set yet', async () => {
|
||||
const suggestedDate = DateTime.now().plus({ days: 30 })
|
||||
const { wrapper } = createWrapper({ suggestedDate })
|
||||
await wrapper.find('[data-testid="recipient-datepicker-btn"]').trigger('click')
|
||||
|
||||
const attrs = dispatchModal.mock.calls[0][0].customComponentAttrs()
|
||||
expect(attrs.currentDate.toMillis()).toBe(suggestedDate.toMillis())
|
||||
})
|
||||
})
|
||||
|
||||
const createWrapper = ({ suggestedDate }: { suggestedDate?: DateTime } = {}) => {
|
||||
const createWrapper = () => {
|
||||
return {
|
||||
wrapper: mount(ExpirationDatepicker, {
|
||||
props: { suggestedDate },
|
||||
global: {
|
||||
plugins: [...defaultPlugins()]
|
||||
}
|
||||
|
||||
-98
@@ -1,5 +1,4 @@
|
||||
import { mock } from 'vitest-mock-extended'
|
||||
import { DateTime } from 'luxon'
|
||||
import InviteCollaboratorForm from '../../../../../../../src/components/SideBar/Shares/Collaborators/InviteCollaborator/InviteCollaboratorForm.vue'
|
||||
import {
|
||||
defaultComponentMocks,
|
||||
@@ -179,103 +178,6 @@ describe('InviteCollaboratorForm', () => {
|
||||
)
|
||||
})
|
||||
})
|
||||
describe('vault default expiration notice', () => {
|
||||
const vaultCapabilities = {
|
||||
files_sharing: { federation: { incoming: true, outgoing: true } },
|
||||
vault: { enabled: true, vault_storage_provider: '', default_share_expiration_days: 30 }
|
||||
}
|
||||
|
||||
it('shows for a vault resource without an explicit expiration', () => {
|
||||
const { wrapper } = getWrapper({
|
||||
capabilities: vaultCapabilities,
|
||||
resource: mock<Resource>({ ...folderMock, storageId: VAULT_STORAGE_PROVIDER_ID })
|
||||
})
|
||||
|
||||
const notice = wrapper.find('[data-testid="vault-default-expiration-notice"]')
|
||||
expect(notice.exists()).toBeTruthy()
|
||||
expect(notice.attributes('tabindex')).toBeUndefined()
|
||||
expect(notice.find('oc-icon-stub').attributes('aria-hidden')).toBe('true')
|
||||
})
|
||||
it('keeps the status region mounted so screen readers pick up the announcement', () => {
|
||||
// role="status" must stay mounted; a freshly-inserted one isn't reliably announced
|
||||
const { wrapper } = getWrapper({
|
||||
resource: mock<Resource>({ ...folderMock, storageId: 'some-other-provider' })
|
||||
})
|
||||
|
||||
const statusRegion = wrapper.find('#vault-default-expiration-notice-status')
|
||||
expect(statusRegion.exists()).toBeTruthy()
|
||||
expect(statusRegion.attributes('role')).toBe('status')
|
||||
expect(wrapper.find('[data-testid="vault-default-expiration-notice"]').exists()).toBeFalsy()
|
||||
})
|
||||
it('describes the "Show more actions" toggle only while the notice applies', () => {
|
||||
const { wrapper } = getWrapper({
|
||||
capabilities: vaultCapabilities,
|
||||
resource: mock<Resource>({ ...folderMock, storageId: VAULT_STORAGE_PROVIDER_ID })
|
||||
})
|
||||
|
||||
expect(wrapper.find('#show-more-share-options-btn').attributes('aria-describedby')).toBe(
|
||||
'vault-default-expiration-notice-status'
|
||||
)
|
||||
})
|
||||
it('does not describe the "Show more actions" toggle for a resource outside the vault', () => {
|
||||
const { wrapper } = getWrapper({
|
||||
resource: mock<Resource>({ ...folderMock, storageId: 'some-other-provider' })
|
||||
})
|
||||
|
||||
expect(
|
||||
wrapper.find('#show-more-share-options-btn').attributes('aria-describedby')
|
||||
).toBeUndefined()
|
||||
})
|
||||
it('does not show for a resource outside the vault', () => {
|
||||
const { wrapper } = getWrapper({
|
||||
resource: mock<Resource>({ ...folderMock, storageId: 'some-other-provider' })
|
||||
})
|
||||
|
||||
expect(wrapper.find('[data-testid="vault-default-expiration-notice"]').exists()).toBeFalsy()
|
||||
})
|
||||
it('does not show or suggest a date when the server omits the capability', () => {
|
||||
const { wrapper } = getWrapper({
|
||||
capabilities: {
|
||||
...vaultCapabilities,
|
||||
vault: {
|
||||
enabled: true,
|
||||
vault_storage_provider: '',
|
||||
default_share_expiration_days: undefined
|
||||
}
|
||||
},
|
||||
resource: mock<Resource>({ ...folderMock, storageId: VAULT_STORAGE_PROVIDER_ID })
|
||||
})
|
||||
|
||||
expect(wrapper.find('[data-testid="vault-default-expiration-notice"]').exists()).toBeFalsy()
|
||||
expect(wrapper.vm.suggestedExpirationDate()).toBeUndefined()
|
||||
})
|
||||
it('hides once an explicit expiration date is set', async () => {
|
||||
const { wrapper } = getWrapper({
|
||||
capabilities: vaultCapabilities,
|
||||
resource: mock<Resource>({ ...folderMock, storageId: VAULT_STORAGE_PROVIDER_ID })
|
||||
})
|
||||
|
||||
wrapper.vm.expirationDate = '2026-01-01'
|
||||
await wrapper.vm.$nextTick()
|
||||
|
||||
expect(wrapper.find('[data-testid="vault-default-expiration-notice"]').exists()).toBeFalsy()
|
||||
})
|
||||
it('renders the expiration days reported by the vault capability', () => {
|
||||
const { wrapper } = getWrapper({
|
||||
capabilities: {
|
||||
...vaultCapabilities,
|
||||
vault: { ...vaultCapabilities.vault, default_share_expiration_days: 7 }
|
||||
},
|
||||
resource: mock<Resource>({ ...folderMock, storageId: VAULT_STORAGE_PROVIDER_ID })
|
||||
})
|
||||
|
||||
expect(wrapper.find('[data-testid="vault-default-expiration-notice"]').text()).toContain('7')
|
||||
expect(wrapper.vm.suggestedExpirationDate().diff(DateTime.now(), 'days').days).toBeCloseTo(
|
||||
7,
|
||||
0
|
||||
)
|
||||
})
|
||||
})
|
||||
describe('share action', () => {
|
||||
it('clicking the invite-sharees button calls the "share"-action', async () => {
|
||||
const { wrapper } = getWrapper()
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"af":{},"ar":{},"bs":{},"ca":{"This file is large, so the live preview is paused to keep the editor responsive.":"Aquest fitxer és gran, per la qual cosa la previsualització en directe està en pausa per mantenir l'editor responsiu.","Show preview anyway":"Mostra la vista prèvia de totes maneres","HTML preview":"Vista prèvia d'HTML","View mode":"Mode de visualització","HTML file":"Fitxer HTML","XHTML file":"Fitxer XHTML","HTML Editor":"Editor HTML"},"bg":{},"cs":{},"de":{"This file is large, so the live preview is paused to keep the editor responsive.":"Aufgrund der Dateigröße wurde die Live-Vorschau pausiert, um den Editor benutzbar zu halten.","Show preview anyway":"Zeige Vorschau trotzdem","HTML preview":"HTML Vorschau","View mode":"Anzeigemodus","HTML file":"HTML-Datei","XHTML file":"XHTML-Datei","HTML Editor":"HTML Editor"},"es":{"This file is large, so the live preview is paused to keep the editor responsive.":"Este archivo es muy grande, por lo que la vista previa en tiempo real se ha pausado para que el editor siga respondiendo con rapidez.","Show preview anyway":"Mostrar vista previa de todos modos","HTML preview":"Vista previa en HTML","View mode":"Mode de visualització","HTML file":"Archivo HTML","XHTML file":"Archivo XHTML","HTML Editor":"Editor HTML"},"el":{},"et":{},"gl":{},"fr":{},"hr":{},"he":{},"id":{},"it":{},"ja":{"View mode":"表示モード"},"nl":{},"pl":{},"pt":{},"ka":{},"ko":{},"ro":{"This file is large, so the live preview is paused to keep the editor responsive.":"Fișierul este mare, astfel că previzualizarea directă este intreruptă pentru a păstra editorul responsiv.","Show preview anyway":"Arată previzualizarea indiferent","View mode":"Mod vizualizare."},"ru":{"This file is large, so the live preview is paused to keep the editor responsive.":"Быстрое превью остановлено, чтобы редактор не повис, так как файл слишком велик.","Show preview anyway":"Всё равно показать превью","HTML preview":"Предпросмотр HTML ","View mode":"Режим просмотра","HTML file":"HTML-файл","XHTML file":"XHTML-файл","HTML Editor":"Редактор HTML"},"si":{},"sk":{},"sq":{"This file is large, so the live preview is paused to keep the editor responsive.":"Kjo kartelë është e madhe, ndaj paraparja drejtpërdrejt është ndalur, për ta mbajtur përpunuesin reagues.","Show preview anyway":"Shfaq paraparjen, sido qoftë","HTML preview":"Paraparje HTML-je","View mode":"Mënyrë parjeje","HTML file":"Kartelë HTML","XHTML file":"Kartelë XHTML","HTML Editor":"Përpunues HTML-sh"},"sv":{"This file is large, so the live preview is paused to keep the editor responsive.":"Filen är stor, så förhandsvisningen är pausad för att hålla redigeraren responsiv.","Show preview anyway":"Visa förhandsvisning ändå","HTML preview":"HTML-förhandsvisning","View mode":"Visningsläge","HTML file":"HTML-fil","XHTML file":"XHTML-fil","HTML Editor":"HTML-redigerare"},"sr":{},"ta":{},"tr":{},"ug":{},"uk":{"View mode":"Режим перегляду"},"zh":{"This file is large, so the live preview is paused to keep the editor responsive.":"这是大文件,因此暂停实时预览以保证编辑器的响应。","Show preview anyway":"不管如何显示预览","View mode":"查看模式"}}
|
||||
{"af":{},"ar":{},"bs":{},"bg":{},"ca":{"This file is large, so the live preview is paused to keep the editor responsive.":"Aquest fitxer és gran, per la qual cosa la previsualització en directe està en pausa per mantenir l'editor responsiu.","Show preview anyway":"Mostra la vista prèvia de totes maneres","HTML preview":"Vista prèvia d'HTML","View mode":"Mode de visualització","HTML file":"Fitxer HTML","XHTML file":"Fitxer XHTML","HTML Editor":"Editor HTML"},"cs":{},"de":{"This file is large, so the live preview is paused to keep the editor responsive.":"Aufgrund der Dateigröße wurde die Live-Vorschau pausiert, um den Editor benutzbar zu halten.","Show preview anyway":"Zeige Vorschau trotzdem","HTML preview":"HTML Vorschau","View mode":"Anzeigemodus","HTML file":"HTML-Datei","XHTML file":"XHTML-Datei","HTML Editor":"HTML Editor"},"el":{},"es":{"This file is large, so the live preview is paused to keep the editor responsive.":"Este archivo es muy grande, por lo que la vista previa en tiempo real se ha pausado para que el editor siga respondiendo con rapidez.","Show preview anyway":"Mostrar vista previa de todos modos","HTML preview":"Vista previa en HTML","View mode":"Mode de visualització","HTML file":"Archivo HTML","XHTML file":"Archivo XHTML","HTML Editor":"Editor HTML"},"et":{},"fr":{},"gl":{},"he":{},"hr":{},"id":{},"it":{},"ja":{"View mode":"表示モード"},"nl":{},"pl":{},"ka":{},"pt":{},"ko":{},"ro":{"This file is large, so the live preview is paused to keep the editor responsive.":"Fișierul este mare, astfel că previzualizarea directă este intreruptă pentru a păstra editorul responsiv.","Show preview anyway":"Arată previzualizarea indiferent","View mode":"Mod vizualizare."},"si":{},"ru":{"This file is large, so the live preview is paused to keep the editor responsive.":"Быстрое превью остановлено, чтобы редактор не повис, так как файл слишком велик.","Show preview anyway":"Всё равно показать превью","HTML preview":"Предпросмотр HTML ","View mode":"Режим просмотра","HTML file":"HTML-файл","XHTML file":"XHTML-файл","HTML Editor":"Редактор HTML"},"sk":{},"sq":{"This file is large, so the live preview is paused to keep the editor responsive.":"Kjo kartelë është e madhe, ndaj paraparja drejtpërdrejt është ndalur, për ta mbajtur përpunuesin reagues.","Show preview anyway":"Shfaq paraparjen, sido qoftë","HTML preview":"Paraparje HTML-je","View mode":"Mënyrë parjeje","HTML file":"Kartelë HTML","XHTML file":"Kartelë XHTML","HTML Editor":"Përpunues HTML-sh"},"sv":{"This file is large, so the live preview is paused to keep the editor responsive.":"Filen är stor, så förhandsvisningen är pausad för att hålla redigeraren responsiv.","Show preview anyway":"Visa förhandsvisning ändå","HTML preview":"HTML-förhandsvisning","View mode":"Visningsläge","HTML file":"HTML-fil","XHTML file":"XHTML-fil","HTML Editor":"HTML-redigerare"},"sr":{},"ta":{},"tr":{},"uk":{"View mode":"Режим перегляду"},"ug":{},"zh":{"This file is large, so the live preview is paused to keep the editor responsive.":"这是大文件,因此暂停实时预览以保证编辑器的响应。","Show preview anyway":"不管如何显示预览","View mode":"查看模式"}}
|
||||
@@ -1 +1 @@
|
||||
{"af":{},"ar":{},"bs":{},"bg":{},"ca":{"This file is large, so the live preview is paused to keep the editor responsive.":"Aquest fitxer és gran, per la qual cosa la previsualització en directe està en pausa per mantenir l'editor responsiu.","Show preview anyway":"Mostra la vista prèvia de totes maneres","View mode":"Mode de visualització"},"cs":{},"de":{"This file is large, so the live preview is paused to keep the editor responsive.":"Aufgrund der Dateigröße wurde die Live-Vorschau pausiert, um den Editor benutzbar zu halten.","Show preview anyway":"Zeige Vorschau trotzdem","View mode":"Anzeigemodus"},"el":{},"es":{"This file is large, so the live preview is paused to keep the editor responsive.":"Este archivo es muy grande, por lo que la vista previa en tiempo real se ha pausado para que el editor siga respondiendo con rapidez.","Show preview anyway":"Mostrar vista previa de todos modos","Mermaid diagram source":"Fuente del diagrama de Mermaid","This diagram could not be rendered. Check the syntax.":"No se ha podido generar este diagrama. Compruebe la sintaxis.","View mode":"Modo de visualización","Mermaid diagram":"Diagrama de Mermaid","Mermaid Editor":"Editor Mermaid"},"et":{},"fr":{},"gl":{},"he":{},"hr":{},"id":{},"it":{},"ja":{"View mode":"表示モード"},"nl":{},"pt":{},"ka":{},"pl":{},"ko":{},"ro":{"This file is large, so the live preview is paused to keep the editor responsive.":"Fișierul este mare, astfel că previzualizarea directă este intreruptă pentru a păstra editorul responsiv.","Show preview anyway":"Arată previzualizarea indiferent","Mermaid diagram source":"Diagrama sursă a sirenei","This diagram could not be rendered. Check the syntax.":"Diagrama nu a putut fi randată. Verifică sintaxa.","View mode":"Mod vizualizare.","Mermaid diagram":"Diagrama sirenă.","Mermaid Editor":"Editor sirenă."},"ru":{"This file is large, so the live preview is paused to keep the editor responsive.":"Быстрое превью остановлено, чтобы редактор не повис, так как файл слишком велик.","Show preview anyway":"Всё равно показать превью","View mode":"Режим просмотра"},"si":{},"sk":{},"sq":{"This file is large, so the live preview is paused to keep the editor responsive.":"Kjo kartelë është e madhe, ndaj paraparja drejtpërdrejt është ndalur, për ta mbajtur përpunuesin reagues.","Show preview anyway":"Shfaq paraparjen, sido qoftë","View mode":"Mënyrë parjeje"},"sr":{},"sv":{"This file is large, so the live preview is paused to keep the editor responsive.":"Filen är stor, så förhandsvisningen är pausad för att hålla redigeraren responsiv.","Show preview anyway":"Visa förhandsvisning ändå","View mode":"Visningsläge"},"tr":{},"uk":{"View mode":"Режим перегляду"},"ug":{},"zh":{"This file is large, so the live preview is paused to keep the editor responsive.":"这是大文件,因此暂停实时预览以保证编辑器的响应。","Show preview anyway":"不管如何显示预览","Mermaid diagram source":"Mermaid图源","This diagram could not be rendered. Check the syntax.":"此图无法渲染。检查语法。","View mode":"查看模式","Mermaid diagram":"Mermaid图表","Mermaid Editor":"Mermaid编辑器"},"ta":{}}
|
||||
{"af":{},"ar":{},"bs":{},"bg":{},"ca":{"This file is large, so the live preview is paused to keep the editor responsive.":"Aquest fitxer és gran, per la qual cosa la previsualització en directe està en pausa per mantenir l'editor responsiu.","Show preview anyway":"Mostra la vista prèvia de totes maneres","View mode":"Mode de visualització"},"cs":{},"el":{},"de":{"This file is large, so the live preview is paused to keep the editor responsive.":"Aufgrund der Dateigröße wurde die Live-Vorschau pausiert, um den Editor benutzbar zu halten.","Show preview anyway":"Zeige Vorschau trotzdem","View mode":"Anzeigemodus"},"es":{"This file is large, so the live preview is paused to keep the editor responsive.":"Este archivo es muy grande, por lo que la vista previa en tiempo real se ha pausado para que el editor siga respondiendo con rapidez.","Show preview anyway":"Mostrar vista previa de todos modos","Mermaid diagram source":"Fuente del diagrama de Mermaid","This diagram could not be rendered. Check the syntax.":"No se ha podido generar este diagrama. Compruebe la sintaxis.","View mode":"Modo de visualización","Mermaid diagram":"Diagrama de Mermaid","Mermaid Editor":"Editor Mermaid"},"et":{},"fr":{},"gl":{},"he":{},"hr":{},"id":{},"it":{},"ja":{"View mode":"表示モード"},"nl":{},"pl":{},"pt":{},"ka":{},"ko":{},"ro":{"This file is large, so the live preview is paused to keep the editor responsive.":"Fișierul este mare, astfel că previzualizarea directă este intreruptă pentru a păstra editorul responsiv.","Show preview anyway":"Arată previzualizarea indiferent","Mermaid diagram source":"Diagrama sursă a sirenei","This diagram could not be rendered. Check the syntax.":"Diagrama nu a putut fi randată. Verifică sintaxa.","View mode":"Mod vizualizare.","Mermaid diagram":"Diagrama sirenă.","Mermaid Editor":"Editor sirenă."},"ru":{"This file is large, so the live preview is paused to keep the editor responsive.":"Быстрое превью остановлено, чтобы редактор не повис, так как файл слишком велик.","Show preview anyway":"Всё равно показать превью","View mode":"Режим просмотра"},"si":{},"sk":{},"sq":{"This file is large, so the live preview is paused to keep the editor responsive.":"Kjo kartelë është e madhe, ndaj paraparja drejtpërdrejt është ndalur, për ta mbajtur përpunuesin reagues.","Show preview anyway":"Shfaq paraparjen, sido qoftë","View mode":"Mënyrë parjeje"},"sr":{},"sv":{"This file is large, so the live preview is paused to keep the editor responsive.":"Filen är stor, så förhandsvisningen är pausad för att hålla redigeraren responsiv.","Show preview anyway":"Visa förhandsvisning ändå","View mode":"Visningsläge"},"ta":{},"tr":{},"uk":{"View mode":"Режим перегляду"},"ug":{},"zh":{"This file is large, so the live preview is paused to keep the editor responsive.":"这是大文件,因此暂停实时预览以保证编辑器的响应。","Show preview anyway":"不管如何显示预览","Mermaid diagram source":"Mermaid图源","This diagram could not be rendered. Check the syntax.":"此图无法渲染。检查语法。","View mode":"查看模式","Mermaid diagram":"Mermaid图表","Mermaid Editor":"Mermaid编辑器"}}
|
||||
@@ -1 +1 @@
|
||||
{"af":{"An error occurred":"Ein Fehler ist aufgetreten"},"ar":{"User":"مستخدم","Delete":"حذف","Email":"بريد إلكتروني","Actions":"إجراءات","Cancel":"إلغاء","Link":"رابط"},"bs":{},"bg":{"An error occurred":"Възникна грешка","User":"Потребител","Delete":"Изтриване","Email":"Имейл","Actions":"Действия","Cancel":"Отказ","Link":"Връзка"},"ca":{"An error occurred":"S'ha produït un error","Couldn't open remotely":"No s'ha pogut obrir remotament","Open remotely":"Obre remotament","ScienceMesh":"ScienceMesh","Invitations":"Invitacions","New federated connection":"Nova connexió federada","You can share with and recieve shares from %{user} now":"Ara pots compartir i rebre comparticions de %{user}","New federated connections":"Noves connexions federades","You can share with and receive shares from %{ connections } now":"Ara pots compartir i rebre comparticions de %{ connections }","Federated connections":"Connexions federades","Federated shares:":"Comparticions federades:","Federated shares with me":"Comparticions federades amb mi","with me":"amb mi","with others":"amb altres","You have no sharing connections":"No teniu connexions compartides","User":"Usuari","This is the remote user with whom the federation is set up and resources can be shared.":"Aquest és l'usuari remot amb qui es configura la federació i es poden compartir recursos.","Institution":"Institució","This URL represents the instance of the trusted partner.":"Aquest URL representa la instància del soci de confiança.","Delete":"Suprimeix","Email":"Correu electrònic","Actions":"Accions","Federated conections for mutual sharing. To share, go to \"Files\" app, select the resource click \"Share\" in the context menu and select account type \"federated\".":"Connexions federades per a l'intercanvi mutu. Per compartir, ves a l'aplicació \"Fitxers\", selecciona el recurs i fes clic a \"Compartir\" al menú contextual i selecciona el tipus de compte \"federat\".","Accept invitations":"Accepta les invitacions","Enter invite token":"Introduïu el token d'invitació","Institution:":"Institució:","invalid invite token":"el token d'invitació no és vàlid","Accept invitation":"Accepta la invitació","Once you accept the invitation, the inviter will be added to your connections.":"Un cop acceptis la invitació, el convidat s'afegirà a les teves connexions.","Accepting invitations":"Acceptant invitacions","Self-invitations are not permitted":"No es permeten les autoinvitacions","Error":"Error","Invite users to federate":"Convida els usuaris a federar-se","Generate invitation link that can be shared with one or more invitees":"Genera un enllaç d'invitació que es pot compartir amb un o més invitats","Generate invitation":"Genera una invitació","Generate new invitation":"Genera una invitació nova","Cancel":"Cancel·la","Generate":"Genera","Add a description (optional)":"Afegeix una descripció (opcional)","You have no invitation links":"No teniu enllaços d'invitació","Copy invite token":"Copia el token d'invitació","Link":"Enllaç","Copy invitation link":"Copia l'enllaç d'invitació","Invitation link":"Enllaç d'invitació","Invite token":"Token d'invitació","Description":"Descripció","Expires":"Expira","Create an invitation link and send it to the person you want to share with.":"Crea un enllaç d'invitació i envia'l a la persona amb qui vols compartir.","Success":"Èxit","New token has been created and copied to your clipboard. Send it to the invitee(s).":"S'ha creat un token nou i s'ha copiat al porta-retalls. Envia'l al(s) convidat(s).","Invition link copied":"Enllaç d'invitació copiat","Invitation link has been copied to your clipboard.":"S'ha copiat l'enllaç d'invitació al porta-retalls.","Invite token copied":"Token d'invitació copiat","Invite token has been copied to your clipboard.":"S'ha copiat el token d'invitació al porta-retalls.","An error occurred when generating the token":"S'ha produït un error en generar el token"},"cs":{"An error occurred":"Objevila se chyba","User":"Uživatel","Delete":"Odstranit","Email":"Email","Actions":"Akce","Cancel":"Zrušit","Link":"Odkaz"},"de":{"An error occurred":"Ein Fehler ist aufgetreten","Couldn't open remotely":"Fernzugriff fehlgeschlagen","Open remotely":"Fernzugriff","ScienceMesh":"Vernetzung","Invitations":"Einladungen","New federated connection":"Neue Verbindung","You can share with and recieve shares from %{user} now":"Sie können jetzt mit %{ user } Freigaben empfangen und erteilen","New federated connections":"Neue Verbindungen","You can share with and receive shares from %{ connections } now":"Sie können jetzt mit %{ connections } Freigaben empfangen und erteilen","Federated connections":"Vernetzungen","Federated shares:":"Externe Freigaben","Federated shares with me":"Mit mir geteilte Freigaben","with me":"mit mir","with others":"mit anderen","You have no sharing connections":"Keine VernetLine truncated
|
||||
{"af":{"An error occurred":"Ein Fehler ist aufgetreten"},"ar":{"User":"مستخدم","Delete":"حذف","Email":"بريد إلكتروني","Actions":"إجراءات","Cancel":"إلغاء","Link":"رابط"},"bs":{},"bg":{"An error occurred":"Възникна грешка","User":"Потребител","Delete":"Изтриване","Email":"Имейл","Actions":"Действия","Cancel":"Отказ","Link":"Връзка"},"ca":{"An error occurred":"S'ha produït un error","Couldn't open remotely":"No s'ha pogut obrir remotament","Open remotely":"Obre remotament","ScienceMesh":"ScienceMesh","Invitations":"Invitacions","New federated connection":"Nova connexió federada","You can share with and recieve shares from %{user} now":"Ara pots compartir i rebre comparticions de %{user}","New federated connections":"Noves connexions federades","You can share with and receive shares from %{ connections } now":"Ara pots compartir i rebre comparticions de %{ connections }","Federated connections":"Connexions federades","Federated shares:":"Comparticions federades:","Federated shares with me":"Comparticions federades amb mi","with me":"amb mi","with others":"amb altres","You have no sharing connections":"No teniu connexions compartides","User":"Usuari","This is the remote user with whom the federation is set up and resources can be shared.":"Aquest és l'usuari remot amb qui es configura la federació i es poden compartir recursos.","Institution":"Institució","This URL represents the instance of the trusted partner.":"Aquest URL representa la instància del soci de confiança.","Delete":"Suprimeix","Email":"Correu electrònic","Actions":"Accions","Federated conections for mutual sharing. To share, go to \"Files\" app, select the resource click \"Share\" in the context menu and select account type \"federated\".":"Connexions federades per a l'intercanvi mutu. Per compartir, ves a l'aplicació \"Fitxers\", selecciona el recurs i fes clic a \"Compartir\" al menú contextual i selecciona el tipus de compte \"federat\".","Accept invitations":"Accepta les invitacions","Enter invite token":"Introduïu el token d'invitació","Institution:":"Institució:","invalid invite token":"el token d'invitació no és vàlid","Accept invitation":"Accepta la invitació","Once you accept the invitation, the inviter will be added to your connections.":"Un cop acceptis la invitació, el convidat s'afegirà a les teves connexions.","Accepting invitations":"Acceptant invitacions","Self-invitations are not permitted":"No es permeten les autoinvitacions","Error":"Error","Invite users to federate":"Convida els usuaris a federar-se","Generate invitation link that can be shared with one or more invitees":"Genera un enllaç d'invitació que es pot compartir amb un o més invitats","Generate invitation":"Genera una invitació","Generate new invitation":"Genera una invitació nova","Cancel":"Cancel·la","Generate":"Genera","Add a description (optional)":"Afegeix una descripció (opcional)","You have no invitation links":"No teniu enllaços d'invitació","Copy invite token":"Copia el token d'invitació","Link":"Enllaç","Copy invitation link":"Copia l'enllaç d'invitació","Invitation link":"Enllaç d'invitació","Invite token":"Token d'invitació","Description":"Descripció","Expires":"Expira","Create an invitation link and send it to the person you want to share with.":"Crea un enllaç d'invitació i envia'l a la persona amb qui vols compartir.","Success":"Èxit","New token has been created and copied to your clipboard. Send it to the invitee(s).":"S'ha creat un token nou i s'ha copiat al porta-retalls. Envia'l al(s) convidat(s).","Invition link copied":"Enllaç d'invitació copiat","Invitation link has been copied to your clipboard.":"S'ha copiat l'enllaç d'invitació al porta-retalls.","Invite token copied":"Token d'invitació copiat","Invite token has been copied to your clipboard.":"S'ha copiat el token d'invitació al porta-retalls.","An error occurred when generating the token":"S'ha produït un error en generar el token"},"cs":{"An error occurred":"Objevila se chyba","User":"Uživatel","Delete":"Odstranit","Email":"Email","Actions":"Akce","Cancel":"Zrušit","Link":"Odkaz"},"de":{"An error occurred":"Ein Fehler ist aufgetreten","Couldn't open remotely":"Fernzugriff fehlgeschlagen","Open remotely":"Fernzugriff","ScienceMesh":"Vernetzung","Invitations":"Einladungen","New federated connection":"Neue Verbindung","You can share with and recieve shares from %{user} now":"Sie können jetzt mit %{ user } Freigaben empfangen und erteilen","New federated connections":"Neue Verbindungen","You can share with and receive shares from %{ connections } now":"Sie können jetzt mit %{ connections } Freigaben empfangen und erteilen","Federated connections":"Vernetzungen","Federated shares:":"Externe Freigaben","Federated shares with me":"Mit mir geteilte Freigaben","with me":"mit mir","with others":"mit anderen","You have no sharing connections":"Keine VernetLine truncated
|
||||
@@ -1 +1 @@
|
||||
{"ar":{"Folder name":"إسم الملف","Password":"كلمة المرور","Create":"أنشأ","Open folder":"افتح المجلد"},"af":{},"bs":{},"bg":{"Folder name":"Име на папка","Password":"Парола","Folder already exists":"Папката вече съществува","Failed to create folder":"Неуспех при създаването на папка","Create":"Създаване","Open folder":"Отваряне на папка"},"ca":{"Folder name":"Nom de la carpeta","Password":"Contrasenya","Folder already exists":"La carpeta ja existeix","Failed to create folder":"Error en crear la carpeta","Password Protected Folder":"Carpeta protegida amb contrasenya","The folder could not be created because the share link is invalid.":{"Error shown when creating a password-protected folder fails because the generated share link has an unexpected format.":"No s'ha pogut crear la carpeta perquè l'enllaç per compartir no és vàlid."},"Create a new password protected folder":"Crea una carpeta nova protegida amb contrasenya","Create":"Crear","This folder cannot be opened because the link it contains is invalid.":{"Error shown when opening a password-protected folder fails because the stored link has an unexpected format.":"No es pot obrir aquesta carpeta perquè l'enllaç que conté no és vàlid."},"This folder cannot be opened because the link it contains does not point to this server.":{"Error shown when opening a password-protected folder fails because the stored link points to a different server.":"No es pot obrir aquesta carpeta perquè l'enllaç que conté no apunta a aquest servidor."},"Close folder":"Tanca la carpeta","Open folder":"Obrir la carpeta","Password Protected Folders":"Carpetes protegides amb contrasenya"},"cs":{"Folder name":"Jméno složky","Password":"Heslo","Failed to create folder":"Nezdařilo se vytvořit složku","Create":"Vytvořit"},"de":{"Folder name":"Ordnername","Password":"Passwort","Folder already exists":"Der Ordner existiert bereits","Failed to create folder":"Fehler beim Erstellen des Ordners","Password Protected Folder":"Passwortgeschützer Ordner","Create a new password protected folder":"Einen neuen Passwortgeschützen Ordner erstellen","Create":"Erstellen","Close folder":"Ordner schließen","Open folder":"Ordner öffnen","Password Protected Folders":"Passwortgeschütze Ordner"},"el":{"Password":"Συνθηματικό","Create":"Δημιουργία"},"es":{"Folder name":"Nombre de carpeta","Password":"Contraseña","Folder already exists":"La carpeta ya existe","Failed to create folder":"Error al crear la carpeta","Password Protected Folder":"Carpeta protegida con contraseña","The folder could not be created because the share link is invalid.":{"Error shown when creating a password-protected folder fails because the generated share link has an unexpected format.":"No se ha podido crear la carpeta porque el enlace compartido no es válido."},"Create a new password protected folder":"Crear una nueva carpeta protegida con contraseña","Create":"Crear","This folder cannot be opened because the link it contains is invalid.":{"Error shown when opening a password-protected folder fails because the stored link has an unexpected format.":"No se puede abrir esta carpeta porque el enlace que contiene no es válido."},"This folder cannot be opened because the link it contains does not point to this server.":{"Error shown when opening a password-protected folder fails because the stored link points to a different server.":"No se puede abrir esta carpeta porque el enlace que contiene no apunta a este servidor."},"Close folder":"Cerrar carpeta","Open folder":"Abrir carpeta","Password Protected Folders":"Carpetas protegidas con contraseña"},"et":{},"fr":{"Folder name":"Nom de dossier","Password":"Mot de passe","Folder already exists":"Le dossier existe déjà","Failed to create folder":"Échec de création du dossier","Password Protected Folder":"Dossier protégé par mot de passe","Create a new password protected folder":"Créer un nouveau dossier protégé par mot de passe","Create":"Créer","Close folder":"Fermer le dossier","Open folder":"Ouvrir le dossier","Password Protected Folders":"Dossiers protégés par mot de passe"},"gl":{"Folder name":"Nome do cartafol","Password":"Contrasinal","Create":"Crear","Open folder":"Abrir cartafol"},"he":{"Folder name":"שם תיקייה","Password":"סיסמה:","Failed to create folder":"יצירת תיקייה נכשלה","Create":"יצירה","Open folder":"פתיחת תיקייה"},"hr":{},"id":{"Folder name":"Nama folder","Password":"Kata Sandi","Failed to create folder":"Gagal membuat folder","Password Protected Folder":"Folder dilindungi Kata Sandi","Create a new password protected folder":"Membuat baru folder terlindung kata sandi ","Create":"Buat","Close folder":"Tutup folder","Open folder":"Buka folder","Password Protected Folders":"Folder-folder dilindungi Kata Sandi"},"it":{"Password":"Password","Folder alreadyLine truncated
|
||||
{"af":{},"ar":{"Folder name":"إسم الملف","Password":"كلمة المرور","Create":"أنشأ","Open folder":"افتح المجلد"},"bs":{},"bg":{"Folder name":"Име на папка","Password":"Парола","Folder already exists":"Папката вече съществува","Failed to create folder":"Неуспех при създаването на папка","Create":"Създаване","Open folder":"Отваряне на папка"},"ca":{"Folder name":"Nom de la carpeta","Password":"Contrasenya","Folder already exists":"La carpeta ja existeix","Failed to create folder":"Error en crear la carpeta","Password Protected Folder":"Carpeta protegida amb contrasenya","The folder could not be created because the share link is invalid.":{"Error shown when creating a password-protected folder fails because the generated share link has an unexpected format.":"No s'ha pogut crear la carpeta perquè l'enllaç per compartir no és vàlid."},"Create a new password protected folder":"Crea una carpeta nova protegida amb contrasenya","Create":"Crear","This folder cannot be opened because the link it contains is invalid.":{"Error shown when opening a password-protected folder fails because the stored link has an unexpected format.":"No es pot obrir aquesta carpeta perquè l'enllaç que conté no és vàlid."},"This folder cannot be opened because the link it contains does not point to this server.":{"Error shown when opening a password-protected folder fails because the stored link points to a different server.":"No es pot obrir aquesta carpeta perquè l'enllaç que conté no apunta a aquest servidor."},"Close folder":"Tanca la carpeta","Open folder":"Obrir la carpeta","Password Protected Folders":"Carpetes protegides amb contrasenya"},"cs":{"Folder name":"Jméno složky","Password":"Heslo","Failed to create folder":"Nezdařilo se vytvořit složku","Create":"Vytvořit"},"de":{"Folder name":"Ordnername","Password":"Passwort","Folder already exists":"Der Ordner existiert bereits","Failed to create folder":"Fehler beim Erstellen des Ordners","Password Protected Folder":"Passwortgeschützer Ordner","Create a new password protected folder":"Einen neuen Passwortgeschützen Ordner erstellen","Create":"Erstellen","Close folder":"Ordner schließen","Open folder":"Ordner öffnen","Password Protected Folders":"Passwortgeschütze Ordner"},"el":{"Password":"Συνθηματικό","Create":"Δημιουργία"},"es":{"Folder name":"Nombre de carpeta","Password":"Contraseña","Folder already exists":"La carpeta ya existe","Failed to create folder":"Error al crear la carpeta","Password Protected Folder":"Carpeta protegida con contraseña","The folder could not be created because the share link is invalid.":{"Error shown when creating a password-protected folder fails because the generated share link has an unexpected format.":"No se ha podido crear la carpeta porque el enlace compartido no es válido."},"Create a new password protected folder":"Crear una nueva carpeta protegida con contraseña","Create":"Crear","This folder cannot be opened because the link it contains is invalid.":{"Error shown when opening a password-protected folder fails because the stored link has an unexpected format.":"No se puede abrir esta carpeta porque el enlace que contiene no es válido."},"This folder cannot be opened because the link it contains does not point to this server.":{"Error shown when opening a password-protected folder fails because the stored link points to a different server.":"No se puede abrir esta carpeta porque el enlace que contiene no apunta a este servidor."},"Close folder":"Cerrar carpeta","Open folder":"Abrir carpeta","Password Protected Folders":"Carpetas protegidas con contraseña"},"et":{},"fr":{"Folder name":"Nom de dossier","Password":"Mot de passe","Folder already exists":"Le dossier existe déjà","Failed to create folder":"Échec de création du dossier","Password Protected Folder":"Dossier protégé par mot de passe","Create a new password protected folder":"Créer un nouveau dossier protégé par mot de passe","Create":"Créer","Close folder":"Fermer le dossier","Open folder":"Ouvrir le dossier","Password Protected Folders":"Dossiers protégés par mot de passe"},"gl":{"Folder name":"Nome do cartafol","Password":"Contrasinal","Create":"Crear","Open folder":"Abrir cartafol"},"he":{"Folder name":"שם תיקייה","Password":"סיסמה:","Failed to create folder":"יצירת תיקייה נכשלה","Create":"יצירה","Open folder":"פתיחת תיקייה"},"hr":{},"id":{"Folder name":"Nama folder","Password":"Kata Sandi","Failed to create folder":"Gagal membuat folder","Password Protected Folder":"Folder dilindungi Kata Sandi","Create a new password protected folder":"Membuat baru folder terlindung kata sandi ","Create":"Buat","Close folder":"Tutup folder","Open folder":"Buka folder","Password Protected Folders":"Folder-folder dilindungi Kata Sandi"},"ja":{"Folder name":"フォルダ名","PassLine truncated
|
||||
Loaded 100 of 121 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user