Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

introduce permissions to the driveItem #28

Merged
merged 1 commit into from
Feb 2, 2022
Merged

introduce permissions to the driveItem #28

merged 1 commit into from
Feb 2, 2022

Conversation

C0rby
Copy link

@C0rby C0rby commented Feb 2, 2022

Add permissions to the driveItem. The permissions attribute will contain the information of who has access to the drive.

@C0rby C0rby self-assigned this Feb 2, 2022
type: array
items:
$ref: '#/components/schemas/identitySet'
roles:
Copy link
Contributor

Choose a reason for hiding this comment

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

what would roles contain? A general list of all available roles?

Copy link
Author

@C0rby C0rby Feb 2, 2022

Choose a reason for hiding this comment

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

Here is how I implemented it right now:

{
            "driveType": "project",
            "id": "21b74206-a1ea-444e-8dbc-bc60a403bffe",
            "lastModifiedDateTime": "2022-02-01T14:22:09.992999279+01:00",
            "name": "Moon Project",
            "owner": {
                "user": {
                    "id": "ddc2004c-0977-11eb-9d3f-a793888cd0f8"
                }
            },
            "quota": {
                "remaining": 1000000000,
                "state": "normal",
                "total": 1000000000,
                "used": 0
            },
            "root": {
                "id": "21b74206-a1ea-444e-8dbc-bc60a403bffe",
                "permissions": [
                    {
                        "grantedTo": [
                            {
                                "user": {
                                    "id": "ddc2004c-0977-11eb-9d3f-a793888cd0f8"
                                }
                            }
                        ],
                        "roles": [
                            "manager"
                        ]
                    },
                    {
                        "grantedTo": [
                            {
                                "user": {
                                    "id": "4c510ada-c86b-4815-8820-42cdf82c3d51"
                                }
                            }
                        ],
                        "roles": [
                            "viewer"
                        ]
                    }
                ],
                "webDavUrl": "https://localhost:9200/dav/spaces/21b74206-a1ea-444e-8dbc-bc60a403bffe"
            }
        },

Roles currently is always a 1 element string array containing either manager, editor or viewer.
I just copied the structure from the ms graph api.

Copy link
Contributor

Choose a reason for hiding this comment

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

thanks, now i get it.

type: array
items:
$ref: '#/components/schemas/identitySet'
roles:
Copy link
Contributor

Choose a reason for hiding this comment

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

thanks, now i get it.

@C0rby C0rby merged commit a4eac15 into main Feb 2, 2022
@delete-merged-branch delete-merged-branch bot deleted the drive-permissions branch February 2, 2022 15:28
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