Add sharePublicLinkAskOptionalPassword to Capabilities

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
This commit is contained in:
Kevin Ottens 2020-10-06 12:45:19 +02:00 committed by Kevin Ottens (Rebase PR Action)
parent d6f53d66f4
commit e356acbcee
2 changed files with 6 additions and 0 deletions

View file

@ -59,6 +59,11 @@ bool Capabilities::sharePublicLinkSupportsUploadOnly() const
return _capabilities["files_sharing"].toMap()["public"].toMap()["supports_upload_only"].toBool();
}
bool Capabilities::sharePublicLinkAskOptionalPassword() const
{
return _capabilities["files_sharing"].toMap()["public"].toMap()["password"].toMap()["askForOptionalPassword"].toBool();
}
bool Capabilities::sharePublicLinkEnforcePassword() const
{
return _capabilities["files_sharing"].toMap()["public"].toMap()["password"].toMap()["enforced"].toBool();

View file

@ -40,6 +40,7 @@ public:
bool sharePublicLink() const;
bool sharePublicLinkAllowUpload() const;
bool sharePublicLinkSupportsUploadOnly() const;
bool sharePublicLinkAskOptionalPassword() const;
bool sharePublicLinkEnforcePassword() const;
bool sharePublicLinkEnforceExpireDate() const;
int sharePublicLinkExpireDateDays() const;