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

[QA] tests to list item permissions with filters #10728

Open
1 of 14 tasks
saw-jan opened this issue Dec 4, 2024 · 1 comment
Open
1 of 14 tasks

[QA] tests to list item permissions with filters #10728

saw-jan opened this issue Dec 4, 2024 · 1 comment
Assignees
Labels

Comments

@saw-jan
Copy link
Member

saw-jan commented Dec 4, 2024

Ticket: #9745

# item permissions
GET /graph/v1beta1/drives/{driveid}/items/{itemid}/permissions?
# root permissions
GET /graph/v1beta1/drives/{driveid}/root/permissions?

Bugs

Test cases:

https://localhost:10200/graph/v1beta1/drives/storage-users-1%240466ebd3-28f1-48e3-9e75-d69dc0b3312b/root/permissions?%24filter=%40libre.graph.permissions.roles.allowedValues%2FrolePermissions%2Fany%28p%3Acontains%28p%2Fcondition%2C+%27%40Subject.UserType%3D%3D%22Federated%22%27%29%29&%24select=%40libre.graph.permissions.roles.allowedValues
-------------Response---------------------------
{
    "@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": 1,
            "description": "View and download.",
            "displayName": "Can view",
            "id": "a8d5fe5e-96e3-418d-825b-534dbdf22b99"
        },
        {
            "@libre.graph.weight": 2,
            "description": "View, download, upload, edit, add, delete including the history.",
            "displayName": "Can edit",
            "id": "58c63c02-1d89-4572-916a-870abc5a1b7d"
        },
        {
            "@libre.graph.weight": 3,
            "description": "View, download, upload, edit, add, delete and manage members.",
            "displayName": "Can manage",
            "id": "312c0871-5ef7-4b3a-85b6-0e4074c64049"
        }
    ],
    "value": [
        {
            "grantedToV2": {
                "user": {
                    "@libre.graph.userType": "Member",
                    "displayName": "Admin",
                    "id": "some-admin-user-id-0000-000000000000"
                }
            },
            "id": "u:some-admin-user-id-0000-000000000000",
            "roles": [
                "312c0871-5ef7-4b3a-85b6-0e4074c64049"
            ]
        }
    ]
}
@saw-jan
Copy link
Member Author

saw-jan commented Jan 3, 2025

@libre.graph.permissions.actions.allowedValues

might not be possible
See #9765 (comment)

...Note that this is the only supported filter expression. Federated sharing roles will be omitted from requests without this filter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants