diff --git a/owncloud-android-library b/owncloud-android-library index 1007a80534..23643ad28e 160000 --- a/owncloud-android-library +++ b/owncloud-android-library @@ -1 +1 @@ -Subproject commit 1007a80534827479b0874ae942c8c7dbe87cac35 +Subproject commit 23643ad28e3ef52c6f3bcd8bc56ce18ccfed4ba5 diff --git a/src/com/owncloud/android/ui/activity/ShareActivity.java b/src/com/owncloud/android/ui/activity/ShareActivity.java index 7995aa8133..12748b2d0b 100644 --- a/src/com/owncloud/android/ui/activity/ShareActivity.java +++ b/src/com/owncloud/android/ui/activity/ShareActivity.java @@ -136,20 +136,22 @@ public class ShareActivity extends FileActivity getFile(), shareeName, shareType, - getAppropiatePermissions() + getAppropiatePermissions(shareType.equals(ShareType.FEDERATED)) ); } - private int getAppropiatePermissions() { + private int getAppropiatePermissions(boolean isFederated) { if (getFile().isSharedWithMe()) { return OCShare.READ_PERMISSION_FLAG; // minimum permissions } else if (getFile().isFolder()) { - return OCShare.MAXIMUM_PERMISSIONS_FOR_FOLDER; + // check if the Share is FERERATED + return (isFederated) ? OCShare.FEDERATED_PERMISSIONS_FOR_FOLDER : OCShare.MAXIMUM_PERMISSIONS_FOR_FOLDER; } else { // isFile - return OCShare.MAXIMUM_PERMISSIONS_FOR_FILE; + // check if the Share is FERERATED + return (isFederated) ? OCShare.FEDERATED_PERMISSIONS_FOR_FILE : OCShare.MAXIMUM_PERMISSIONS_FOR_FILE; } }