Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ require (
github.com/open-policy-agent/opa v1.15.2
github.com/opencloud-eu/icap-client v0.0.0-20250930132611-28a2afe62d89
github.com/opencloud-eu/libre-graph-api-go v1.0.8-0.20260310090739-853d972b282d
github.com/opencloud-eu/reva/v2 v2.46.3-0.20260610093751-a33d8108dd91
github.com/opencloud-eu/reva/v2 v2.46.5
github.com/opensearch-project/opensearch-go/v4 v4.6.0
github.com/orcaman/concurrent-map v1.0.0
github.com/pkg/errors v0.9.1
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -948,8 +948,8 @@ github.com/opencloud-eu/icap-client v0.0.0-20250930132611-28a2afe62d89 h1:W1ms+l
github.com/opencloud-eu/icap-client v0.0.0-20250930132611-28a2afe62d89/go.mod h1:vigJkNss1N2QEceCuNw/ullDehncuJNFB6mEnzfq9UI=
github.com/opencloud-eu/libre-graph-api-go v1.0.8-0.20260310090739-853d972b282d h1:JcqGDiyrcaQwVyV861TUyQgO7uEmsjkhfm7aQd84dOw=
github.com/opencloud-eu/libre-graph-api-go v1.0.8-0.20260310090739-853d972b282d/go.mod h1:pzatilMEHZFT3qV7C/X3MqOa3NlRQuYhlRhZTL+hN6Q=
github.com/opencloud-eu/reva/v2 v2.46.3-0.20260610093751-a33d8108dd91 h1:A/a0d9UNclpNBWGp2NUDWF+qO+U/u38EBH4CIk2dqIE=
github.com/opencloud-eu/reva/v2 v2.46.3-0.20260610093751-a33d8108dd91/go.mod h1:RoFQt+u7edxwzHr1IZ2Y6VaDinMiRPQupAvMBy3WVmE=
github.com/opencloud-eu/reva/v2 v2.46.5 h1:Zv3CUj//N8qalWEklQ5zJEPyPJvqDnT0gcqF47bUEso=
github.com/opencloud-eu/reva/v2 v2.46.5/go.mod h1:RoFQt+u7edxwzHr1IZ2Y6VaDinMiRPQupAvMBy3WVmE=
github.com/opencloud-eu/secure v0.0.0-20260312082735-b6f5cb2244e4 h1:l2oB/RctH+t8r7QBj5p8thfEHCM/jF35aAY3WQ3hADI=
github.com/opencloud-eu/secure v0.0.0-20260312082735-b6f5cb2244e4/go.mod h1:BmF5hyM6tXczk3MpQkFf1hpKSRqCyhqcbiQtiAF7+40=
github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=
Expand Down
2 changes: 1 addition & 1 deletion services/graph/pkg/service/v0/drives.go
Original file line number Diff line number Diff line change
Expand Up @@ -1119,7 +1119,7 @@ func (g Graph) DeleteDrive(w http.ResponseWriter, r *http.Request) {
return
case cs3rpc.Code_CODE_PERMISSION_DENIED:
logger.Debug().Interface("id", rid).Msg("could not delete drive: permission denied")
errorcode.ItemNotFound.Render(w, r, http.StatusNotFound, "drive not found")
errorcode.AccessDenied.Render(w, r, http.StatusForbidden, "permission denied")
return
case cs3rpc.Code_CODE_NOT_FOUND:
logger.Debug().Interface("id", rid).Msg("could not delete drive: drive not found")
Expand Down
30 changes: 15 additions & 15 deletions tests/acceptance/features/apiSpaces/disableAndDeleteSpaces.feature
Original file line number Diff line number Diff line change
Expand Up @@ -63,28 +63,28 @@ Feature: Disabling and deleting space
Scenario Outline: user cannot delete their own space without first disabling it
Given the administrator has assigned the role "<user-role>" to user "Alice" using the Graph API
When user "Alice" deletes a space "Project Moon"
Then the HTTP status code should be "400"
Then the HTTP status code should be "<code>"
And the user "Alice" should have a space called "Project Moon"
Examples:
| user-role |
| Admin |
| Space Admin |
| User |
| User Light |
| user-role | code |
| Admin | 400 |
| Space Admin | 400 |
| User | 403 |
| User Light | 403 |


Scenario Outline: user can delete their own disabled space via the Graph API
Scenario Outline: user cannot delete their own disabled space via the Graph API
Given the administrator has assigned the role "<user-role>" to user "Alice" using the Graph API
And user "Alice" has disabled a space "Project Moon"
When user "Alice" deletes a space "Project Moon"
Then the HTTP status code should be "204"
And the user "Alice" should not have a space called "Project Moon"
Then the HTTP status code should be "<code>"
And the user "Alice" <shouldOrNot> have a space called "Project Moon"
Examples:
| user-role |
| Admin |
| Space Admin |
| User |
| User Light |
| user-role | code | shouldOrNot |
| Admin | 204 | should not |
| Space Admin | 204 | should not |
| User | 403 | should |
| User Light | 403 | should |


Scenario Outline: an admin and space manager can disable other space via the Graph API
Expand Down Expand Up @@ -134,7 +134,7 @@ Feature: Disabling and deleting space

Scenario Outline: viewer and space editor cannot disable space
When user "<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 "<user>" should have a space called "Project Moon"
Examples:
| user |
Expand Down
11 changes: 7 additions & 4 deletions tests/acceptance/features/apiSpaces/spaceManagement.feature
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,14 @@ Feature: Space management

Scenario Outline: space admin user tries to disable the personal space
When user "<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 "<code>"
Examples:
| user |
| Brian |
| Carol |
| user | code |
# Brian is Space Admin and can currently list all Personal Spaces, so he
# gets a 403 instead of a 404 here. This might change in the future see:
# https://github.com/opencloud-eu/opencloud/issues/2979
| Brian | 403 |
| Carol | 404 |


Scenario: space admin user deletes the project space
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading