Skip to content

introduce permissions to the driveItem#28

Merged
C0rby merged 1 commit intomainfrom
drive-permissions
Feb 2, 2022
Merged

introduce permissions to the driveItem#28
C0rby merged 1 commit intomainfrom
drive-permissions

Conversation

@C0rby
Copy link
Copy Markdown

@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 requested review from butonic, kobergj and micbar February 2, 2022 14:58
@C0rby C0rby self-assigned this Feb 2, 2022
type: array
items:
$ref: '#/components/schemas/identitySet'
roles:
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.

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

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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