Skip to content

Commit

Permalink
Merge branch 'v4.2' into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
bsinou committed May 9, 2023
2 parents b9f2b17 + 48e9340 commit 9972654
Show file tree
Hide file tree
Showing 4,235 changed files with 25,220 additions and 108,586 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
45 changes: 35 additions & 10 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,37 @@
# Changes between v4.1.2 and v4.1.3-alpha1
# Changes between v4.2.0-rc1 and v4.2.0-rc2

[See Full Changelog](https://github.com/pydio/cells/compare/v4.1.2...v4.1.3-alpha1)
[See Full Changelog](https://github.com/pydio/cells/compare/v4.2.0-rc1...v4.2.0-rc2)

- [#22212ab](https://github.com/pydio/cells/commit/22212abfc5b88f20e184f080a27bc2e2aee06075): Finally remove unused variable
- [#b318e17](https://github.com/pydio/cells/commit/b318e172303f6450dbcc103804113b6a60e9a158): Check presigned v4
- [#13ba122](https://github.com/pydio/cells/commit/13ba12233069c79f94b90b3303440686a260ab5b): remove unnecessary test
- [#a066ca3](https://github.com/pydio/cells/commit/a066ca3130571aa3945d2369ecaebc09f4363e9f): Change ctype detection rule, again
- [#9e83f27](https://github.com/pydio/cells/commit/9e83f271513eed566f8471aea0969906f067ee40): Next development cycle
- [#b049eb3](https://github.com/pydio/cells/commit/b049eb36f315409b968608215362572c8b11d252): Change ctype detection rule
- [#5be6170](https://github.com/pydio/cells/commit/5be6170d081bed0788590541c716a5767e245389): Change ctype detection rule
- [#259fbfd](https://github.com/pydio/cells/commit/259fbfdd1c909d32ae2dc366163bc027b6722b90): Change ctype detection from black to white-list
- [#c864883](https://github.com/pydio/cells/commit/c864883afbad3eec1c1845ff9fc38e4ed14de4d0): Change activities display in RailPanel, show Watch button in Public Link field.
- [#9d9be24](https://github.com/pydio/cells/commit/9d9be24f533137581d3eb42ac4fd783756941f09): Forgotten string + DE/FR translation
- [#709bab2](https://github.com/pydio/cells/commit/709bab2a8ec81cd77e4789f776faaa5c05831642): Forgotten string + DE/FR translation
- [#8f355c3](https://github.com/pydio/cells/commit/8f355c3cb5759598cf2f46ffdc00ec7ee00de171): Forgotten i18n string and display glitches
- [#49a2069](https://github.com/pydio/cells/commit/49a206923dceb8cfd99463b0ebbd53047f571b98): Ecxlude reserved slugs for specific agents
- [#95674e2](https://github.com/pydio/cells/commit/95674e2a825a51ad853af5a08c633879ca790f66): Check presigned v4
- [#b7f3d61](https://github.com/pydio/cells/commit/b7f3d6115f57ead5097ed201b68e71b81fd9cf4b): Change ctype detection from black to white-list
- [#92bf8ef](https://github.com/pydio/cells/commit/92bf8ef63efbd3ef217534e3d36333fbd6beaa29): Display glitches in Console + dark mode
- [#b0e73cf](https://github.com/pydio/cells/commit/b0e73cfb659107b9578b9efa9ac84caaf99c335c): Clear roles by default at user creation.
- [#dc49f87](https://github.com/pydio/cells/commit/dc49f878e5befe694e23d40047fdd5855efcdc71): Mod update again
- [#0dff1c8](https://github.com/pydio/cells/commit/0dff1c89c890d1749f84620a2187d752e4822ef6): DE/FR messages have been missed by first sync
- [#6972dbd](https://github.com/pydio/cells/commit/6972dbd500e6395b18d38f6bd3044609f5c381be): DE/FR messages have been missed by first sync
- [#e5823ca](https://github.com/pydio/cells/commit/e5823ca982afcdfdfe42e14815923b49e2f732f9): New message + DE/FR translations
- [#523f96a](https://github.com/pydio/cells/commit/523f96a9f923109c946848152d1abbf94eebb8a6): Mod update
- [#511e9f3](https://github.com/pydio/cells/commit/511e9f34c7fc2f44bdc386f1d0fe6a7100c5dadf): New message + DE/FR translations
- [#a68e517](https://github.com/pydio/cells/commit/a68e517897d27f6ce8ee4ac24f5e02fb96798892): Update PydioCoreActions
- [#2bd0038](https://github.com/pydio/cells/commit/2bd0038ffe861e8c32640ee8a53195accbc4441f): Rework Cell/Workspace Card and watcher
- [#4298194](https://github.com/pydio/cells/commit/4298194ba9132821c51c0f9c0eb46acec2956169): Fix meta "selection as steps" display
- [#e946090](https://github.com/pydio/cells/commit/e946090aeca57d07716d09fb176820f87d23392a): Fix left chevron 'parent folder' color
- [#eaa18a3](https://github.com/pydio/cells/commit/eaa18a3b7cdc6988e0ce9d43de15263cc4d72a42): Change mimefont to less shiny color
- [#a03280d](https://github.com/pydio/cells/commit/a03280d36eb4645c1716947970d10901d3014842): Remove error message and returning default value for non-parsable url
- [#37494da](https://github.com/pydio/cells/commit/37494da159fda6dad0686c0f653c90b7e7d4850f): Re-add DE/FR translation after merge
- [#2ca67f4](https://github.com/pydio/cells/commit/2ca67f473eb4fdbb7ce84421c061b368aaf7a097): Re-add DE/FR translation after merge
- [#34a8367](https://github.com/pydio/cells/commit/34a83677a2f503884d02aa1a15b3149b28339bc1): Merge remote-tracking branch 'origin/main'
- [#67a7aae](https://github.com/pydio/cells/commit/67a7aaeabec597d5ff4664e9eb9b03d77aa34e5c): Bump cells-sdk
- [#83f1cd7](https://github.com/pydio/cells/commit/83f1cd7496a155860b9f842d49d8597cc5b22875): Fix uploader popover glitch
- [#642655f](https://github.com/pydio/cells/commit/642655f50372aed678f204f9717e1f07deadf781): Temporary remove translations to avoid conflicts
- [#c1e827f](https://github.com/pydio/cells/commit/c1e827f293f54950ceb5a7be35c2250dfbbc4c42): Temporary remove translations to avoid conflicts
- [#b536f8a](https://github.com/pydio/cells/commit/b536f8a3bdcbd7aa5644a78f88ce38db7e758740): Fix glitches after legacy message removal
- [#e1eb881](https://github.com/pydio/cells/commit/e1eb8812120334b3bca61d0d2dffbaff7fede530): Fix glitches after legacy message removal
- [#cfb4817](https://github.com/pydio/cells/commit/cfb4817a9c83a07d7114b944657f4c2656d1f2ab): Unused code and i18n
- [#dc629af](https://github.com/pydio/cells/commit/dc629af80c824c22f0217fd7952f08a6fa64b7fd): DarkMode Recent Locations in Copy Dialog
- [#4769234](https://github.com/pydio/cells/commit/4769234d3363bd76280fb4ea23b5299cb8107722): Fix glitches in custom sharelink
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
DEV_VERSION=4.1.3-dev
DEV_VERSION=4.2.0-dev
ENV=env GOOS=linux
TODAY:=$(shell date -u +%Y-%m-%dT%H:%M:%S)
TIMESTAMP:=$(shell date -u +%Y%m%d%H%M%S)
Expand Down
4 changes: 2 additions & 2 deletions broker/activity/lang/box/de.all.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"other": "Auf {{.Object}} wurde von {{.Actor}} zugegriffen"
},
"Cell": {
"other": "Zelle"
"other": "Cell"
},
"CreatedBy": {
"other": "Erstellt von {{.Actor}}"
Expand Down Expand Up @@ -81,6 +81,6 @@
"other": "{{.Object}} verschoben von {{.Actor}}"
},
"Workspace": {
"other": "Arbeitsplatz"
"other": "Workspace"
}
}
6 changes: 3 additions & 3 deletions broker/mailer/lang/box/fr-ca.all.json
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@
"other": "Adresse d'expédition utilisée par défaut lors de l'envoi de mail. Utilisez un mail de support réel plutôt qu'un \"no-reply\"."
},
"Mail.Config.FixOutlookDisplay": {
"other": "Outlook Clients Fix (disable CSS inlining)"
"other": "Fix pour MS Outlook (désactiver CSS)"
},
"Mail.Config.Queue.Label": {
"other": "File d'attente"
Expand Down Expand Up @@ -204,10 +204,10 @@
"other": "Mot de passe de l'utilisateur pour se connecter au serveur SMTP"
},
"Mail.Config.Smtp.Security.Label": {
"other": "Connection Security"
"other": "Sécurité de la connexion"
},
"Mail.Config.Smtp.Security.Description": {
"other": "Protocol used for securing connection. Clear is not supported, if required use a custom Sendmail instead."
"other": "Le protocole utilisé pour sécuriser la connexion. Si une connexion en clair est requise, utilisez plutôt un Sendmail personnalisé."
},
"Mail.Config.Smtp.SkipVerify.Label": {
"other": "Certificat auto-signé"
Expand Down
105 changes: 105 additions & 0 deletions cmd/admin-clean-acls.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
/*
* Copyright (c) 2019-2021. Abstrium SAS <team (at) pydio.com>
* This file is part of Pydio Cells.
*
* Pydio Cells is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Pydio Cells is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Pydio Cells. If not, see <http://www.gnu.org/licenses/>.
*
* The latest code can be found at <https://pydio.com>.
*/

package cmd

import (
"fmt"
"github.com/pydio/cells/v4/common/proto/idm"
"os"
"strconv"
"time"

"github.com/pydio/cells/v4/common/client/grpc"
"github.com/spf13/cobra"

"github.com/pydio/cells/v4/common"
)

var (
cleanAclAfter string
cleanAclBefore string
)

var dataCleanACLsCmd = &cobra.Command{
Use: "acls",
Short: "Clean Expired ACLs",
Long: `
DESCRIPTION
When deleted after a node deletion, ACLs are not really deleted but only expired, to be able to restore them
if necessary. This can lead to keep unused data, and particularly shared links information that may prevent users to
re-use an existing custom link value. Use this command to definitely delete expired ACLs based on a period.
Parameters accept either timestamps or durations. In the later case, corresponding time is computed using "Now - Duration".
EXAMPLES
Clean all ACLs expired before last 24h
$ ` + os.Args[0] + ` clean admin acls --before 24h
`,
Run: func(cmd *cobra.Command, args []string) {
if cleanAclAfter == "" && cleanAclBefore == "" {
cmd.Println("Please provide at least one of --after | --before")
cmd.Help()
return
}

req := &idm.DeleteACLRequest{}
if ea, err := strconv.ParseInt(cleanAclAfter, 10, 64); err == nil && ea > 0 {
req.ExpiredAfter = ea
} else if d, er := time.ParseDuration(cleanAclAfter); er == nil {
req.ExpiredAfter = time.Now().Add(-d).Unix()
}
if eb, err := strconv.ParseInt(cleanAclBefore, 10, 64); err == nil && eb > 0 {
req.ExpiredBefore = eb
} else if d, er := time.ParseDuration(cleanAclBefore); er == nil {
req.ExpiredBefore = time.Now().Add(-d).Unix()
}

if req.ExpiredAfter == 0 && req.ExpiredBefore == 0 {
cmd.Println("[ERROR] please provide at least one valid parameter")
cmd.Help()
return
}

aclClient := idm.NewACLServiceClient(grpc.GetClientConnFromCtx(ctx, common.ServiceAcl))
resp, e := aclClient.DeleteACL(ctx, req)
if e != nil {
cmd.Println("[ERROR] " + e.Error())
cmd.Help()
return
}
if resp.GetRowsDeleted() > 0 {

cmd.Println(fmt.Sprintf("Definitely deleted %d ACLs (period %v-%v)", resp.GetRowsDeleted(), time.Unix(req.ExpiredAfter, 0), time.Unix(req.ExpiredBefore, 0)))
} else {
cmd.Println(fmt.Sprintf("Nothing to delete for period %v-%v", time.Unix(req.ExpiredAfter, 0), time.Unix(req.ExpiredBefore, 0)))
}
},
}

func init() {
dataCleanACLsCmd.PersistentFlags().StringVarP(&cleanAclAfter, "after", "a", "", "Expiration date is greater than...")
dataCleanACLsCmd.PersistentFlags().StringVarP(&cleanAclBefore, "before", "b", "240h", "Expiration date is lower than...")
CleanCmd.AddCommand(dataCleanACLsCmd)
}
43 changes: 43 additions & 0 deletions common/config/migrations/4.1.99.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/*
* Copyright (c) 2019-2022. Abstrium SAS <team (at) pydio.com>
* This file is part of Pydio Cells.
*
* Pydio Cells is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Pydio Cells is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Pydio Cells. If not, see <http://www.gnu.org/licenses/>.
*
* The latest code can be found at <https://pydio.com>.
*/

package migrations

import (
"github.com/hashicorp/go-version"

"github.com/pydio/cells/v4/common/utils/configx"
)

func init() {
v, _ := version.NewVersion("4.1.99")
add(v, getMigration(upgradeDefaultWebTheme))
}

// upgradeDefaultWebTheme change preset theme value to material
func upgradeDefaultWebTheme(conf configx.Values) error {

theme := conf.Val("frontend", "plugin", "gui.ajax", "GUI_THEME")
if theme.String() == "light" {
_ = theme.Set("mui3")
}

return nil
}
2 changes: 1 addition & 1 deletion common/dao/abstract.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ func (h *abstract) Name() string {
if u, e := url.Parse(su); e == nil {
su = u.Redacted()
} else {
fmt.Println("cannot parse dao url for naming", e.Error())
return "[non-parsable redacted url]"
}
return su
}
Expand Down
8 changes: 4 additions & 4 deletions common/etl/stores/cells/local/api_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -516,9 +516,9 @@ func (apiStore *ApiStore) createShareLink(ctx context.Context, ownerUser *idm.Us
var user *idm.User
var err error
aclClient := idm.NewACLServiceClient(grpc.GetClientConnFromCtx(apiStore.runtime, common.ServiceAcl))
shareClient := share.NewClient(apiStore.runtime)
shareClient := share.NewClient(apiStore.runtime, nil)

workspace, _, err = shareClient.GetOrCreateWorkspace(ctx, ownerUser, "", idm.WorkspaceScope_LINK, link.Label, link.Description, false)
workspace, _, err = shareClient.GetOrCreateWorkspace(ctx, ownerUser, "", idm.WorkspaceScope_LINK, link.Label, "", link.Description, false)
if err != nil {
return err
}
Expand Down Expand Up @@ -573,8 +573,8 @@ func (apiStore *ApiStore) createShareLink(ctx context.Context, ownerUser *idm.Us

func (apiStore *ApiStore) createCell(ctx context.Context, ownerUser *idm.User, cell *rest.Cell) error {

shareClient := share.NewClient(apiStore.runtime)
workspace, _, err := shareClient.GetOrCreateWorkspace(ctx, ownerUser, "", idm.WorkspaceScope_ROOM, cell.Label, cell.Description, false)
shareClient := share.NewClient(apiStore.runtime, nil)
workspace, _, err := shareClient.GetOrCreateWorkspace(ctx, ownerUser, "", idm.WorkspaceScope_ROOM, cell.Label, "", cell.Description, false)
if err != nil {
return err
}
Expand Down
16 changes: 13 additions & 3 deletions common/forms/field.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,24 @@ func (b *FormField) Serialize(T i18n.TranslateFunc) (params []*SerialFormParam)
if b.Default != nil {
switch b.Type {
case ParamHidden, ParamString, ParamTextarea, ParamSelect, ParamAutoComplete, ParamAutoCompleteTree:
defaultValue = b.Default.(string)
if s, ok := b.Default.(string); ok {
defaultValue = s
} else {
fmt.Println("[WARNING] Wrong Default Format, expected string, got", b.Default)
}
case ParamBool:
defaultValue = "false"
if b.Default.(bool) {
if bo, ok := b.Default.(bool); ok && bo {
defaultValue = "true"
} else {
fmt.Println("[WARNING] Wrong Default Format, expected bool, got", b.Default)
}
case ParamInteger:
defaultValue = fmt.Sprintf("%v", b.Default.(int))
if in, ok := b.Default.(int); ok {
defaultValue = fmt.Sprintf("%v", in)
} else {
fmt.Println("[WARNING] Wrong Default Format, expected integer, got", b.Default)
}
}
}

Expand Down
11 changes: 7 additions & 4 deletions common/naming.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ const (
MetaFlagChildrenCount = "ChildrenCount"
MetaFlagChildrenFolders = "ChildrenFolders"
MetaFlagChildrenFiles = "ChildrenFiles"
MetaFlagRecursiveCount = "RecursiveCount"
MetaFlagWorkspaceSkipRecycle = "ws_skip_recycle"
MetaFlagContentLock = "content_lock"
MetaFlagWorkspacesShares = "workspaces_shares"
Expand All @@ -226,8 +227,9 @@ const (
MetaFlagWorkspaceRepoDisplay = "repository_display"
MetaFlagWorkspaceEventId = "EventWorkspaceId"

IdmWsInternalHomepageID = "homepage"
IdmWsInternalSettingsID = "settings"
IdmWsInternalHomepageID = "homepage"
IdmWsInternalSettingsID = "settings"
IdmWsInternalDirectoryID = "directory"
)

var (
Expand All @@ -244,8 +246,9 @@ var (
}

IdmWsInternalReservedSlugs = map[string]string{
IdmWsInternalSettingsID: "settings",
IdmWsInternalHomepageID: "welcome",
IdmWsInternalSettingsID: "settings",
IdmWsInternalHomepageID: "welcome",
IdmWsInternalDirectoryID: "directory",
}
)

Expand Down
9 changes: 4 additions & 5 deletions common/nodes/ancestors.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,22 +134,21 @@ func BuildAncestorsList(ctx context.Context, treeClient tree.NodeProviderClient,
func storeParents(dirPath string, parents []*tree.Node) {
if len(parents) > 0 {
_ = getAncestorsParentsCache().Set(dirPath, parents)
//fmt.Println("Storing "+dirPath+" with ", len(parents), " nodes, first is ", parents[0].GetPath())
}
}

// BuildAncestorsListOrParent builds ancestors list when the node does not exist yet, by trying to find all existing parents.
func BuildAncestorsListOrParent(ctx context.Context, treeClient tree.NodeProviderClient, node *tree.Node) (parentUuids []*tree.Node, err error) {
parents, err := BuildAncestorsList(ctx, treeClient, node)
func BuildAncestorsListOrParent(ctx context.Context, treeClient tree.NodeProviderClient, node *tree.Node) (parents []*tree.Node, err error) {
parents, err = BuildAncestorsList(ctx, treeClient, node)
nodePathParts := strings.Split(node.Path, "/")
if err != nil && len(nodePathParts) > 1 {
// Try to list parent node right
parentNode := &tree.Node{}
parentNode.Path = strings.Join(nodePathParts[0:len(nodePathParts)-1], "/")
parents, err = BuildAncestorsListOrParent(ctx, treeClient, parentNode)
if err != nil {
return parents, err
return
}
}
return parents, nil
return
}
5 changes: 3 additions & 2 deletions common/nodes/compose/compose_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* The latest code can be found at <https://pydio.com>.
*/

package compose
package compose_test

import (
"context"
Expand All @@ -31,6 +31,7 @@ import (
"github.com/pydio/cells/v4/common/client/grpc"
"github.com/pydio/cells/v4/common/config/mock"
"github.com/pydio/cells/v4/common/nodes"
"github.com/pydio/cells/v4/common/nodes/compose"
nodescontext "github.com/pydio/cells/v4/common/nodes/context"
"github.com/pydio/cells/v4/common/nodes/models"
omock "github.com/pydio/cells/v4/common/nodes/objects/mock"
Expand Down Expand Up @@ -95,7 +96,7 @@ func TestPersonalResolution(t *testing.T) {
reg, _ := registry.OpenRegistry(ctx, "mem:///")
ctx = servicecontext.WithRegistry(ctx, reg)
ctx = nodescontext.WithSourcesPool(ctx, nodes.NewTestPool(ctx))
client := PathClient(ctx)
client := compose.PathClient(ctx)

Convey("Test personal file", t, func() {
user, e := permissions.SearchUniqueUser(ctx, "admin", "")
Expand Down
Loading

0 comments on commit 9972654

Please sign in to comment.