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

fix unrestricted quota #4363

Merged
merged 1 commit into from
Aug 8, 2022
Merged

fix unrestricted quota #4363

merged 1 commit into from
Aug 8, 2022

Conversation

micbar
Copy link
Contributor

@micbar micbar commented Aug 8, 2022

Description

Unrestricted quota should show up on the graphAPI

Related Issue

Motivation and Context

Make it possible for clients to process the response better.

How Has This Been Tested?

Example Request

curl -L -X PATCH "https://localhost:9200/graph/v1.0/drives/1284d238-aa92-42ce-bdc4-0b0000009157$03d2043d-3ee1-44e2-b0e8-482c89457897" \
-H "Authorization: Basic YWRtaW46YWRtaW4=" \
-H "Content-Type: application/json" \
--data-raw " {
     \"quota\": {
                \"total\": 0
        }
 }"

Response

{
    "description": "Elon Musk wants to fly to pluto too",
    "driveAlias": "project/mission-to-pluto",
    "driveType": "project",
    "id": "1284d238-aa92-42ce-bdc4-0b0000009157$03d2043d-3ee1-44e2-b0e8-482c89457897",
    "lastModifiedDateTime": "2022-08-08T19:18:54.916757584+02:00",
    "name": "Mission to Pluto",
    "owner": {
        "user": {
            "id": "03d2043d-3ee1-44e2-b0e8-482c89457897"
        }
    },
    "quota": {
        "remaining": 27473838080,
        "state": "normal",
        "total": 0,
        "used": 0
    },
    "root": {
        "eTag": "\"e233576a402a3384667e921abbe2744b\"",
        "id": "1284d238-aa92-42ce-bdc4-0b0000009157$03d2043d-3ee1-44e2-b0e8-482c89457897",
        "permissions": [
            {
                "grantedTo": [
                    {
                        "user": {
                            "id": "some-admin-user-id-0000-000000000000"
                        }
                    }
                ],
                "roles": [
                    "manager"
                ]
            }
        ],
        "webDavUrl": "https://localhost:9200/dav/spaces/1284d238-aa92-42ce-bdc4-0b0000009157$03d2043d-3ee1-44e2-b0e8-482c89457897"
    }
}

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests only (no source changes)

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:

@micbar micbar requested review from C0rby and AlexAndBear August 8, 2022 17:27
@micbar micbar self-assigned this Aug 8, 2022
@sonarqubecloud
Copy link

sonarqubecloud bot commented Aug 8, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@micbar micbar merged commit 0f4597d into master Aug 8, 2022
@delete-merged-branch delete-merged-branch bot deleted the fix-quota-unrestricted branch August 8, 2022 18:57
ownclouders pushed a commit that referenced this pull request Aug 8, 2022
Merge: e9d2c5b bb99035
Author: Michael Barz <mbarz@owncloud.com>
Date:   Mon Aug 8 20:57:44 2022 +0200

    Merge pull request #4363 from owncloud/fix-quota-unrestricted

    fix unrestricted quota
@micbar micbar mentioned this pull request Aug 11, 2022
26 tasks
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.

graph api drive quota should expunge total:0 if set so (unrestricted)
2 participants