From 60e8bb0ca7c6ed528bc07ef2829c7c3f9a18816e Mon Sep 17 00:00:00 2001 From: Marino Faggiana Date: Fri, 14 Jul 2023 17:27:28 +0200 Subject: [PATCH 01/10] add attributes --- Brand/Database.swift | 2 +- Nextcloud.xcodeproj/project.pbxproj | 4 ++-- iOSClient/Data/NCManageDatabase+Share.swift | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Brand/Database.swift b/Brand/Database.swift index 63d330a0a7..087112093c 100644 --- a/Brand/Database.swift +++ b/Brand/Database.swift @@ -26,4 +26,4 @@ import Foundation // Database Realm // let databaseName = "nextcloud.realm" -let databaseSchemaVersion: UInt64 = 299 +let databaseSchemaVersion: UInt64 = 300 diff --git a/Nextcloud.xcodeproj/project.pbxproj b/Nextcloud.xcodeproj/project.pbxproj index b8e917e6e4..f66bae8449 100644 --- a/Nextcloud.xcodeproj/project.pbxproj +++ b/Nextcloud.xcodeproj/project.pbxproj @@ -4937,8 +4937,8 @@ isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/nextcloud/NextcloudKit"; requirement = { - kind = exactVersion; - version = 2.6.0; + branch = "2425-missing-sharing-options"; + kind = branch; }; }; F788ECC5263AAAF900ADC67F /* XCRemoteSwiftPackageReference "MarkdownKit" */ = { diff --git a/iOSClient/Data/NCManageDatabase+Share.swift b/iOSClient/Data/NCManageDatabase+Share.swift index 828b933738..1d142a3ca5 100644 --- a/iOSClient/Data/NCManageDatabase+Share.swift +++ b/iOSClient/Data/NCManageDatabase+Share.swift @@ -67,6 +67,7 @@ class tableShareV2: Object { @objc dynamic var userIcon = "" @objc dynamic var userMessage = "" @objc dynamic var userStatus = "" + @objc dynamic var attributes: String? override static func primaryKey() -> String { return "primaryKey" @@ -127,6 +128,7 @@ extension NCManageDatabase { object.userIcon = share.userIcon object.userMessage = share.userMessage object.userStatus = share.userStatus + object.attributes = share.attributes realm.add(object, update: .all) } } From 209cca55ed2cae0cafc94260c6a0f75e8841873b Mon Sep 17 00:00:00 2001 From: Marino Faggiana Date: Sat, 15 Jul 2023 12:10:04 +0200 Subject: [PATCH 02/10] coding --- iOSClient/NCGlobal.swift | 2 + iOSClient/Share/Advanced/NCShareCells.swift | 37 +++++++++++++++++-- iOSClient/Share/NCShare+Helper.swift | 4 ++ .../en.lproj/Localizable.strings | 1 + 4 files changed, 41 insertions(+), 3 deletions(-) diff --git a/iOSClient/NCGlobal.swift b/iOSClient/NCGlobal.swift index cc8e55e885..d04e986295 100644 --- a/iOSClient/NCGlobal.swift +++ b/iOSClient/NCGlobal.swift @@ -257,6 +257,8 @@ class NCGlobal: NSObject { @objc let permissionMaxFolderShare: Int = 31 @objc let permissionDefaultFileRemoteShareNoSupportShareOption: Int = 3 @objc let permissionDefaultFolderRemoteShareNoSupportShareOption: Int = 15 + // ATTRIBUTES + @objc let permissionDownloadShare: Int = 0 // Filename Mask and Type // diff --git a/iOSClient/Share/Advanced/NCShareCells.swift b/iOSClient/Share/Advanced/NCShareCells.swift index dd6f7d4767..02e8271d3c 100644 --- a/iOSClient/Share/Advanced/NCShareCells.swift +++ b/iOSClient/Share/Advanced/NCShareCells.swift @@ -49,19 +49,26 @@ protocol NCPermission: NCToggleCellConfig { static var forDirectoryE2EE: [Self] { get } static var forFile: [Self] { get } func hasResharePermission(for parentPermission: Int) -> Bool + func hasDownload() -> Bool } enum NCUserPermission: CaseIterable, NCPermission { func hasResharePermission(for parentPermission: Int) -> Bool { + if self == .download { return true } return ((permissionBitFlag & parentPermission) != 0) } + func hasDownload() -> Bool { + return self == .download + } + var permissionBitFlag: Int { switch self { case .reshare: return NCGlobal.shared.permissionShareShare case .edit: return NCGlobal.shared.permissionUpdateShare case .create: return NCGlobal.shared.permissionCreateShare case .delete: return NCGlobal.shared.permissionDeleteShare + case .download: return NCGlobal.shared.permissionDownloadShare } } @@ -70,10 +77,28 @@ enum NCUserPermission: CaseIterable, NCPermission { } func isOn(for share: NCTableShareable) -> Bool { - return (share.permissions & permissionBitFlag) != 0 + if self == .download { + if let attributes = share.attributes, let data = attributes.data(using: .utf8) { + do { + if let json = try JSONSerialization.jsonObject(with: data) as? [Dictionary] { + for sub in json { + let key = sub["key"] as? String + let enabled = sub["enabled"] as? Bool + let scope = sub["scope"] as? String + if key == "download", enabled == false, scope == "permissions" { + return false + } + } + } + } catch let error as NSError { print(error) } + } + return true + } else { + return (share.permissions & permissionBitFlag) != 0 + } } - case reshare, edit, create, delete + case reshare, edit, create, delete, download static let forDirectory: [NCUserPermission] = NCUserPermission.allCases static let forDirectoryE2EE: [NCUserPermission] = [] static let forFile: [NCUserPermission] = [.reshare, .edit] @@ -84,11 +109,13 @@ enum NCUserPermission: CaseIterable, NCPermission { case .edit: return NSLocalizedString("_share_can_change_", comment: "") case .create: return NSLocalizedString("_share_can_create_", comment: "") case .delete: return NSLocalizedString("_share_can_delete_", comment: "") + case .download: return NSLocalizedString("_share_can_download_", comment: "") } } } enum NCLinkPermission: NCPermission { + func didChange(_ share: NCTableShareable, to newValue: Bool) { guard self != .allowEdit || newValue else { share.permissions = NCGlobal.shared.permissionReadShare @@ -101,6 +128,10 @@ enum NCLinkPermission: NCPermission { permissionValue & parentPermission == permissionValue } + func hasDownload() -> Bool { + return true + } + var permissionValue: Int { switch self { case .allowEdit: @@ -225,7 +256,7 @@ struct NCShareConfig { let cellConfig = config(for: indexPath) let cell = cellConfig?.getCell(for: share) cell?.textLabel?.text = cellConfig?.title - if let cellConfig = cellConfig as? NCPermission, !cellConfig.hasResharePermission(for: resharePermission) { + if let cellConfig = cellConfig as? NCPermission, !cellConfig.hasResharePermission(for: resharePermission), !cellConfig.hasDownload() { cell?.isUserInteractionEnabled = false cell?.textLabel?.isEnabled = false } diff --git a/iOSClient/Share/NCShare+Helper.swift b/iOSClient/Share/NCShare+Helper.swift index 8f1abdd80b..3284df733b 100644 --- a/iOSClient/Share/NCShare+Helper.swift +++ b/iOSClient/Share/NCShare+Helper.swift @@ -40,6 +40,7 @@ protocol NCTableShareable: AnyObject { var note: String { get set } var expirationDate: NSDate? { get set } var shareWithDisplayname: String { get set } + var attributes: String? { get set } } extension NCTableShareable { @@ -62,6 +63,7 @@ extension NCTableShareable { } class NCTableShareOptions: NCTableShareable { + var shareType: Int var permissions: Int @@ -75,6 +77,8 @@ class NCTableShareOptions: NCTableShareable { var expirationDate: NSDate? var shareWithDisplayname: String = "" + var attributes: String? + private init(shareType: Int, metadata: tableMetadata, password: String?) { if metadata.e2eEncrypted { self.permissions = NCGlobal.shared.permissionCreateShare diff --git a/iOSClient/Supporting Files/en.lproj/Localizable.strings b/iOSClient/Supporting Files/en.lproj/Localizable.strings index aeb33ef974..11b2189e6b 100644 --- a/iOSClient/Supporting Files/en.lproj/Localizable.strings +++ b/iOSClient/Supporting Files/en.lproj/Localizable.strings @@ -650,6 +650,7 @@ "_share_can_create_" = "Allow creating"; "_share_can_change_" = "Allow editing"; "_share_can_delete_" = "Allow deleting"; +"_share_can_download_" = "Allow download"; "_share_unshare_" = "Unshare"; "_share_internal_link_" = "Internal link"; "_share_internal_link_des_" = "Only works for users with access to this folder"; From 44cd7a5c70600653c619ead2120bb7360181330e Mon Sep 17 00:00:00 2001 From: Marino Faggiana Date: Sat, 15 Jul 2023 16:43:52 +0200 Subject: [PATCH 03/10] coding --- iOSClient/Data/NCManageDatabase+Share.swift | 21 +++++++++++++++++++++ iOSClient/Share/Advanced/NCShareCells.swift | 16 +--------------- iOSClient/Share/NCShare+Helper.swift | 9 ++++++--- 3 files changed, 28 insertions(+), 18 deletions(-) diff --git a/iOSClient/Data/NCManageDatabase+Share.swift b/iOSClient/Data/NCManageDatabase+Share.swift index 1d142a3ca5..79b8ef2a47 100644 --- a/iOSClient/Data/NCManageDatabase+Share.swift +++ b/iOSClient/Data/NCManageDatabase+Share.swift @@ -74,6 +74,27 @@ class tableShareV2: Object { } } +extension tableShare { + + var isAttributeDownloadEnabled: Bool { + if let attributes = attributes, let data = attributes.data(using: .utf8) { + do { + if let json = try JSONSerialization.jsonObject(with: data) as? [Dictionary] { + for sub in json { + let key = sub["key"] as? String + let enabled = sub["enabled"] as? Bool + let scope = sub["scope"] as? String + if key == "download", enabled == false, scope == "permissions" { + return false + } + } + } + } catch let error as NSError { print(error) } + } + return true + } +} + extension NCManageDatabase { func addShare(account: String, home: String, shares: [NKShare]) { diff --git a/iOSClient/Share/Advanced/NCShareCells.swift b/iOSClient/Share/Advanced/NCShareCells.swift index 02e8271d3c..1defe625da 100644 --- a/iOSClient/Share/Advanced/NCShareCells.swift +++ b/iOSClient/Share/Advanced/NCShareCells.swift @@ -78,21 +78,7 @@ enum NCUserPermission: CaseIterable, NCPermission { func isOn(for share: NCTableShareable) -> Bool { if self == .download { - if let attributes = share.attributes, let data = attributes.data(using: .utf8) { - do { - if let json = try JSONSerialization.jsonObject(with: data) as? [Dictionary] { - for sub in json { - let key = sub["key"] as? String - let enabled = sub["enabled"] as? Bool - let scope = sub["scope"] as? String - if key == "download", enabled == false, scope == "permissions" { - return false - } - } - } - } catch let error as NSError { print(error) } - } - return true + return share.isAttributeDownloadEnabled } else { return (share.permissions & permissionBitFlag) != 0 } diff --git a/iOSClient/Share/NCShare+Helper.swift b/iOSClient/Share/NCShare+Helper.swift index 3284df733b..028bc62bd8 100644 --- a/iOSClient/Share/NCShare+Helper.swift +++ b/iOSClient/Share/NCShare+Helper.swift @@ -25,7 +25,9 @@ import UIKit import NextcloudKit extension tableShare: NCTableShareable { } -extension NKShare: NCTableShareable { } +extension NKShare: NCTableShareable { + var isAttributeDownloadEnabled: Bool { return true } +} protocol NCTableShareable: AnyObject { var shareType: Int { get set } @@ -40,7 +42,8 @@ protocol NCTableShareable: AnyObject { var note: String { get set } var expirationDate: NSDate? { get set } var shareWithDisplayname: String { get set } - var attributes: String? { get set } + + var isAttributeDownloadEnabled: Bool { get } } extension NCTableShareable { @@ -77,7 +80,7 @@ class NCTableShareOptions: NCTableShareable { var expirationDate: NSDate? var shareWithDisplayname: String = "" - var attributes: String? + var isAttributeDownloadEnabled: Bool = true private init(shareType: Int, metadata: tableMetadata, password: String?) { if metadata.e2eEncrypted { From 90324f7136fe56185fe7485edc7c4c47699945a4 Mon Sep 17 00:00:00 2001 From: Marino Faggiana Date: Sat, 15 Jul 2023 16:51:46 +0200 Subject: [PATCH 04/10] coding --- iOSClient/Share/Advanced/NCShareCells.swift | 6 +++++- iOSClient/Share/NCShare+Helper.swift | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/iOSClient/Share/Advanced/NCShareCells.swift b/iOSClient/Share/Advanced/NCShareCells.swift index 1defe625da..e75ec38f3a 100644 --- a/iOSClient/Share/Advanced/NCShareCells.swift +++ b/iOSClient/Share/Advanced/NCShareCells.swift @@ -73,7 +73,11 @@ enum NCUserPermission: CaseIterable, NCPermission { } func didChange(_ share: NCTableShareable, to newValue: Bool) { - share.permissions ^= permissionBitFlag + if self == .download { + // ATTRIBUTES + } else { + share.permissions ^= permissionBitFlag + } } func isOn(for share: NCTableShareable) -> Bool { diff --git a/iOSClient/Share/NCShare+Helper.swift b/iOSClient/Share/NCShare+Helper.swift index 028bc62bd8..cbdc1cc061 100644 --- a/iOSClient/Share/NCShare+Helper.swift +++ b/iOSClient/Share/NCShare+Helper.swift @@ -43,6 +43,7 @@ protocol NCTableShareable: AnyObject { var expirationDate: NSDate? { get set } var shareWithDisplayname: String { get set } + var attributes: String? { get set } var isAttributeDownloadEnabled: Bool { get } } @@ -80,6 +81,7 @@ class NCTableShareOptions: NCTableShareable { var expirationDate: NSDate? var shareWithDisplayname: String = "" + var attributes: String? var isAttributeDownloadEnabled: Bool = true private init(shareType: Int, metadata: tableMetadata, password: String?) { From 7a1d45c33c2eab6750235866d4968caa32d09dc6 Mon Sep 17 00:00:00 2001 From: Marino Faggiana Date: Sat, 15 Jul 2023 18:27:28 +0200 Subject: [PATCH 05/10] coding --- iOSClient/Data/NCManageDatabase+Share.swift | 8 ++++++++ iOSClient/Share/Advanced/NCShareCells.swift | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/iOSClient/Data/NCManageDatabase+Share.swift b/iOSClient/Data/NCManageDatabase+Share.swift index 79b8ef2a47..65bab0c00a 100644 --- a/iOSClient/Data/NCManageDatabase+Share.swift +++ b/iOSClient/Data/NCManageDatabase+Share.swift @@ -259,4 +259,12 @@ extension NCManageDatabase { NextcloudKit.shared.nkCommonInstance.writeLog("Could not write to database: \(error)") } } + + func setAttibuteDownload(state: Bool) -> String? { + if state { + return nil + } else { + return "[{\"scope\":\"permissions\",\"key\":\"download\",\"enabled\":false}]" + } + } } diff --git a/iOSClient/Share/Advanced/NCShareCells.swift b/iOSClient/Share/Advanced/NCShareCells.swift index e75ec38f3a..ac81c03eb3 100644 --- a/iOSClient/Share/Advanced/NCShareCells.swift +++ b/iOSClient/Share/Advanced/NCShareCells.swift @@ -73,8 +73,9 @@ enum NCUserPermission: CaseIterable, NCPermission { } func didChange(_ share: NCTableShareable, to newValue: Bool) { + // ATTRIBUTES if self == .download { - // ATTRIBUTES + share.attributes = NCManageDatabase.shared.setAttibuteDownload(state: newValue) } else { share.permissions ^= permissionBitFlag } From 0a802cf73c366ae5cf81b286fb51164d2f9eaa7f Mon Sep 17 00:00:00 2001 From: Marino Faggiana Date: Sat, 15 Jul 2023 18:34:34 +0200 Subject: [PATCH 06/10] Update NCShareCells.swift --- iOSClient/Share/Advanced/NCShareCells.swift | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/iOSClient/Share/Advanced/NCShareCells.swift b/iOSClient/Share/Advanced/NCShareCells.swift index ac81c03eb3..1a1f0b294b 100644 --- a/iOSClient/Share/Advanced/NCShareCells.swift +++ b/iOSClient/Share/Advanced/NCShareCells.swift @@ -73,7 +73,6 @@ enum NCUserPermission: CaseIterable, NCPermission { } func didChange(_ share: NCTableShareable, to newValue: Bool) { - // ATTRIBUTES if self == .download { share.attributes = NCManageDatabase.shared.setAttibuteDownload(state: newValue) } else { @@ -120,7 +119,7 @@ enum NCLinkPermission: NCPermission { } func hasDownload() -> Bool { - return true + return false } var permissionValue: Int { From 4990135a6b797353f29cebd3a46b496d7d0d17f9 Mon Sep 17 00:00:00 2001 From: Marino Faggiana Date: Sat, 15 Jul 2023 18:54:57 +0200 Subject: [PATCH 07/10] coding --- iOSClient/Data/NCManageDatabase+Share.swift | 1 + iOSClient/Share/NCShareNetworking.swift | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/iOSClient/Data/NCManageDatabase+Share.swift b/iOSClient/Data/NCManageDatabase+Share.swift index 65bab0c00a..9e534d81e5 100644 --- a/iOSClient/Data/NCManageDatabase+Share.swift +++ b/iOSClient/Data/NCManageDatabase+Share.swift @@ -260,6 +260,7 @@ extension NCManageDatabase { } } + // There is currently only one share attribute “download” from the scope “permissions”. This attribute is only valid for user and group shares, not for public link shares. func setAttibuteDownload(state: Bool) -> String? { if state { return nil diff --git a/iOSClient/Share/NCShareNetworking.swift b/iOSClient/Share/NCShareNetworking.swift index bcabbf73ae..fca3b2a350 100644 --- a/iOSClient/Share/NCShareNetworking.swift +++ b/iOSClient/Share/NCShareNetworking.swift @@ -113,7 +113,7 @@ class NCShareNetworking: NSObject { func updateShare(option: NCTableShareable) { NCActivityIndicator.shared.start(backgroundView: view) - NextcloudKit.shared.updateShare(idShare: option.idShare, password: option.password, expireDate: option.expDateString, permissions: option.permissions, note: option.note, label: option.label, hideDownload: option.hideDownload) { account, share, data, error in + NextcloudKit.shared.updateShare(idShare: option.idShare, password: option.password, expireDate: option.expDateString, permissions: option.permissions, note: option.note, label: option.label, hideDownload: option.hideDownload, attributes: option.attributes) { account, share, data, error in NCActivityIndicator.shared.stop() if error == .success, let share = share { let home = NCUtilityFileSystem.shared.getHomeServer(urlBase: self.metadata.urlBase, userId: self.metadata.userId) From 48c3fd566ae20fae4a22a06355be2fad37c8655b Mon Sep 17 00:00:00 2001 From: Marino Faggiana Date: Sun, 16 Jul 2023 09:31:38 +0200 Subject: [PATCH 08/10] Update NCManageDatabase+Share.swift --- iOSClient/Data/NCManageDatabase+Share.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/iOSClient/Data/NCManageDatabase+Share.swift b/iOSClient/Data/NCManageDatabase+Share.swift index 9e534d81e5..2db62ed90e 100644 --- a/iOSClient/Data/NCManageDatabase+Share.swift +++ b/iOSClient/Data/NCManageDatabase+Share.swift @@ -84,8 +84,8 @@ extension tableShare { let key = sub["key"] as? String let enabled = sub["enabled"] as? Bool let scope = sub["scope"] as? String - if key == "download", enabled == false, scope == "permissions" { - return false + if key == "download", scope == "permissions", let enabled = enabled { + return enabled } } } From f0a0895a953f58f47ccd835eb2f921a3064efd14 Mon Sep 17 00:00:00 2001 From: Marino Faggiana Date: Sun, 16 Jul 2023 09:49:28 +0200 Subject: [PATCH 09/10] coding --- iOSClient/Data/NCManageDatabase+Share.swift | 40 ++++++++++----------- iOSClient/Share/Advanced/NCShareCells.swift | 2 +- iOSClient/Share/NCShare+Helper.swift | 6 +--- 3 files changed, 21 insertions(+), 27 deletions(-) diff --git a/iOSClient/Data/NCManageDatabase+Share.swift b/iOSClient/Data/NCManageDatabase+Share.swift index 2db62ed90e..7ec27f5014 100644 --- a/iOSClient/Data/NCManageDatabase+Share.swift +++ b/iOSClient/Data/NCManageDatabase+Share.swift @@ -74,27 +74,6 @@ class tableShareV2: Object { } } -extension tableShare { - - var isAttributeDownloadEnabled: Bool { - if let attributes = attributes, let data = attributes.data(using: .utf8) { - do { - if let json = try JSONSerialization.jsonObject(with: data) as? [Dictionary] { - for sub in json { - let key = sub["key"] as? String - let enabled = sub["enabled"] as? Bool - let scope = sub["scope"] as? String - if key == "download", scope == "permissions", let enabled = enabled { - return enabled - } - } - } - } catch let error as NSError { print(error) } - } - return true - } -} - extension NCManageDatabase { func addShare(account: String, home: String, shares: [NKShare]) { @@ -268,4 +247,23 @@ extension NCManageDatabase { return "[{\"scope\":\"permissions\",\"key\":\"download\",\"enabled\":false}]" } } + + func isAttributeDownloadEnabled(attributes: String?) -> Bool { + if let attributes = attributes, let data = attributes.data(using: .utf8) { + do { + if let json = try JSONSerialization.jsonObject(with: data) as? [Dictionary] { + for sub in json { + let key = sub["key"] as? String + let enabled = sub["enabled"] as? Bool + let scope = sub["scope"] as? String + if key == "download", scope == "permissions", let enabled = enabled { + return enabled + } + } + } + } catch let error as NSError { print(error) } + } + return true + } + } diff --git a/iOSClient/Share/Advanced/NCShareCells.swift b/iOSClient/Share/Advanced/NCShareCells.swift index 1a1f0b294b..dcac7c2f46 100644 --- a/iOSClient/Share/Advanced/NCShareCells.swift +++ b/iOSClient/Share/Advanced/NCShareCells.swift @@ -82,7 +82,7 @@ enum NCUserPermission: CaseIterable, NCPermission { func isOn(for share: NCTableShareable) -> Bool { if self == .download { - return share.isAttributeDownloadEnabled + return NCManageDatabase.shared.isAttributeDownloadEnabled(attributes: share.attributes) } else { return (share.permissions & permissionBitFlag) != 0 } diff --git a/iOSClient/Share/NCShare+Helper.swift b/iOSClient/Share/NCShare+Helper.swift index cbdc1cc061..1a74a951d8 100644 --- a/iOSClient/Share/NCShare+Helper.swift +++ b/iOSClient/Share/NCShare+Helper.swift @@ -25,9 +25,7 @@ import UIKit import NextcloudKit extension tableShare: NCTableShareable { } -extension NKShare: NCTableShareable { - var isAttributeDownloadEnabled: Bool { return true } -} +extension NKShare: NCTableShareable { } protocol NCTableShareable: AnyObject { var shareType: Int { get set } @@ -44,7 +42,6 @@ protocol NCTableShareable: AnyObject { var shareWithDisplayname: String { get set } var attributes: String? { get set } - var isAttributeDownloadEnabled: Bool { get } } extension NCTableShareable { @@ -82,7 +79,6 @@ class NCTableShareOptions: NCTableShareable { var shareWithDisplayname: String = "" var attributes: String? - var isAttributeDownloadEnabled: Bool = true private init(shareType: Int, metadata: tableMetadata, password: String?) { if metadata.e2eEncrypted { From 95b58a6dd8e0c586851040e04f7ecca22129f30c Mon Sep 17 00:00:00 2001 From: Marino Faggiana Date: Sun, 16 Jul 2023 10:01:20 +0200 Subject: [PATCH 10/10] Update NCShareNetworking.swift --- iOSClient/Share/NCShareNetworking.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iOSClient/Share/NCShareNetworking.swift b/iOSClient/Share/NCShareNetworking.swift index fca3b2a350..7cbf06c734 100644 --- a/iOSClient/Share/NCShareNetworking.swift +++ b/iOSClient/Share/NCShareNetworking.swift @@ -82,7 +82,7 @@ class NCShareNetworking: NSObject { NCActivityIndicator.shared.start(backgroundView: view) let filenamePath = CCUtility.returnFileNamePath(fromFileName: metadata.fileName, serverUrl: metadata.serverUrl, urlBase: metadata.urlBase, userId: metadata.userId, account: metadata.account)! - NextcloudKit.shared.createShare(path: filenamePath, shareType: option.shareType, shareWith: option.shareWith, password: option.password, permissions: option.permissions) { (account, share, data, error) in + NextcloudKit.shared.createShare(path: filenamePath, shareType: option.shareType, shareWith: option.shareWith, password: option.password, permissions: option.permissions, attributes: option.attributes) { (account, share, data, error) in NCActivityIndicator.shared.stop() if error == .success, let share = share { option.idShare = share.idShare