mirror of
https://github.com/nextcloud/android.git
synced 2024-11-26 23:28:42 +03:00
Let server decide default permissions for new share
This commit is contained in:
parent
d89488ea01
commit
58559b784b
2 changed files with 4 additions and 11 deletions
|
@ -44,8 +44,6 @@ import com.owncloud.android.operations.common.SyncOperation;
|
|||
|
||||
public class CreateShareViaLinkOperation extends SyncOperation {
|
||||
|
||||
private static final int READ_ONLY = 1;
|
||||
|
||||
protected FileDataStorageManager mStorageManager;
|
||||
|
||||
private String mPath;
|
||||
|
@ -87,7 +85,7 @@ public class CreateShareViaLinkOperation extends SyncOperation {
|
|||
"",
|
||||
false,
|
||||
mPassword,
|
||||
READ_ONLY
|
||||
OCShare.DEFAULT_PERMISSION
|
||||
);
|
||||
result = operation.execute(client);
|
||||
}
|
||||
|
@ -144,8 +142,7 @@ public class CreateShareViaLinkOperation extends SyncOperation {
|
|||
} else {
|
||||
share.setIsFolder(false);
|
||||
}
|
||||
share.setPermissions(READ_ONLY);
|
||||
|
||||
|
||||
getStorageManager().saveShare(share);
|
||||
|
||||
// Update OCFile with data from share: ShareByLink and publicLink
|
||||
|
|
|
@ -38,9 +38,6 @@ import com.owncloud.android.operations.common.SyncOperation;
|
|||
|
||||
public class CreateShareWithShareeOperation extends SyncOperation {
|
||||
|
||||
private static final int READ_ONLY = 1;
|
||||
private static final int ALL_PRIVILEGES = 31;
|
||||
|
||||
protected FileDataStorageManager mStorageManager;
|
||||
|
||||
private String mPath;
|
||||
|
@ -80,7 +77,7 @@ public class CreateShareWithShareeOperation extends SyncOperation {
|
|||
mShareeName,
|
||||
false,
|
||||
"",
|
||||
ALL_PRIVILEGES
|
||||
OCShare.DEFAULT_PERMISSION
|
||||
);
|
||||
operation.setGetShareDetails(true);
|
||||
RemoteOperationResult result = operation.execute(client);
|
||||
|
@ -104,8 +101,7 @@ public class CreateShareWithShareeOperation extends SyncOperation {
|
|||
// Update DB with the response
|
||||
share.setPath(mPath);
|
||||
share.setIsFolder(mPath.endsWith(FileUtils.PATH_SEPARATOR));
|
||||
share.setPermissions(READ_ONLY);
|
||||
|
||||
|
||||
getStorageManager().saveShare(share);
|
||||
|
||||
// Update OCFile with data from share: ShareByLink and publicLink
|
||||
|
|
Loading…
Reference in a new issue