Skip to content

User with group-only access sometimes gets 404 when fetching a space by ID #3193

Closed

Description

@v-scharf

that is test fail in CI: apiSharingNg1/removeAccessToDrive.feature:145
I can reproduce it localy: create a feature file with many similar removeAccessToDrive.feature:145 scenarios

result: 
--- Failed scenarios:

    /Users/v.scharf/Work/opencloud/opencloud/tests/acceptance/features/apiSharingNg1/removeAccessToDrive1.feature:107 (on line 118)
    /Users/v.scharf/Work/opencloud/opencloud/tests/acceptance/features/apiSharingNg1/removeAccessToDrive1.feature:402 (on line 413)
    /Users/v.scharf/Work/opencloud/opencloud/tests/acceptance/features/apiSharingNg1/removeAccessToDrive1.feature:464 (on line 475)

32 scenarios (29 passed, 3 failed)
352 steps (343 passed, 3 failed, 6 skipped)
Scenario: user of a group cannot remove own group from project space if it is the last manager using root endpoint
    Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
    And group "group1" has been created
    And user "Brian" has been added to group "group1"
    And user "Alice" has created a space "NewSpace" with the default quota using the Graph API
    And user "Alice" has sent the following space share invitation:
      | space           | NewSpace |
      | sharee          | group1   |
      | shareType       | group    |
      | permissionsRole | Manager  |
    And user "Alice" has removed own access from space "NewSpace"
    When user "Brian" tries to remove own group access from space "NewSpace" using root endpoint of the Graph API
    Then the HTTP status code should be "403"
    And the user "Brian" should have a space called "NewSpace"

test log:

### And user "Alice" has removed own access from space "NewSpace"
		_______________________________________________________________________

		==> REQUEST [2026-07-29T10:24:01]
		GET /graph/v1.0/me
		X-Request-ID: apiSharingNg1/removeAccessToDrive.feature:145-155

		_______________________________________________________________________

		==> REQUEST [2026-07-29T10:24:01]
		GET /graph/v1beta1/drives/e0248786-201c-430c-bcf5-9aaa98748cf0$b36ae40d-c5d6-4173-b378-8c6e8f29732b/root/permissions
		X-Request-ID: apiSharingNg1/removeAccessToDrive.feature:145-155

		<== RESPONSE [2026-07-29T10:24:01]
		200 OK
		Transfer-Encoding: chunked
		<== RES BODY
		{"@libre.graph.permissions.actions.allowedValues":["libre.graph/driveItem/permissions/create","libre.graph/driveItem/children/create","libre.graph/driveItem/standard/delete","libre.graph/driveItem/path/read","libre.graph/driveItem/quota/read","libre.graph/driveItem/content/read","libre.graph/driveItem/upload/create","libre.graph/driveItem/permissions/read","libre.graph/driveItem/children/read","libre.graph/driveItem/versions/read","libre.graph/driveItem/deleted/read","libre.graph/driveItem/path/update","libre.graph/driveItem/permissions/delete","libre.graph/driveItem/deleted/delete","libre.graph/driveItem/versions/update","libre.graph/driveItem/deleted/update","libre.graph/driveItem/basic/read","libre.graph/driveItem/permissions/update","libre.graph/driveItem/permissions/deny"],"@libre.graph.permissions.roles.allowedValues":[{"@libre.graph.weight":40,"description":"View and download.","displayName":"Can view","id":"a8d5fe5e-96e3-418d-825b-534dbdf22b99"},{"@libre.graph.weight":90,"description":"View, download, upload, edit, add, delete including the history.","displayName":"Can edit","id":"58c63c02-1d89-4572-916a-870abc5a1b7d"},{"@libre.graph.weight":120,"description":"View, download, upload, edit, add, delete and manage members.","displayName":"Can manage","id":"312c0871-5ef7-4b3a-85b6-0e4074c64049"}],"value":[{"createdDateTime":"2026-07-29T10:24:01.513473565Z","grantedToV2":{"group":{"displayName":"group1","id":"e7cb1fa5-9b6f-49c2-83fe-01373f468206"}},"id":"e0248786-201c-430c-bcf5-9aaa98748cf0:b36ae40d-c5d6-4173-b378-8c6e8f29732b:8f2c5aff-d35e-4113-9607-44d524f3d57a","invitation":{"invitedBy":{"user":{"@libre.graph.userType":"Member","displayName":"Alice Hansen","id":"f4f865fa-565a-49e2-978d-59092d307e44"}}},"roles":["312c0871-5ef7-4b3a-85b6-0e4074c64049"]},{"createdDateTime":"2026-07-29T10:24:01.429058049Z","grantedToV2":{"user":{"@libre.graph.userType":"Member","displayName":"Alice Hansen","id":"f4f865fa-565a-49e2-978d-59092d307e44"}},"id":"e0248786-201c-430c-bcf5-9aaa98748cf0:b36ae40d-c5d6-4173-b378-8c6e8f29732b:7add1539-4f2b-4967-93ec-d955536283f3","invitation":{"invitedBy":{"user":{"@libre.graph.userType":"Member","displayName":"Alice Hansen","id":"f4f865fa-565a-49e2-978d-59092d307e44"}}},"roles":["312c0871-5ef7-4b3a-85b6-0e4074c64049"]}]}

		_______________________________________________________________________

		==> REQUEST [2026-07-29T10:24:01]
		GET /graph/v1.0/me
		X-Request-ID: apiSharingNg1/removeAccessToDrive.feature:145-155

		_______________________________________________________________________

		==> REQUEST [2026-07-29T10:24:01]
		DELETE /graph/v1beta1/drives/e0248786-201c-430c-bcf5-9aaa98748cf0$b36ae40d-c5d6-4173-b378-8c6e8f29732b/root/permissions/e0248786-201c-430c-bcf5-9aaa98748cf0:b36ae40d-c5d6-4173-b378-8c6e8f29732b:8f2c5aff-d35e-4113-9607-44d524f3d57a
		X-Request-ID: apiSharingNg1/removeAccessToDrive.feature:145-155

		<== RESPONSE [2026-07-29T10:24:01]
		204 No Content
		X-Xss-Protection: 1; mode=block

	### When user "Brian" tries to remove own group access from space "NewSpace" using root endpoint of the Graph API
		_______________________________________________________________________

		==> REQUEST [2026-07-29T10:24:01]
		GET /graph/v1.0/me
		X-Request-ID: apiSharingNg1/removeAccessToDrive.feature:145-156

		_______________________________________________________________________

		==> REQUEST [2026-07-29T10:24:01]
		GET /graph/v1beta1/drives/e0248786-201c-430c-bcf5-9aaa98748cf0$b36ae40d-c5d6-4173-b378-8c6e8f29732b/root/permissions
		X-Request-ID: apiSharingNg1/removeAccessToDrive.feature:145-156

		<== RESPONSE [2026-07-29T10:24:01]
		404 Not Found
		X-Xss-Protection: 1; mode=block
		<== RES BODY
		{"error":{"code":"itemNotFound","innererror":{"date":"2026-07-29T10:24:01Z","request-id":"apiSharingNg1/removeAccessToDrive.feature:145-156"},"message":"getting space"}}

		_______________________________________________________________________

		==> REQUEST [2026-07-29T10:24:02]
		GET /graph/v1.0/me
		X-Request-ID: apiSharingNg1/removeAccessToDrive.feature:145-156

		_______________________________________________________________________

		==> REQUEST [2026-07-29T10:24:02]
		GET /graph/v1beta1/drives/e0248786-201c-430c-bcf5-9aaa98748cf0$b36ae40d-c5d6-4173-b378-8c6e8f29732b/root/permissions
		X-Request-ID: apiSharingNg1/removeAccessToDrive.feature:145-156

		<== RESPONSE [2026-07-29T10:24:02]
		404 Not Found

server log:

{"level":"error","service":"storage-users","host.name":"eb4db87dbf06","pkg":"rgrpc","traceid":"de679e081b00cb373c421145937e6939","error":"error: not found: space b36ae40d-c5d6-4173-b378-8c6e8f29732b not found","status":{"code":6,"message":"not found when listing spaces","trace":"de679e081b00cb373c421145937e6939"},"filters":[{"type":2,"Term":{"Id":{"opaque_id":"e0248786-201c-430c-bcf5-9aaa98748cf0$b36ae40d-c5d6-4173-b378-8c6e8f29732b!b36ae40d-c5d6-4173-b378-8c6e8f29732b"}}},{"type":4,"Term":{"SpaceType":"+grant"}}],"time":"2026-07-29T10:24:01Z","message":"failed to list storage spaces"}
{"level":"error","service":"storage-users","host.name":"eb4db87dbf06","pkg":"rgrpc","traceid":"b5c3b163a56cbd362c95dd112da0e8cf","error":"error: not found: space b36ae40d-c5d6-4173-b378-8c6e8f29732b not found","status":{"code":6,"message":"not found when listing spaces","trace":"b5c3b163a56cbd362c95dd112da0e8cf"},"filters":[{"type":2,"Term":{"Id":{"opaque_id":"e0248786-201c-430c-bcf5-9aaa98748cf0$b36ae40d-c5d6-4173-b378-8c6e8f29732b!b36ae40d-c5d6-4173-b378-8c6e8f29732b"}}},{"type":4,"Term":{"SpaceType":"+grant"}}],"time":"2026-07-29T10:24:02Z","message":"failed to list storage spaces"}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions