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

Guest users are unable to save documents #4229

Open
elzody opened this issue Nov 14, 2024 · 0 comments
Open

Guest users are unable to save documents #4229

elzody opened this issue Nov 14, 2024 · 0 comments
Assignees
Labels
1. to develop Waiting for a developer

Comments

@elzody
Copy link
Contributor

elzody commented Nov 14, 2024

Describe the bug
When the guests app is enabled, a guest user is unable to edit and save an office document which has been shared to them. This is due to the default quota for guests being set to 0.

To Reproduce

  1. Download and enable the guests app
  2. Give guest users permission to use the richdocuments app
  3. Create a guest user
    OC_PASS=somepassword php occ guests:add --password-from-env --display-name "guest user" <created-by> [email protected]
  4. Create an office document (in my case a spreadsheet) and share it to the newly created guest user
  5. Open a new browser window and login as the guest user (the username is the email set for the user)
  6. Access the document shared to the guest user and make a few edits
  7. Try to save the document and see the error popups

Expected behavior
The expected behavior is that the share owner's quota is used rather than the guest user's quota. It makes sense for the guest quota to default to 0 for blocking file uploading, but for document editing it makes more sense to handle it differently. If you're sharing a document to a guest with editing permissions, you want them to be able to actually edit and save the document.

⚠️ Reproducible from master to stable28

Logs

Nextcloud log (data/nextcloud.log)

{
  "reqId": "ZDlS4hWmEp9X24wRvBjJ",
  "level": 3,
  "time": "2024-11-14T15:45:59+00:00",
  "remoteAddr": "172.20.0.1",
  "user": "--",
  "app": "richdocuments",
  "method": "POST",
  "url": "/index.php/apps/richdocuments/wopi/files/56_ocnnlnfpgb7y/contents?access_token=yUV9MvHSRPUTFhOpnONRNUHMVsi1dlUF&access_token_ttl=0",
  "message": "Not enough storage",
  "userAgent": "COOLWSD HTTP Agent 24.04.9.2",
  "version": "28.0.11.1",
  "exception": {
    "Exception": "Exception",
    "Message": "Not enough storage",
    "Code": 0,
    "Trace": [
      {
        "file": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 230,
        "function": "putFile",
        "class": "OCA\\Richdocuments\\Controller\\WopiController",
        "type": "->",
        "args": [
          "56",
          "yUV9MvHSRPUTFhOpnONRNUHMVsi1dlUF"
        ]
      },
      {
        "file": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 137,
        "function": "executeController",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->",
        "args": [
          [
            "OCA\\Richdocuments\\Controller\\WopiController"
          ],
          "putFile"
        ]
      },
      {
        "file": "/var/www/html/lib/private/AppFramework/App.php",
        "line": 184,
        "function": "dispatch",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->",
        "args": [
          [
            "OCA\\Richdocuments\\Controller\\WopiController"
          ],
          "putFile"
        ]
      },
      {
        "file": "/var/www/html/lib/private/Route/Router.php",
        "line": 315,
        "function": "main",
        "class": "OC\\AppFramework\\App",
        "type": "::",
        "args": [
          "OCA\\Richdocuments\\Controller\\WopiController",
          "putFile",
          [
            "OC\\AppFramework\\DependencyInjection\\DIContainer"
          ],
          [
            "56_ocnnlnfpgb7y",
            "richdocuments.wopi.putFile"
          ]
        ]
      },
      {
        "file": "/var/www/html/lib/base.php",
        "line": 1069,
        "function": "match",
        "class": "OC\\Route\\Router",
        "type": "->",
        "args": [
          "/apps/richdocuments/wopi/files/56_ocnnlnfpgb7y/contents"
        ]
      },
      {
        "file": "/var/www/html/index.php",
        "line": 39,
        "function": "handleRequest",
        "class": "OC",
        "type": "::",
        "args": []
      }
    ],
    "File": "/var/www/html/apps-extra/richdocuments/lib/Controller/WopiController.php",
    "Line": 525,
    "message": "Not enough storage",
    "exception": {},
    "CustomMessage": "Not enough storage"
  }
}
@elzody elzody added the 1. to develop Waiting for a developer label Nov 14, 2024
@elzody elzody self-assigned this Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop Waiting for a developer
Projects
None yet
Development

No branches or pull requests

1 participant