Skip to content
This repository was archived by the owner on Mar 19, 2024. It is now read-only.

Commit 3681f10

Browse files
committed
Remove permission parsing from spaces. Will be done via WebDav permissions
1 parent ee5130d commit 3681f10

File tree

1 file changed

+0
-28
lines changed
  • owncloudComLibrary/src/main/java/com/owncloud/android/lib/resources/spaces/responses

1 file changed

+0
-28
lines changed

owncloudComLibrary/src/main/java/com/owncloud/android/lib/resources/spaces/responses/SpacesResponse.kt

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ data class QuotaResponse(
6161
data class RootResponse(
6262
val eTag: String?,
6363
val id: String,
64-
val permissions: List<PermissionResponse>?,
6564
val webDavUrl: String,
6665
val deleted: DeleteResponse?,
6766
)
@@ -88,38 +87,11 @@ data class FileResponse(
8887
val mimeType: String
8988
)
9089

91-
@JsonClass(generateAdapter = true)
92-
data class IdentityPermissionResponse(
93-
val id: String,
94-
val displayName: String?,
95-
)
96-
97-
@JsonClass(generateAdapter = true)
98-
data class GrantedToIdentitiesResponse(
99-
val user: IdentityPermissionResponse?,
100-
val group: IdentityPermissionResponse?,
101-
)
102-
10390
@JsonClass(generateAdapter = true)
10491
data class DeleteResponse(
10592
val state: String,
10693
)
10794

108-
@JsonClass(generateAdapter = true)
109-
data class PermissionResponse(
110-
val grantedTo: List<GrantedToIdentitiesResponse>?,
111-
val grantedToIdentities: List<GrantedToIdentitiesResponse>?,
112-
val roles: List<String>,
113-
) {
114-
/**
115-
* Supports api renaming from grantedTo to grantedToIdentities on v1.0.1
116-
* https://github.com/owncloud/libre-graph-api/releases/tag/v1.0.1
117-
*/
118-
fun getGrantedToIdentitiesResponse(): List<GrantedToIdentitiesResponse> {
119-
return grantedToIdentities ?: grantedTo ?: throw IllegalArgumentException("Permissions not granted to anyone")
120-
}
121-
}
122-
12395
@JsonClass(generateAdapter = true)
12496
data class SpecialFolderResponse(
12597
val name: String

0 commit comments

Comments
 (0)