From e73e760827ab30d1a559404d96f317f3d6cabe6a Mon Sep 17 00:00:00 2001 From: Roman Perekhod Date: Fri, 9 Jun 2023 18:30:44 +0200 Subject: [PATCH] changlog added --- changelog/unreleased/fix-groupname-validation.md | 6 ++++++ services/graph/pkg/service/v0/errorcode/errorcode.go | 1 + .../expected-failures-localAPI-on-OCIS-storage.md | 4 ---- 3 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 changelog/unreleased/fix-groupname-validation.md diff --git a/changelog/unreleased/fix-groupname-validation.md b/changelog/unreleased/fix-groupname-validation.md new file mode 100644 index 0000000000..2a07a098ad --- /dev/null +++ b/changelog/unreleased/fix-groupname-validation.md @@ -0,0 +1,6 @@ +Enhancement: Fix the groupname validation + +Fixed the ability to create a group with an empty name + +https://github.com/owncloud/ocis/pull/6490 +https://github.com/owncloud/ocis/issues/5050 diff --git a/services/graph/pkg/service/v0/errorcode/errorcode.go b/services/graph/pkg/service/v0/errorcode/errorcode.go index 09dfdfafcd..e15289f327 100644 --- a/services/graph/pkg/service/v0/errorcode/errorcode.go +++ b/services/graph/pkg/service/v0/errorcode/errorcode.go @@ -123,6 +123,7 @@ func (e Error) Error() string { return errorCodes[e.errorCode] } +// RenderError render the Graph Error based on a code or default one func RenderError(w http.ResponseWriter, r *http.Request, err error) { var errcode Error if errors.As(err, &errcode) { diff --git a/tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md b/tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md index 646b8aa710..39db040ef6 100644 --- a/tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md +++ b/tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md @@ -43,10 +43,6 @@ The expected failures in this file are from features in the owncloud/ocis repo. - [apiSpacesShares/shareUploadTUS.feature:219](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesShares/shareUploadTUS.feature#L219) - [apiSpacesShares/shareUploadTUS.feature:284](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesShares/shareUploadTUS.feature#L284) -### [Creating group with empty name returns status code 200](https://github.com/owncloud/ocis/issues/5050) - -- [apiGraph/createGroup.feature:48](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiGraph/createGroup.feature#L48) - ### [Settings service user can list other peoples assignments](https://github.com/owncloud/ocis/issues/5032) - [apiAccountsHashDifficulty/assignRole.feature:28](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiAccountsHashDifficulty/assignRole.feature#L28)