Skip to content

Guests cannot create public links#1521

Description

@LostinSpacetime

How to use GitHub

  • Please use the 馃憤 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Steps to reproduce

  1. Login as guest
  2. Open the share dialog
  3. Create a public link

Expected behaviour

A link should be created

Actual behaviour

Error: OCA\Guests\Service\InviteService::sendInvite(): Argument #2 ($guest) must be of type string, null given

The fix is rather simple. In Hooks.php change:

$shareWith = $share->getSharedWith();
$isGuest = $this->guestManager->isGuest($shareWith);

to:

$shareWith = $share->getSharedWith();
if ($shareWith === null) {
return;
}
$isGuest = $this->guestManager->isGuest($shareWith);

Metadata

Metadata

Assignees

No one assigned

    Labels

    0. Needs triagePending approval or rejection. This issue is pending approval.bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions