Compare commits
20
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
46b8d38e7c | ||
|
|
97a7fcb5f0 | ||
|
|
2078d5971b | ||
|
|
20b5e24eed | ||
|
|
e6c3458206 | ||
|
|
34ea1d4182 | ||
|
|
83c3651092 | ||
|
|
7b59ac8ed2 | ||
|
|
59e2345dda | ||
|
|
0e3d08d779 | ||
|
|
1e440f954c | ||
|
|
2296f4af0a | ||
|
|
489a98e61d | ||
|
|
c381e590f6 | ||
|
|
d5e6c4e14b | ||
|
|
a4dd1d6b64 | ||
|
|
bda6c89587 | ||
|
|
5408f4523f | ||
|
|
12b2fd0370 | ||
|
|
a51f90e2e7 |
No files matched your search
+29
-2
@@ -545,6 +545,7 @@ def cachePipeline(name, steps):
|
||||
"trigger": {
|
||||
"ref": [
|
||||
"refs/heads/master",
|
||||
"refs/heads/stable-*",
|
||||
"refs/tags/**",
|
||||
"refs/pull/**",
|
||||
],
|
||||
@@ -738,6 +739,7 @@ def testOcis(ctx):
|
||||
"trigger": {
|
||||
"ref": [
|
||||
"refs/heads/master",
|
||||
"refs/heads/stable-*",
|
||||
"refs/pull/**",
|
||||
],
|
||||
},
|
||||
@@ -770,6 +772,7 @@ def scanOcis(ctx):
|
||||
"trigger": {
|
||||
"ref": [
|
||||
"refs/heads/master",
|
||||
"refs/heads/stable-*",
|
||||
"refs/pull/**",
|
||||
],
|
||||
},
|
||||
@@ -795,6 +798,7 @@ def buildOcisBinaryForTesting(ctx):
|
||||
"trigger": {
|
||||
"ref": [
|
||||
"refs/heads/master",
|
||||
"refs/heads/stable-*",
|
||||
"refs/pull/**",
|
||||
],
|
||||
},
|
||||
@@ -882,6 +886,7 @@ def uploadScanResults(ctx):
|
||||
"trigger": {
|
||||
"ref": [
|
||||
"refs/heads/master",
|
||||
"refs/heads/stable-*",
|
||||
"refs/pull/**",
|
||||
],
|
||||
"status": [
|
||||
@@ -1025,6 +1030,7 @@ def codestyle(ctx):
|
||||
"trigger": {
|
||||
"ref": [
|
||||
"refs/heads/master",
|
||||
"refs/heads/stable-*",
|
||||
"refs/pull/**",
|
||||
],
|
||||
},
|
||||
@@ -1092,6 +1098,7 @@ def localApiTestPipeline(ctx):
|
||||
"trigger": {
|
||||
"ref": [
|
||||
"refs/heads/master",
|
||||
"refs/heads/stable-*",
|
||||
"refs/pull/**",
|
||||
],
|
||||
},
|
||||
@@ -1199,6 +1206,7 @@ def cs3ApiTests(ctx, storage):
|
||||
"trigger": {
|
||||
"ref": [
|
||||
"refs/heads/master",
|
||||
"refs/heads/stable-*",
|
||||
"refs/pull/**",
|
||||
],
|
||||
},
|
||||
@@ -1317,6 +1325,7 @@ def wopiValidatorTests(ctx, storage, wopiServerType):
|
||||
"trigger": {
|
||||
"ref": [
|
||||
"refs/heads/master",
|
||||
"refs/heads/stable-*",
|
||||
"refs/pull/**",
|
||||
],
|
||||
},
|
||||
@@ -1404,6 +1413,7 @@ def coreApiTestPipeline(ctx):
|
||||
"trigger": {
|
||||
"ref": [
|
||||
"refs/heads/master",
|
||||
"refs/heads/stable-*",
|
||||
"refs/pull/**",
|
||||
],
|
||||
},
|
||||
@@ -1434,6 +1444,7 @@ def e2eTestPipeline(ctx):
|
||||
e2e_trigger = {
|
||||
"ref": [
|
||||
"refs/heads/master",
|
||||
"refs/heads/stable-*",
|
||||
"refs/tags/**",
|
||||
"refs/pull/**",
|
||||
],
|
||||
@@ -1576,6 +1587,7 @@ def multiServiceE2ePipeline(ctx):
|
||||
e2e_trigger = {
|
||||
"ref": [
|
||||
"refs/heads/master",
|
||||
"refs/heads/stable-*",
|
||||
"refs/pull/**",
|
||||
],
|
||||
}
|
||||
@@ -1860,6 +1872,7 @@ def dockerRelease(ctx, arch, repo, build_type):
|
||||
"trigger": {
|
||||
"ref": [
|
||||
"refs/heads/master",
|
||||
"refs/heads/stable-*",
|
||||
"refs/tags/v*",
|
||||
"refs/pull/**",
|
||||
],
|
||||
@@ -1967,6 +1980,7 @@ def binaryRelease(ctx, arch, build_type, target, depends_on = []):
|
||||
"when": {
|
||||
"ref": [
|
||||
"refs/heads/master",
|
||||
"refs/heads/stable-*",
|
||||
"refs/tags/v*",
|
||||
],
|
||||
},
|
||||
@@ -1978,6 +1992,7 @@ def binaryRelease(ctx, arch, build_type, target, depends_on = []):
|
||||
"when": {
|
||||
"ref": [
|
||||
"refs/heads/master",
|
||||
"refs/heads/stable-*",
|
||||
"refs/tags/v*",
|
||||
],
|
||||
},
|
||||
@@ -2021,6 +2036,7 @@ def binaryRelease(ctx, arch, build_type, target, depends_on = []):
|
||||
"trigger": {
|
||||
"ref": [
|
||||
"refs/heads/master",
|
||||
"refs/heads/stable-*",
|
||||
"refs/tags/v*",
|
||||
"refs/pull/**",
|
||||
],
|
||||
@@ -2113,6 +2129,7 @@ def licenseCheck(ctx):
|
||||
"when": {
|
||||
"ref": [
|
||||
"refs/heads/master",
|
||||
"refs/heads/stable-*",
|
||||
"refs/tags/v*",
|
||||
],
|
||||
},
|
||||
@@ -2155,6 +2172,7 @@ def licenseCheck(ctx):
|
||||
"trigger": {
|
||||
"ref": [
|
||||
"refs/heads/master",
|
||||
"refs/heads/stable-*",
|
||||
"refs/tags/v*",
|
||||
"refs/pull/**",
|
||||
],
|
||||
@@ -2222,6 +2240,7 @@ def releaseDockerManifest(ctx, repo, build_type):
|
||||
"trigger": {
|
||||
"ref": [
|
||||
"refs/heads/master",
|
||||
"refs/heads/stable-*",
|
||||
"refs/tags/v*",
|
||||
],
|
||||
},
|
||||
@@ -2268,7 +2287,7 @@ def changelog():
|
||||
"push",
|
||||
],
|
||||
"message": "Automated changelog update [skip ci]",
|
||||
"branch": "master",
|
||||
"branch": "stable-7.2",
|
||||
"author_email": "devops@owncloud.com",
|
||||
"author_name": "ownClouders",
|
||||
"netrc_machine": "github.com",
|
||||
@@ -2291,6 +2310,7 @@ def changelog():
|
||||
"trigger": {
|
||||
"ref": [
|
||||
"refs/heads/master",
|
||||
"refs/heads/stable-*",
|
||||
"refs/pull/**",
|
||||
],
|
||||
"event": {
|
||||
@@ -2330,6 +2350,7 @@ def releaseDockerReadme(ctx, repo, build_type):
|
||||
"trigger": {
|
||||
"ref": [
|
||||
"refs/heads/master",
|
||||
"refs/heads/stable-*",
|
||||
"refs/tags/v*",
|
||||
],
|
||||
},
|
||||
@@ -2379,7 +2400,7 @@ def docs():
|
||||
},
|
||||
"pages_directory": "docs/hugo/content/",
|
||||
"copy_contents": "true",
|
||||
"target_branch": "docs",
|
||||
"target_branch": "docs-stable-7.2",
|
||||
"delete": "true",
|
||||
},
|
||||
"when": {
|
||||
@@ -2402,6 +2423,7 @@ def docs():
|
||||
"trigger": {
|
||||
"ref": [
|
||||
"refs/heads/master",
|
||||
"refs/heads/stable-*",
|
||||
"refs/pull/**",
|
||||
],
|
||||
},
|
||||
@@ -2471,6 +2493,7 @@ def notify(ctx):
|
||||
"trigger": {
|
||||
"ref": [
|
||||
"refs/heads/master",
|
||||
"refs/heads/stable-*",
|
||||
"refs/heads/release*",
|
||||
"refs/tags/**",
|
||||
],
|
||||
@@ -2814,6 +2837,7 @@ def deploy(ctx, config, rebuild):
|
||||
"trigger": {
|
||||
"ref": [
|
||||
"refs/heads/master",
|
||||
"refs/heads/stable-*",
|
||||
"refs/tags/v*",
|
||||
],
|
||||
},
|
||||
@@ -2940,6 +2964,7 @@ def uploadAPITestCoverageReport(ctx):
|
||||
"trigger": {
|
||||
"ref": [
|
||||
"refs/heads/master",
|
||||
"refs/heads/stable-*",
|
||||
],
|
||||
"status": [
|
||||
"success",
|
||||
@@ -2974,6 +2999,7 @@ def genericCachePurge(flush_path):
|
||||
"trigger": {
|
||||
"ref": [
|
||||
"refs/heads/master",
|
||||
"refs/heads/stable-*",
|
||||
"refs/pull/**",
|
||||
],
|
||||
"status": [
|
||||
@@ -3167,6 +3193,7 @@ def litmus(ctx, storage):
|
||||
"trigger": {
|
||||
"ref": [
|
||||
"refs/heads/master",
|
||||
"refs/heads/stable-*",
|
||||
"refs/pull/**",
|
||||
],
|
||||
},
|
||||
|
||||
+61
-22
@@ -1,6 +1,7 @@
|
||||
# Table of Contents
|
||||
|
||||
* [Changelog for unreleased](#changelog-for-unreleased-unreleased)
|
||||
* [Changelog for 7.2.0-rc.1](#changelog-for-720-rc1-2025-06-20)
|
||||
* [Changelog for 7.1.3](#changelog-for-713-2025-05-27)
|
||||
* [Changelog for 7.1.2](#changelog-for-712-2025-03-28)
|
||||
* [Changelog for 7.1.1](#changelog-for-711-2025-03-14)
|
||||
@@ -35,8 +36,8 @@
|
||||
* [Changelog for 3.0.0](#changelog-for-300-2023-06-06)
|
||||
* [Changelog for 2.0.0](#changelog-for-200-2022-11-30)
|
||||
* [Changelog for 1.20.0](#changelog-for-1200-2022-04-13)
|
||||
* [Changelog for 1.19.0](#changelog-for-1190-2022-03-29)
|
||||
* [Changelog for 1.19.1](#changelog-for-1191-2022-03-29)
|
||||
* [Changelog for 1.19.0](#changelog-for-1190-2022-03-29)
|
||||
* [Changelog for 1.18.0](#changelog-for-1180-2022-03-03)
|
||||
* [Changelog for 1.17.0](#changelog-for-1170-2022-02-16)
|
||||
* [Changelog for 1.16.0](#changelog-for-1160-2021-12-10)
|
||||
@@ -61,7 +62,45 @@
|
||||
|
||||
The following sections list the changes for unreleased.
|
||||
|
||||
[unreleased]: https://github.com/owncloud/ocis/compare/v7.1.3...master
|
||||
[unreleased]: https://github.com/owncloud/ocis/compare/v7.2.0-rc.1...master
|
||||
|
||||
## Summary
|
||||
|
||||
* Bugfix - Fix storage-users cli: [#11464](https://github.com/owncloud/ocis/pull/11464)
|
||||
* Bugfix - Fix the OCM role editor: [#11484](https://github.com/owncloud/ocis/pull/11484)
|
||||
* Bugfix - Clean up unified roles label: [#11494](https://github.com/owncloud/ocis/pull/11494)
|
||||
|
||||
## Details
|
||||
|
||||
* Bugfix - Fix storage-users cli: [#11464](https://github.com/owncloud/ocis/pull/11464)
|
||||
|
||||
Fix storage-users uploads --resume command.
|
||||
|
||||
https://github.com/owncloud/ocis/issues/11290
|
||||
https://github.com/owncloud/ocis/pull/11464
|
||||
|
||||
* Bugfix - Fix the OCM role editor: [#11484](https://github.com/owncloud/ocis/pull/11484)
|
||||
|
||||
Fix the issue when the watermark is visible to user with a viewer role in
|
||||
Collabora
|
||||
|
||||
https://github.com/owncloud/ocis/issues/11474
|
||||
https://github.com/owncloud/ocis/pull/11484
|
||||
|
||||
* Bugfix - Clean up unified roles label: [#11494](https://github.com/owncloud/ocis/pull/11494)
|
||||
|
||||
Clean up the unified roles label
|
||||
|
||||
https://github.com/owncloud/ocis/issues/11470
|
||||
https://github.com/owncloud/ocis/issues/11254
|
||||
https://github.com/owncloud/ocis/issues/10082
|
||||
https://github.com/owncloud/ocis/pull/11494
|
||||
|
||||
# Changelog for [7.2.0-rc.1] (2025-06-20)
|
||||
|
||||
The following sections list the changes for 7.2.0-rc.1.
|
||||
|
||||
[7.2.0-rc.1]: https://github.com/owncloud/ocis/compare/v7.1.3...v7.2.0-rc.1
|
||||
|
||||
## Summary
|
||||
|
||||
@@ -11720,7 +11759,7 @@ The following sections list the changes for 2.0.0.
|
||||
|
||||
The following sections list the changes for 1.20.0.
|
||||
|
||||
[1.20.0]: https://github.com/owncloud/ocis/compare/v1.19.0...v1.20.0
|
||||
[1.20.0]: https://github.com/owncloud/ocis/compare/v1.19.1...v1.20.0
|
||||
|
||||
## Summary
|
||||
|
||||
@@ -11894,11 +11933,29 @@ The following sections list the changes for 1.20.0.
|
||||
https://github.com/owncloud/ocis/pull/3509
|
||||
https://github.com/owncloud/web/releases/tag/v5.4.0
|
||||
|
||||
# Changelog for [1.19.1] (2022-03-29)
|
||||
|
||||
The following sections list the changes for 1.19.1.
|
||||
|
||||
[1.19.1]: https://github.com/owncloud/ocis/compare/v1.19.0...v1.19.1
|
||||
|
||||
## Summary
|
||||
|
||||
* Bugfix - Return correct special item urls: [#3419](https://github.com/owncloud/ocis/pull/3419)
|
||||
|
||||
## Details
|
||||
|
||||
* Bugfix - Return correct special item urls: [#3419](https://github.com/owncloud/ocis/pull/3419)
|
||||
|
||||
URLs for Special items (space image, readme) were broken.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/3419
|
||||
|
||||
# Changelog for [1.19.0] (2022-03-29)
|
||||
|
||||
The following sections list the changes for 1.19.0.
|
||||
|
||||
[1.19.0]: https://github.com/owncloud/ocis/compare/v1.19.1...v1.19.0
|
||||
[1.19.0]: https://github.com/owncloud/ocis/compare/v1.18.0...v1.19.0
|
||||
|
||||
## Summary
|
||||
|
||||
@@ -12072,24 +12129,6 @@ The following sections list the changes for 1.19.0.
|
||||
https://github.com/owncloud/ocis/pull/3375
|
||||
https://github.com/owncloud/web/releases/tag/v5.3.0
|
||||
|
||||
# Changelog for [1.19.1] (2022-03-29)
|
||||
|
||||
The following sections list the changes for 1.19.1.
|
||||
|
||||
[1.19.1]: https://github.com/owncloud/ocis/compare/v1.18.0...v1.19.1
|
||||
|
||||
## Summary
|
||||
|
||||
* Bugfix - Return correct special item urls: [#3419](https://github.com/owncloud/ocis/pull/3419)
|
||||
|
||||
## Details
|
||||
|
||||
* Bugfix - Return correct special item urls: [#3419](https://github.com/owncloud/ocis/pull/3419)
|
||||
|
||||
URLs for Special items (space image, readme) were broken.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/3419
|
||||
|
||||
# Changelog for [1.18.0] (2022-03-03)
|
||||
|
||||
The following sections list the changes for 1.18.0.
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
Bugfix: Fix storage-users cli
|
||||
|
||||
Fix storage-users uploads --resume command.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/11464
|
||||
https://github.com/owncloud/ocis/issues/11290
|
||||
@@ -0,0 +1,8 @@
|
||||
Bugfix: Clean up unified roles label
|
||||
|
||||
Clean up the unified roles label
|
||||
|
||||
https://github.com/owncloud/ocis/pull/11494
|
||||
https://github.com/owncloud/ocis/issues/11470
|
||||
https://github.com/owncloud/ocis/issues/11254
|
||||
https://github.com/owncloud/ocis/issues/10082
|
||||
@@ -0,0 +1,6 @@
|
||||
Bugfix: Fix the OCM role editor
|
||||
|
||||
Fix the issue when the watermark is visible to user with a viewer role in Collabora
|
||||
|
||||
https://github.com/owncloud/ocis/pull/11484
|
||||
https://github.com/owncloud/ocis/issues/11474
|
||||
@@ -20,7 +20,7 @@ services:
|
||||
condition: service_started
|
||||
collabora:
|
||||
condition: service_healthy
|
||||
command: ["ocis", "collaboration", "server"]
|
||||
command: ["collaboration", "server"]
|
||||
environment:
|
||||
COLLABORATION_GRPC_ADDR: 0.0.0.0:9301
|
||||
COLLABORATION_HTTP_ADDR: 0.0.0.0:9300
|
||||
|
||||
+5
-3
@@ -1,9 +1,11 @@
|
||||
---
|
||||
services:
|
||||
|
||||
collaboration-oo:
|
||||
command: [ "-c", "dlv --listen=:40002 --headless=true --continue --check-go-version=false --api-version=2 --accept-multiclient exec /usr/bin/ocis collaboration server" ]
|
||||
collaboration:
|
||||
entrypoint:
|
||||
- /bin/sh
|
||||
command: [ "-c", "dlv --listen=:40000 --headless=true --continue --check-go-version=false --api-version=2 --accept-multiclient exec /usr/bin/ocis collaboration server" ]
|
||||
environment:
|
||||
COLLABORATION_LOG_LEVEL: debug
|
||||
ports:
|
||||
- 40002:40002
|
||||
- 40002:40000
|
||||
File renamed without changes.
+3
-1
@@ -1,7 +1,9 @@
|
||||
---
|
||||
services:
|
||||
|
||||
collaboration:
|
||||
collaboration-oo:
|
||||
entrypoint:
|
||||
- /bin/sh
|
||||
command: [ "-c", "dlv --listen=:40000 --headless=true --continue --check-go-version=false --api-version=2 --accept-multiclient exec /usr/bin/ocis collaboration server" ]
|
||||
environment:
|
||||
COLLABORATION_LOG_LEVEL: debug
|
||||
@@ -15,7 +15,7 @@ services:
|
||||
condition: service_started
|
||||
onlyoffice:
|
||||
condition: service_healthy
|
||||
command: ["ocis", "collaboration", "server"]
|
||||
command: ["collaboration", "server"]
|
||||
environment:
|
||||
COLLABORATION_GRPC_ADDR: 0.0.0.0:9301
|
||||
COLLABORATION_HTTP_ADDR: 0.0.0.0:9300
|
||||
|
||||
@@ -56,7 +56,7 @@ services:
|
||||
# run ocis init to initialize a configuration file with random secrets
|
||||
# it will fail on subsequent runs, because the config file already exists
|
||||
# therefore we ignore the error and then start the ocis server
|
||||
command: ["-c", "ocis init || true; exec ocis server"]
|
||||
command: [ "-c", "ocis init || true; exec ocis server" ]
|
||||
environment:
|
||||
# Keycloak IDP specific configuration
|
||||
PROXY_AUTOPROVISION_ACCOUNTS: "true"
|
||||
|
||||
@@ -16,7 +16,7 @@ var (
|
||||
// LatestTag is the latest released version plus the dev meta version.
|
||||
// Will be overwritten by the release pipeline
|
||||
// Needs a manual change for every tagged release
|
||||
LatestTag = "7.2.0-rc.1"
|
||||
LatestTag = "7.2.0-rc.2"
|
||||
|
||||
// Date indicates the build date.
|
||||
// This has been removed, it looks like you can only replace static strings with recent go versions
|
||||
|
||||
@@ -1308,7 +1308,7 @@ func (f *FileConnector) CheckFileInfo(ctx context.Context) (*ConnectorResponse,
|
||||
infoMap[fileinfo.KeyDisableExport] = true // only for collabora
|
||||
infoMap[fileinfo.KeyDisableCopy] = true // only for collabora
|
||||
infoMap[fileinfo.KeyDisablePrint] = true
|
||||
if !isPublicShare {
|
||||
if !isPublicShare && wopiContext.ViewOnlyToken != "" {
|
||||
infoMap[fileinfo.KeyWatermarkText] = f.watermarkText(user) // only for collabora
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1983,6 +1983,78 @@ var _ = Describe("FileConnector", func() {
|
||||
cfg.App.Name = "Collabora"
|
||||
cfg.App.Product = "Collabora"
|
||||
|
||||
expectedFileInfo := &fileinfo.Collabora{
|
||||
OwnerID: "61616262636340637573746f6d496470", // hex of aabbcc@customIdp
|
||||
Size: int64(998877),
|
||||
BaseFileName: "test.txt",
|
||||
UserCanNotWriteRelative: false,
|
||||
DisableExport: true,
|
||||
DisableCopy: true,
|
||||
DisablePrint: true,
|
||||
UserID: hex.EncodeToString([]byte("aabbcc@example.com")),
|
||||
UserFriendlyName: "Pet Shaft",
|
||||
EnableOwnerTermination: true,
|
||||
WatermarkText: "",
|
||||
SupportsLocks: true,
|
||||
SupportsRename: true,
|
||||
UserCanRename: false,
|
||||
BreadcrumbDocName: "test.txt",
|
||||
PostMessageOrigin: "https://ocis.example.prv",
|
||||
}
|
||||
|
||||
response, err := fc.CheckFileInfo(ctx)
|
||||
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
Expect(response.Status).To(Equal(200))
|
||||
Expect(response.Body.(*fileinfo.Collabora)).To(Equal(expectedFileInfo))
|
||||
})
|
||||
It("Stat success secure view authenticated user", func() {
|
||||
// change view mode to view only
|
||||
wopiCtx.ViewMode = appproviderv1beta1.ViewMode_VIEW_MODE_VIEW_ONLY
|
||||
wopiCtx.ViewOnlyToken = "ABC123"
|
||||
|
||||
ctx := middleware.WopiContextToCtx(context.Background(), wopiCtx)
|
||||
u := &userv1beta1.User{
|
||||
Id: &userv1beta1.UserId{
|
||||
Idp: "example.com",
|
||||
OpaqueId: "aabbcc",
|
||||
Type: userv1beta1.UserType_USER_TYPE_PRIMARY,
|
||||
},
|
||||
DisplayName: "Pet Shaft",
|
||||
Mail: "shaft@example.com",
|
||||
}
|
||||
ctx = ctxpkg.ContextSetUser(ctx, u)
|
||||
|
||||
gatewayClient.On("Stat", mock.Anything, mock.Anything).Times(1).Return(&providerv1beta1.StatResponse{
|
||||
Status: status.NewOK(ctx),
|
||||
Info: &providerv1beta1.ResourceInfo{
|
||||
Owner: &userv1beta1.UserId{
|
||||
Idp: "customIdp",
|
||||
OpaqueId: "aabbcc",
|
||||
Type: userv1beta1.UserType_USER_TYPE_PRIMARY,
|
||||
},
|
||||
Size: uint64(998877),
|
||||
Mtime: &typesv1beta1.Timestamp{
|
||||
Seconds: uint64(16273849),
|
||||
},
|
||||
Path: "/path/to/test.txt",
|
||||
Id: &providerv1beta1.ResourceId{
|
||||
StorageId: "storageid",
|
||||
OpaqueId: "opaqueid",
|
||||
SpaceId: "spaceid",
|
||||
},
|
||||
ParentId: &providerv1beta1.ResourceId{
|
||||
StorageId: "storageid",
|
||||
OpaqueId: "parentopaqueid",
|
||||
SpaceId: "spaceid",
|
||||
},
|
||||
},
|
||||
}, nil)
|
||||
|
||||
// change wopi app provider
|
||||
cfg.App.Name = "Collabora"
|
||||
cfg.App.Product = "Collabora"
|
||||
|
||||
expectedFileInfo := &fileinfo.Collabora{
|
||||
OwnerID: "61616262636340637573746f6d496470", // hex of aabbcc@customIdp
|
||||
Size: int64(998877),
|
||||
|
||||
@@ -14,23 +14,6 @@ import (
|
||||
"github.com/owncloud/ocis/v2/services/graph/pkg/unifiedrole"
|
||||
)
|
||||
|
||||
var (
|
||||
unifiedRolesNames = map[string]string{
|
||||
unifiedrole.UnifiedRoleViewerID: "Viewer",
|
||||
unifiedrole.UnifiedRoleViewerListGrantsID: "ViewerListGrants",
|
||||
unifiedrole.UnifiedRoleSpaceViewerID: "SpaceViewer",
|
||||
unifiedrole.UnifiedRoleEditorID: "Editor",
|
||||
unifiedrole.UnifiedRoleEditorListGrantsID: "EditorListGrants",
|
||||
unifiedrole.UnifiedRoleSpaceEditorID: "SpaceEditor",
|
||||
unifiedrole.UnifiedRoleSpaceEditorWithoutVersionsID: "SpaceEditorWithoutVersions",
|
||||
unifiedrole.UnifiedRoleFileEditorID: "FileEditor",
|
||||
unifiedrole.UnifiedRoleFileEditorListGrantsID: "FileEditorListGrants",
|
||||
unifiedrole.UnifiedRoleEditorLiteID: "EditorLite",
|
||||
unifiedrole.UnifiedRoleManagerID: "SpaceManager",
|
||||
unifiedrole.UnifiedRoleSecureViewerID: "SecureViewer",
|
||||
}
|
||||
)
|
||||
|
||||
// UnifiedRoles bundles available commands for unified roles
|
||||
func UnifiedRoles(cfg *config.Config) cli.Commands {
|
||||
cmds := cli.Commands{
|
||||
@@ -58,7 +41,7 @@ func listUnifiedRoles(cfg *config.Config) *cli.Command {
|
||||
tbl.SetRowLine(true)
|
||||
tbl.SetAutoMergeCellsByColumnIndex([]int{0}) // rowspan should only affect the first column
|
||||
|
||||
headers := []string{"Name", "UID", "Enabled", "Description", "Condition", "Allowed resource actions"}
|
||||
headers := []string{"Label", "UID", "Enabled", "Description", "Condition", "Allowed resource actions"}
|
||||
tbl.SetHeader(headers)
|
||||
|
||||
for _, definition := range unifiedrole.GetRoles(unifiedrole.RoleFilterAll()) {
|
||||
@@ -66,7 +49,7 @@ func listUnifiedRoles(cfg *config.Config) *cli.Command {
|
||||
const disabled = "disabled"
|
||||
|
||||
rows := [][]string{
|
||||
{unifiedRolesNames[definition.GetId()], definition.GetId(), disabled, definition.GetDescription()},
|
||||
{unifiedrole.GetUnifiedRoleLabel(definition.GetId()), definition.GetId(), disabled, definition.GetDescription()},
|
||||
}
|
||||
if slices.Contains(cfg.UnifiedRoles.AvailableRoles, definition.GetId()) {
|
||||
rows[0][2] = enabled
|
||||
|
||||
@@ -193,6 +193,26 @@ var (
|
||||
// UnifiedRole FullDenial, Role DisplayName (resolves directly)
|
||||
_deniedUnifiedRoleDisplayName = l10n.Template("Cannot access")
|
||||
|
||||
// unifiedRoleLabel contains the mapping of unified role IDs to their labels.
|
||||
unifiedRoleLabel = map[string]string{
|
||||
UnifiedRoleViewerID: "Viewer",
|
||||
UnifiedRoleViewerListGrantsID: "ViewerListGrants",
|
||||
UnifiedRoleSpaceViewerID: "SpaceViewer",
|
||||
UnifiedRoleEditorID: "Editor",
|
||||
UnifiedRoleEditorListGrantsID: "EditorListGrants",
|
||||
UnifiedRoleEditorListGrantsWithVersionsID: "EditorListGrantsWithVersions",
|
||||
UnifiedRoleSpaceEditorID: "SpaceEditor",
|
||||
UnifiedRoleSpaceEditorWithoutVersionsID: "SpaceEditorWithoutVersions",
|
||||
UnifiedRoleSpaceEditorWithoutTrashbinID: "SpaceEditorWithoutTrashbin",
|
||||
UnifiedRoleFileEditorID: "FileEditor",
|
||||
UnifiedRoleFileEditorListGrantsID: "FileEditorListGrants",
|
||||
UnifiedRoleFileEditorListGrantsWithVersionsID: "FileEditorListGrantsWithVersions",
|
||||
UnifiedRoleEditorLiteID: "EditorLite",
|
||||
UnifiedRoleManagerID: "Manager",
|
||||
UnifiedRoleSecureViewerID: "SecureViewer",
|
||||
UnifiedRoleDeniedID: "Denied",
|
||||
}
|
||||
|
||||
// legacyNames contains the legacy role names.
|
||||
legacyNames = map[string]string{
|
||||
UnifiedRoleViewerID: conversions.RoleViewer,
|
||||
@@ -596,6 +616,11 @@ func GetRolesByPermissions(roleSet []*libregraph.UnifiedRoleDefinition, actions
|
||||
return weightRoles(roles, constraints, descending)
|
||||
}
|
||||
|
||||
// GetUnifiedRoleLabel returns the label for the provided unified role ID
|
||||
func GetUnifiedRoleLabel(unifiedRoleId string) string {
|
||||
return unifiedRoleLabel[unifiedRoleId]
|
||||
}
|
||||
|
||||
// GetLegacyRoleName returns the legacy role name for the provided role
|
||||
func GetLegacyRoleName(role libregraph.UnifiedRoleDefinition) string {
|
||||
return legacyNames[role.GetId()]
|
||||
|
||||
@@ -270,3 +270,32 @@ func TestGetAllowedResourceActions(t *testing.T) {
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestGetUnifiedRoleLabel(t *testing.T) {
|
||||
type args struct {
|
||||
unifiedRoleId string
|
||||
}
|
||||
tests := []struct {
|
||||
name string
|
||||
args args
|
||||
want string
|
||||
}{
|
||||
{
|
||||
name: "Empty",
|
||||
args: args{unifiedRoleId: ""},
|
||||
want: "",
|
||||
},
|
||||
{
|
||||
name: "Unknown",
|
||||
args: args{unifiedRoleId: "unknown"},
|
||||
want: "",
|
||||
},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
if got := unifiedrole.GetUnifiedRoleLabel(tt.args.unifiedRoleId); got != tt.want {
|
||||
t.Errorf("GetUnifiedRoleLabel() = %v, want %v", got, tt.want)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -131,7 +131,7 @@ func ListUploadSessions(cfg *config.Config) *cli.Command {
|
||||
}
|
||||
|
||||
var stream events.Stream
|
||||
if c.Bool("restart") {
|
||||
if c.Bool("restart") || c.Bool("resume") {
|
||||
stream, err = event.NewStream(cfg)
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Failed to create event stream: %v\n", err)
|
||||
|
||||
@@ -70,5 +70,5 @@ func TestService_Get(t *testing.T) {
|
||||
// brandingTheme
|
||||
assert.Equal(t, jsonData.Get("_branding").String(), "_branding")
|
||||
// themeDefaults
|
||||
assert.Equal(t, jsonData.Get("common.shareRoles."+unifiedrole.UnifiedRoleViewerID+".name").String(), "UnifiedRoleViewer")
|
||||
assert.Equal(t, jsonData.Get("common.shareRoles."+unifiedrole.UnifiedRoleViewerID+".label").String(), "Viewer")
|
||||
}
|
||||
@@ -18,67 +18,67 @@ var themeDefaults = KV{
|
||||
"common": KV{
|
||||
"shareRoles": KV{
|
||||
unifiedrole.UnifiedRoleViewerID: KV{
|
||||
"name": "UnifiedRoleViewer",
|
||||
"label": unifiedrole.GetUnifiedRoleLabel(unifiedrole.UnifiedRoleViewerID),
|
||||
"iconName": "eye",
|
||||
},
|
||||
unifiedrole.UnifiedRoleViewerListGrantsID: KV{
|
||||
"name": "UnifiedRoleViewerListGrants",
|
||||
"label": unifiedrole.GetUnifiedRoleLabel(unifiedrole.UnifiedRoleViewerListGrantsID),
|
||||
"iconName": "eye",
|
||||
},
|
||||
unifiedrole.UnifiedRoleSpaceViewerID: KV{
|
||||
"label": "UnifiedRoleSpaceViewer",
|
||||
"label": unifiedrole.GetUnifiedRoleLabel(unifiedrole.UnifiedRoleSpaceViewerID),
|
||||
"iconName": "eye",
|
||||
},
|
||||
unifiedrole.UnifiedRoleFileEditorID: KV{
|
||||
"label": "UnifiedRoleFileEditor",
|
||||
"label": unifiedrole.GetUnifiedRoleLabel(unifiedrole.UnifiedRoleFileEditorID),
|
||||
"iconName": "pencil",
|
||||
},
|
||||
unifiedrole.UnifiedRoleFileEditorListGrantsID: KV{
|
||||
"label": "UnifiedRoleFileEditorListGrants",
|
||||
"label": unifiedrole.GetUnifiedRoleLabel(unifiedrole.UnifiedRoleFileEditorListGrantsID),
|
||||
"iconName": "pencil",
|
||||
},
|
||||
unifiedrole.UnifiedRoleFileEditorListGrantsWithVersionsID: KV{
|
||||
"label": "UnifiedRoleFileEditorListGrantsWithVersions",
|
||||
"label": unifiedrole.GetUnifiedRoleLabel(unifiedrole.UnifiedRoleFileEditorListGrantsWithVersionsID),
|
||||
"iconName": "pencil",
|
||||
},
|
||||
unifiedrole.UnifiedRoleEditorID: KV{
|
||||
"label": "UnifiedRoleEditor",
|
||||
"label": unifiedrole.GetUnifiedRoleLabel(unifiedrole.UnifiedRoleEditorID),
|
||||
"iconName": "pencil",
|
||||
},
|
||||
unifiedrole.UnifiedRoleEditorListGrantsID: KV{
|
||||
"label": "UnifiedRoleEditorListGrants",
|
||||
"label": unifiedrole.GetUnifiedRoleLabel(unifiedrole.UnifiedRoleEditorListGrantsID),
|
||||
"iconName": "pencil",
|
||||
},
|
||||
unifiedrole.UnifiedRoleEditorListGrantsWithVersionsID: KV{
|
||||
"label": "UnifiedRoleEditorListGrantsWithVersions",
|
||||
"label": unifiedrole.GetUnifiedRoleLabel(unifiedrole.UnifiedRoleEditorListGrantsWithVersionsID),
|
||||
"iconName": "pencil",
|
||||
},
|
||||
unifiedrole.UnifiedRoleSpaceEditorID: KV{
|
||||
"label": "UnifiedRoleSpaceEditor",
|
||||
"label": unifiedrole.GetUnifiedRoleLabel(unifiedrole.UnifiedRoleSpaceEditorID),
|
||||
"iconName": "pencil",
|
||||
},
|
||||
unifiedrole.UnifiedRoleSpaceEditorWithoutVersionsID: KV{
|
||||
"label": "UnifiedRoleSpaceEditorWithoutVersions",
|
||||
"label": unifiedrole.GetUnifiedRoleLabel(unifiedrole.UnifiedRoleSpaceEditorWithoutVersionsID),
|
||||
"iconName": "pencil",
|
||||
},
|
||||
unifiedrole.UnifiedRoleSpaceEditorWithoutTrashbinID: KV{
|
||||
"label": "UnifiedRoleSpaceEditorWithoutTrashbin",
|
||||
"label": unifiedrole.GetUnifiedRoleLabel(unifiedrole.UnifiedRoleSpaceEditorWithoutTrashbinID),
|
||||
"iconName": "pencil",
|
||||
},
|
||||
unifiedrole.UnifiedRoleManagerID: KV{
|
||||
"label": "UnifiedRoleManager",
|
||||
"label": unifiedrole.GetUnifiedRoleLabel(unifiedrole.UnifiedRoleManagerID),
|
||||
"iconName": "user-star",
|
||||
},
|
||||
unifiedrole.UnifiedRoleEditorLiteID: KV{
|
||||
"label": "UnifiedRoleEditorLite",
|
||||
"label": unifiedrole.GetUnifiedRoleLabel(unifiedrole.UnifiedRoleEditorLiteID),
|
||||
"iconName": "upload",
|
||||
},
|
||||
unifiedrole.UnifiedRoleSecureViewerID: KV{
|
||||
"label": "UnifiedRoleSecureView",
|
||||
"label": unifiedrole.GetUnifiedRoleLabel(unifiedrole.UnifiedRoleSecureViewerID),
|
||||
"iconName": "shield",
|
||||
},
|
||||
unifiedrole.UnifiedRoleDeniedID: KV{
|
||||
"label": "UnifiedRoleFullDenial",
|
||||
"label": unifiedrole.GetUnifiedRoleLabel(unifiedrole.UnifiedRoleDeniedID),
|
||||
"iconName": "stop-circle",
|
||||
},
|
||||
},
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
sonar.projectKey=owncloud_ocis
|
||||
sonar.organization=owncloud-1
|
||||
sonar.projectName=ocis
|
||||
sonar.projectVersion=7.2.0
|
||||
sonar.projectVersion=7.2.0-rc.2
|
||||
sonar.host.url=https://sonarcloud.io
|
||||
|
||||
# =====================================================
|
||||
|
||||
@@ -393,9 +393,5 @@ The expected failures in this file are from features in the owncloud/ocis repo.
|
||||
|
||||
- [apiSharingNgDriveLinkShare/createInternalLinkShare.feature:339](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgDriveLinkShare/createInternalLinkShare.feature#L339)
|
||||
|
||||
#### [[CLI] Error while resuming an upload](https://github.com/owncloud/ocis/issues/11290)
|
||||
|
||||
- [cliCommands/uploadSessions.feature:162](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/cliCommands/uploadSessions.feature#L162)
|
||||
|
||||
Note: always have an empty line at the end of this file.
|
||||
The bash script that processes this file requires that the last line has a newline on the end.
|
||||
Reference in new issue
Block a user