diff --git a/services/graph/pkg/service/v0/graph_test.go b/services/graph/pkg/service/v0/graph_test.go index c065cb6aa81..1112dacb2bd 100644 --- a/services/graph/pkg/service/v0/graph_test.go +++ b/services/graph/pkg/service/v0/graph_test.go @@ -657,7 +657,7 @@ var _ = Describe("Graph", func() { err := json.Unmarshal(body, &libreError) Expect(err).To(Not(HaveOccurred())) Expect(libreError.Error.Message).To(Equal("permission denied")) - Expect(libreError.Error.Code).To(Equal(errorcode.NotAllowed.String())) + Expect(libreError.Error.Code).To(Equal(errorcode.AccessDenied.String())) }) It("grpc general error", func() { permissionService.On("GetPermissionByID", mock.Anything, mock.Anything).Return(&settingssvc.GetPermissionByIDResponse{ diff --git a/tests/acceptance/features/apiSpaces/changeSpaces.feature b/tests/acceptance/features/apiSpaces/changeSpaces.feature index f1b11e750f3..444bc4ca612 100644 --- a/tests/acceptance/features/apiSpaces/changeSpaces.feature +++ b/tests/acceptance/features/apiSpaces/changeSpaces.feature @@ -51,7 +51,7 @@ Feature: Change data of space Scenario Outline: user other than space manager role can't change the name of a Space via the Graph API When user "" changes the name of the "Project Jupiter" space to "Project Jupiter" - Then the HTTP status code should be "404" + Then the HTTP status code should be "403" Examples: | user | | Brian | @@ -90,7 +90,7 @@ Feature: Change data of space Scenario Outline: viewer and editor cannot change the description(subtitle) of a space via the Graph API When user "" changes the description of the "Project Jupiter" space to "The Death Star is a fictional mobile space station" - Then the HTTP status code should be "404" + Then the HTTP status code should be "403" Examples: | user | | Brian | @@ -335,7 +335,7 @@ Feature: Change data of space Given user "Alice" has created a folder ".space" in space "Project Jupiter" And user "Alice" has uploaded a file inside space "Project Jupiter" with content "" to ".space/someImageFile.jpg" When user "Bob" sets the file ".space/someImageFile.jpg" as a space image in a special section of the "Project Jupiter" space - Then the HTTP status code should be "404" + Then the HTTP status code should be "403" Scenario Outline: user set new readme file as description of the space via the graph API diff --git a/tests/acceptance/features/apiSpaces/disableAndDeleteSpaces.feature b/tests/acceptance/features/apiSpaces/disableAndDeleteSpaces.feature index 3fef82ab941..3a21ff0cb6c 100644 --- a/tests/acceptance/features/apiSpaces/disableAndDeleteSpaces.feature +++ b/tests/acceptance/features/apiSpaces/disableAndDeleteSpaces.feature @@ -125,7 +125,7 @@ Feature: Disabling and deleting space Given the administrator has assigned the role "" to user "Carol" using the Graph API And user "Alice" has disabled a space "Project Moon" When user "Carol" tries to delete a space "Project Moon" owned by user "Alice" - Then the HTTP status code should be "404" + Then the HTTP status code should be "403" Examples: | user-role | | User | @@ -134,7 +134,7 @@ Feature: Disabling and deleting space Scenario Outline: viewer and space editor cannot disable space When user "" tries to disable a space "Project Moon" owned by user "Alice" - Then the HTTP status code should be "404" + Then the HTTP status code should be "403" And the user "" should have a space called "Project Moon" Examples: | user | @@ -145,7 +145,7 @@ Feature: Disabling and deleting space Scenario Outline: viewer and space editor cannot delete disabled space Given user "Alice" has disabled a space "Project Moon" When user "" tries to delete a space "Project Moon" owned by user "Alice" - Then the HTTP status code should be "404" + Then the HTTP status code should be "403" Examples: | user | | Brian | diff --git a/tests/acceptance/features/apiSpaces/spaceManagement.feature b/tests/acceptance/features/apiSpaces/spaceManagement.feature index 3ba134bf31b..82ba9cc9004 100644 --- a/tests/acceptance/features/apiSpaces/spaceManagement.feature +++ b/tests/acceptance/features/apiSpaces/spaceManagement.feature @@ -109,7 +109,7 @@ Feature: Space management Scenario: user without space admin permission tries to change the name of the project space When user "Carol" tries to change the name of the "Project" space to "New Name" owned by user "Alice" - Then the HTTP status code should be "404" + Then the HTTP status code should be "403" And the user "Alice" should have a space called "Project" @@ -136,7 +136,7 @@ Feature: Space management Scenario: user without space admin permission tries to change the description of the project space Given user "Alice" has changed the description of the "Project" space to "old description" When user "Carol" tries to change the description of the "Project" space to "New description" owned by user "Alice" - Then the HTTP status code should be "404" + Then the HTTP status code should be "403" Scenario: space admin user disables the project space @@ -152,7 +152,7 @@ Feature: Space management Scenario Outline: space admin user tries to disable the personal space When user "" disables a space "Alice Hansen" owned by user "Alice" - Then the HTTP status code should be "404" + Then the HTTP status code should be "403" Examples: | user | | Brian | @@ -169,7 +169,7 @@ Feature: Space management Scenario: user without space admin permission tries to delete the project space Given user "Alice" has disabled a space "Project" When user "Carol" tries to delete a space "Project" owned by user "Alice" - Then the HTTP status code should be "404" + Then the HTTP status code should be "403" Scenario: space admin user enables the project space