Skip to content

[full-ci] More work on spaces support for sharing-ng - #8682

Merged
rhafer merged 3 commits into
owncloud:masterfrom
rhafer:space-permission-id
Mar 25, 2024
Merged

rhafer merged 3 commits into
owncloud:masterfrom
rhafer:space-permission-id

Conversation

@rhafer

@rhafer rhafer commented Mar 18, 2024

Copy link
Copy Markdown
Contributor

To add a space member:

curl --request POST \
  --url 'https://localhost:9200/graph/v1beta1/drives/0ec6cef0-9cd6-46a5-83ae-d4085a5f8a07$ae158e91-cb8b-45e0-ac9a-44ff5f6887d3/items/0ec6cef0-9cd6-46a5-83ae-d4085a5f8a07$ae158e91-cb8b-45e0-ac9a-44ff5f6887d3!ae158e91-cb8b-45e0-ac9a-44ff5f6887d3/invite' \
  --data '{
  "recipients": [
    {
      "@libre.graph.recipient.type": "user",
      "objectId": "4c510ada-c86b-4815-8820-42cdf82c3d51"
    }
  ],
  "roles": [ <roleid> ]
}'

gives the response:

{
  "value": [
    {
      "grantedToV2": {
        "user": {
          "displayName": "Albert Einstein",
          "id": "4c510ada-c86b-4815-8820-42cdf82c3d51"
        }
      },
      "id": "u:4c510ada-c86b-4815-8820-42cdf82c3d51",
      "roles": [
        "a8d5fe5e-96e3-418d-825b-534dbdf22b99"
      ]
    }
  ]
}

To remove a permission:

curl --request DELETE \
  --url 'https://localhost:9200/graph/v1beta1/drives/0ec6cef0-9cd6-46a5-83ae-d4085a5f8a07$ae158e91-cb8b-45e0-ac9a-44ff5f6887d3/items/0ec6cef0-9cd6-46a5-83ae-d4085a5f8a07$ae158e91-cb8b-45e0-ac9a-44ff5f6887d3!ae158e91-cb8b-45e0-ac9a-44ff5f6887d3/permissions/u:4c510ada-c86b-4815-8820-42cdf82c3d51'

The permission-id (last part of the URL) can be taken from the GET https://localhost:9200/graph/v1beta1/drives/{{driveid}}/items/{{itemid}}/permissions response.

This needs: cs3org/reva#4585

@update-docs

update-docs Bot commented Mar 18, 2024

Copy link
Copy Markdown

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.

@rhafer
rhafer force-pushed the space-permission-id branch 3 times, most recently from 5dc3c19 to 2b3296d Compare March 20, 2024 16:02
@rhafer rhafer changed the title More work on spaces support for sharing-ng [full-ci]More work on spaces support for sharing-ng Mar 22, 2024
@rhafer rhafer changed the title [full-ci]More work on spaces support for sharing-ng [full-ci] More work on spaces support for sharing-ng Mar 22, 2024
@rhafer
rhafer force-pushed the space-permission-id branch 2 times, most recently from 8a7c43a to 7915cf5 Compare March 22, 2024 13:15
@rhafer

rhafer commented Mar 22, 2024

Copy link
Copy Markdown
Contributor Author

This needs: cs3org/reva#4585

I can't currently bump reva because, ocis will not build with current edge until #8701 is done.

However this PR should work with out the reva changes. It will just lack the check for having a least one space manager remaining when changing/delete permissions via graph.

@rhafer
rhafer marked this pull request as ready for review March 22, 2024 13:18
@kobergj

kobergj commented Mar 22, 2024

Copy link
Copy Markdown
Contributor

I can't currently bump reva because, ocis will not build with current edge until #8701 is done.

@rhafer why do you think this? edge builds with current master. Or you just linked the wrong PR? #8701 is not fixing anything.

@kobergj kobergj left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some details 👍

When inviting a user to a space we now generate permission ids (based on
the invited user's/group's id)
@rhafer

rhafer commented Mar 25, 2024

Copy link
Copy Markdown
Contributor Author

@rhafer why do you think this? edge builds with current master. Or you just linked the wrong PR? #8701 is not fixing anything.

IIRC it failed building against edge. Complained about some issues regarding initiatorIDs. I don't remember the exact details. And it works now so 🤷

@sonarqubecloud

Copy link
Copy Markdown

@rhafer
rhafer merged commit 352d60a into owncloud:master Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants