Przeglądaj źródła

Remove share permission check after user select

1. User selects create share
2. Adv. Permissions detail auto-fills the default permission under consideration of the max parent (share-folder) permission
3. User manually adds additional permissions not allowed by the sharer
4. User creates share with "increased permissions"

**Before**: Ignore user choice and apply parent permission to avoid server error
**Now**: Honour user's choice and let server return error

NOTE: Updated error handling needed
Signed-off-by: Henrik Storch <henrik.storch@nextcloud.com>
Henrik Storch 3 lat temu
rodzic
commit
d529b22101
1 zmienionych plików z 1 dodań i 2 usunięć
  1. 1 2
      iOSClient/Share/NCShareNetworking.swift

+ 1 - 2
iOSClient/Share/NCShareNetworking.swift

@@ -73,9 +73,8 @@ class NCShareNetworking: NSObject {
 
         NCUtility.shared.startActivityIndicator(backgroundView: view, blurEffect: false)
         let filenamePath = CCUtility.returnFileNamePath(fromFileName: metadata.fileName, serverUrl: metadata.serverUrl, urlBase: urlBase, account: metadata.account)!
-        let permission = max(1, metadata.sharePermissionsCollaborationServices & option.permissions)
 
-        NCCommunication.shared.createShare(path: filenamePath, shareType: option.shareType, shareWith: option.shareWith, password: option.password, permissions: permission) { (account, share, errorCode, errorDescription) in
+        NCCommunication.shared.createShare(path: filenamePath, shareType: option.shareType, shareWith: option.shareWith, password: option.password, permissions: option.permissions) { (account, share, errorCode, errorDescription) in
             NCUtility.shared.stopActivityIndicator()
             if errorCode == 0, let share = share {
                 option.idShare = share.idShare