property bool backgroundsVisible: true
property bool canCreateLinkShares: true
- property bool canReshare: true
+ property bool serverAllowsResharing: true
readonly property bool isLinkShare: model.shareType === ShareModel.ShareTypeLink
readonly property bool isPlaceholderLinkShare: model.shareType === ShareModel.ShareTypePlaceholderLink
shareModelData: model
canCreateLinkShares: root.canCreateLinkShares
- canReshare: root.canReshare
+ serverAllowsResharing: root.serverAllowsResharing
onCloseShareDetails: root.rootStackView.pop(root.rootStackView.initialItem, StackView.PopTransition)
property var shareModelData: ({})
property bool canCreateLinkShares: true
- property bool canReshare: true
+ property bool serverAllowsResharing: true
readonly property var share: shareModelData.share ?? ({})
checkable: true
checked: root.resharingAllowed
text: qsTr("Allow resharing")
- enabled: !root.isSharePermissionChangeInProgress && root.canReshare
- visible: root.canReshare
+ enabled: !root.isSharePermissionChangeInProgress && root.serverAllowsResharing
+ visible: root.serverAllowsResharing
onClicked: root.toggleAllowResharing(checked);
Connections {
readonly property bool sharingPossible: shareModel && shareModel.canShare && shareModel.sharingEnabled
readonly property bool userGroupSharingPossible: sharingPossible && shareModel.userGroupSharingEnabled
readonly property bool publicLinkSharingPossible: sharingPossible && shareModel.publicLinkSharesEnabled
- readonly property bool resharingAllowed: shareModel && shareModel.resharingAllowed
+ readonly property bool serverAllowsResharing: shareModel && shareModel.serverAllowsResharing
readonly property bool loading: sharingPossible && (!shareModel ||
shareModel.fetchOngoing ||
rootStackView: root.rootStackView
backgroundsVisible: root.backgroundsVisible
canCreateLinkShares: root.publicLinkSharingPossible
- canReshare: root.resharingAllowed
+ serverAllowsResharing: root.serverAllowsResharing
onCreateNewLinkShare: {
root.waitingForSharesToChange = true;
Q_EMIT sharingEnabledChanged();
Q_EMIT publicLinkSharesEnabledChanged();
Q_EMIT userGroupSharingEnabledChanged();
- Q_EMIT resharingAllowedChanged();
+ Q_EMIT serverAllowsResharingChanged();
updateData();
}
return _maxSharingPermissions & SharePermissionShare;
}
-bool ShareModel::resharingAllowed() const
+bool ShareModel::serverAllowsResharing() const
{
return _accountState && _accountState->account() && _accountState->account()->capabilities().isValid()
&& _accountState->account()->capabilities().shareResharing();
Q_PROPERTY(bool canShare READ canShare NOTIFY sharePermissionsChanged)
Q_PROPERTY(bool fetchOngoing READ fetchOngoing NOTIFY fetchOngoingChanged)
Q_PROPERTY(bool hasInitialShareFetchCompleted READ hasInitialShareFetchCompleted NOTIFY hasInitialShareFetchCompletedChanged)
- Q_PROPERTY(bool resharingAllowed READ resharingAllowed NOTIFY resharingAllowedChanged)
+ Q_PROPERTY(bool serverAllowsResharing READ serverAllowsResharing NOTIFY serverAllowsResharingChanged)
Q_PROPERTY(QVariantList sharees READ sharees NOTIFY shareesChanged)
public:
[[nodiscard]] bool publicLinkSharesEnabled() const;
[[nodiscard]] bool userGroupSharingEnabled() const;
[[nodiscard]] bool canShare() const;
- [[nodiscard]] bool resharingAllowed() const;
+ [[nodiscard]] bool serverAllowsResharing() const;
[[nodiscard]] bool fetchOngoing() const;
[[nodiscard]] bool hasInitialShareFetchCompleted() const;
void hasInitialShareFetchCompletedChanged();
void shareesChanged();
void internalLinkReady();
- void resharingAllowedChanged();
+ void serverAllowsResharingChanged();
void serverError(const int code, const QString &message);
void passwordSetError(const QString &shareId, const int code, const QString &message);