|
@@ -247,7 +247,7 @@ class NCShareLinkMenuView: UIView, UIGestureRecognizerDelegate, NCShareNetworkin
|
|
|
permission = UtilsFramework.getPermissionsValue(byCanEdit: false, andCanCreate: false, andCanChange: false, andCanDelete: false, andCanShare: false, andIsFolder: metadata.directory)
|
|
|
}
|
|
|
|
|
|
- networking?.updateShare(idShare: tableShare.idShare, password: nil, permission: permission, note: nil, expirationTime: nil, hideDownload: tableShare.hideDownload)
|
|
|
+ networking?.updateShare(idShare: tableShare.idShare, password: nil, permission: permission, note: nil, expirationDate: nil, hideDownload: tableShare.hideDownload)
|
|
|
}
|
|
|
|
|
|
// Read Only (directory)
|
|
@@ -260,7 +260,7 @@ class NCShareLinkMenuView: UIView, UIGestureRecognizerDelegate, NCShareNetworkin
|
|
|
if sender.isOn && permission != tableShare.permissions {
|
|
|
switchAllowUploadAndEditing.setOn(false, animated: false)
|
|
|
switchFileDrop.setOn(false, animated: false)
|
|
|
- networking?.updateShare(idShare: tableShare.idShare, password: nil, permission: permission, note: nil, expirationTime: nil, hideDownload: tableShare.hideDownload)
|
|
|
+ networking?.updateShare(idShare: tableShare.idShare, password: nil, permission: permission, note: nil, expirationDate: nil, hideDownload: tableShare.hideDownload)
|
|
|
} else {
|
|
|
sender.setOn(true, animated: false)
|
|
|
}
|
|
@@ -276,7 +276,7 @@ class NCShareLinkMenuView: UIView, UIGestureRecognizerDelegate, NCShareNetworkin
|
|
|
if sender.isOn && permission != tableShare.permissions {
|
|
|
switchReadOnly.setOn(false, animated: false)
|
|
|
switchFileDrop.setOn(false, animated: false)
|
|
|
- networking?.updateShare(idShare: tableShare.idShare, password: nil, permission: permission, note: nil, expirationTime: nil, hideDownload: tableShare.hideDownload)
|
|
|
+ networking?.updateShare(idShare: tableShare.idShare, password: nil, permission: permission, note: nil, expirationDate: nil, hideDownload: tableShare.hideDownload)
|
|
|
} else {
|
|
|
sender.setOn(true, animated: false)
|
|
|
}
|
|
@@ -291,7 +291,7 @@ class NCShareLinkMenuView: UIView, UIGestureRecognizerDelegate, NCShareNetworkin
|
|
|
if sender.isOn && permission != tableShare.permissions {
|
|
|
switchReadOnly.setOn(false, animated: false)
|
|
|
switchAllowUploadAndEditing.setOn(false, animated: false)
|
|
|
- networking?.updateShare(idShare: tableShare.idShare, password: nil, permission: permission, note: nil, expirationTime: nil, hideDownload: tableShare.hideDownload)
|
|
|
+ networking?.updateShare(idShare: tableShare.idShare, password: nil, permission: permission, note: nil, expirationDate: nil, hideDownload: tableShare.hideDownload)
|
|
|
} else {
|
|
|
sender.setOn(true, animated: false)
|
|
|
}
|
|
@@ -302,7 +302,7 @@ class NCShareLinkMenuView: UIView, UIGestureRecognizerDelegate, NCShareNetworkin
|
|
|
|
|
|
guard let tableShare = self.tableShare else { return }
|
|
|
|
|
|
- networking?.updateShare(idShare: tableShare.idShare, password: nil, permission: 0, note: nil, expirationTime: nil, hideDownload: sender.isOn)
|
|
|
+ networking?.updateShare(idShare: tableShare.idShare, password: nil, permission: tableShare.permissions, note: nil, expirationDate: nil, hideDownload: sender.isOn)
|
|
|
}
|
|
|
|
|
|
// Password protect
|
|
@@ -315,7 +315,7 @@ class NCShareLinkMenuView: UIView, UIGestureRecognizerDelegate, NCShareNetworkin
|
|
|
fieldPasswordProtect.text = ""
|
|
|
fieldPasswordProtect.becomeFirstResponder()
|
|
|
} else {
|
|
|
- networking?.updateShare(idShare: tableShare.idShare, password: "", permission: 0, note: nil, expirationTime: nil, hideDownload: tableShare.hideDownload)
|
|
|
+ networking?.updateShare(idShare: tableShare.idShare, password: "", permission: tableShare.permissions, note: nil, expirationDate: nil, hideDownload: tableShare.hideDownload)
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -323,7 +323,7 @@ class NCShareLinkMenuView: UIView, UIGestureRecognizerDelegate, NCShareNetworkin
|
|
|
|
|
|
guard let tableShare = self.tableShare else { return }
|
|
|
|
|
|
- networking?.updateShare(idShare: tableShare.idShare, password: fieldPasswordProtect.text, permission: 0, note: nil, expirationTime: nil, hideDownload: tableShare.hideDownload)
|
|
|
+ networking?.updateShare(idShare: tableShare.idShare, password: fieldPasswordProtect.text, permission: tableShare.permissions, note: nil, expirationDate: nil, hideDownload: tableShare.hideDownload)
|
|
|
}
|
|
|
|
|
|
// Set expiration date
|
|
@@ -335,7 +335,7 @@ class NCShareLinkMenuView: UIView, UIGestureRecognizerDelegate, NCShareNetworkin
|
|
|
fieldSetExpirationDate.isEnabled = true
|
|
|
fieldSetExpirationDate(sender: fieldSetExpirationDate)
|
|
|
} else {
|
|
|
- networking?.updateShare(idShare: tableShare.idShare, password: nil, permission: 0, note: nil, expirationTime: "", hideDownload: tableShare.hideDownload)
|
|
|
+ networking?.updateShare(idShare: tableShare.idShare, password: nil, permission: tableShare.permissions, note: nil, expirationDate: "", hideDownload: tableShare.hideDownload)
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -357,7 +357,7 @@ class NCShareLinkMenuView: UIView, UIGestureRecognizerDelegate, NCShareNetworkin
|
|
|
guard let tableShare = self.tableShare else { return }
|
|
|
if fieldNoteToRecipient.text == nil { return }
|
|
|
|
|
|
- networking?.updateShare(idShare: tableShare.idShare, password: nil, permission: 0, note: fieldNoteToRecipient.text, expirationTime: nil, hideDownload: tableShare.hideDownload)
|
|
|
+ networking?.updateShare(idShare: tableShare.idShare, password: nil, permission: tableShare.permissions, note: fieldNoteToRecipient.text, expirationDate: nil, hideDownload: tableShare.hideDownload)
|
|
|
}
|
|
|
|
|
|
// Delete share link
|
|
@@ -416,7 +416,7 @@ class NCShareLinkMenuView: UIView, UIGestureRecognizerDelegate, NCShareNetworkin
|
|
|
dateFormatter.dateFormat = "YYYY-MM-dd"
|
|
|
let expirationTime = dateFormatter.string(from: date)
|
|
|
|
|
|
- networking?.updateShare(idShare: tableShare.idShare, password: nil, permission: 0, note: nil, expirationTime: expirationTime, hideDownload: tableShare.hideDownload)
|
|
|
+ networking?.updateShare(idShare: tableShare.idShare, password: nil, permission: tableShare.permissions, note: nil, expirationDate: expirationTime, hideDownload: tableShare.hideDownload)
|
|
|
}
|
|
|
}
|
|
|
|