Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,8 @@ public class GetCapabilitiesRemoteOperation extends RemoteOperation {
private static final String NODE_NOTES = "notes";
private static final String NOTES_PATH = "notes_path";

private static final String PROPERTY_DEFAULT_PERMISSIONS = "default_permissions";

private OCCapability currentCapability = null;

public GetCapabilitiesRemoteOperation() {
Expand Down Expand Up @@ -368,6 +370,10 @@ private OCCapability parseResponse(String response) throws JSONException {
respFilesSharing.getBoolean(PROPERTY_API_ENABLED)));
}

if (respFilesSharing.has(PROPERTY_DEFAULT_PERMISSIONS)) {
capability.setDefaultPermissions(respFilesSharing.getInt(PROPERTY_DEFAULT_PERMISSIONS));
}

if (respFilesSharing.has(NODE_PUBLIC)) {
JSONObject respPublic = respFilesSharing.getJSONObject(NODE_PUBLIC);
capability.setFilesSharingPublicEnabled(CapabilityBooleanType.fromBooleanValue(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ class OCCapability {
// Etag for capabilities
var etag: String? = ""

var defaultPermissions: Int? = null

val version: OwnCloudVersion
get() =
OwnCloudVersion(
Expand Down
Loading