1
0
mirror of https://github.com/owncloud/android-library.git synced 2025-06-08 00:16:09 +00:00

Update ErrorMessageAdapter class to generate appropiate error messages for operations failed due to lack of permissions (ResultCode.FORBIDDEN)

This commit is contained in:
jabarros 2014-07-10 17:29:43 +02:00 committed by David A. Velasco
parent 0862c66b7d
commit 7636d9e037
2 changed files with 5 additions and 1 deletions

View File

@ -99,7 +99,8 @@ public class RemoteOperationResult implements Serializable {
INVALID_CHARACTER_IN_NAME,
SHARE_NOT_FOUND,
LOCAL_STORAGE_NOT_REMOVED,
FORBIDDEN
FORBIDDEN,
SHARE_FORBIDDEN
}
private boolean mSuccess = false;

View File

@ -142,6 +142,9 @@ public class CreateRemoteShareOperation extends RemoteOperation {
} else if (xmlParser.isFileNotFound()){
result = new RemoteOperationResult(ResultCode.SHARE_NOT_FOUND);
} else if (xmlParser.isFailure()) {
result = new RemoteOperationResult(ResultCode.SHARE_FORBIDDEN);
} else {
result = new RemoteOperationResult(false, status, post.getResponseHeaders());
}