diff --git a/src/main/java/com/owncloud/android/ui/fragment/EditShareFragment.java b/src/main/java/com/owncloud/android/ui/fragment/EditShareFragment.java index 554e70d85e..4330addb82 100644 --- a/src/main/java/com/owncloud/android/ui/fragment/EditShareFragment.java +++ b/src/main/java/com/owncloud/android/ui/fragment/EditShareFragment.java @@ -33,6 +33,7 @@ import android.widget.CompoundButton; import android.widget.TextView; import com.owncloud.android.R; +import com.owncloud.android.authentication.AccountUtils; import com.owncloud.android.datamodel.FileDataStorageManager; import com.owncloud.android.datamodel.OCFile; import com.owncloud.android.lib.common.operations.RemoteOperationResult; @@ -40,6 +41,7 @@ import com.owncloud.android.lib.common.utils.Log_OC; import com.owncloud.android.lib.resources.shares.OCShare; import com.owncloud.android.lib.resources.shares.SharePermissionsBuilder; import com.owncloud.android.lib.resources.shares.ShareType; +import com.owncloud.android.lib.resources.status.OwnCloudVersion; import com.owncloud.android.ui.activity.FileActivity; import com.owncloud.android.utils.AnalyticsUtils; @@ -145,6 +147,11 @@ public class EditShareFragment extends Fragment { int sharePermissions = mShare.getPermissions(); boolean isFederated = ShareType.FEDERATED.equals(mShare.getShareType()); + OwnCloudVersion serverVersion = AccountUtils.getServerVersion(mAccount); + boolean isNotReshareableFederatedSupported = ( + serverVersion != null && + serverVersion.isNotReshareableFederatedSupported() + ); CompoundButton compound; compound = (CompoundButton) editShareView.findViewById(R.id.canShareSwitch);