1
0
mirror of https://github.com/owncloud/android-library.git synced 2025-06-06 15:36:45 +00:00

Remove permission parsing from spaces. Will be done via WebDav permissions

This commit is contained in:
Abel García de Prada 2023-03-22 15:23:57 +01:00
parent ee5130d3e6
commit 3681f1001a

View File

@ -61,7 +61,6 @@ data class QuotaResponse(
data class RootResponse(
val eTag: String?,
val id: String,
val permissions: List<PermissionResponse>?,
val webDavUrl: String,
val deleted: DeleteResponse?,
)
@ -88,38 +87,11 @@ data class FileResponse(
val mimeType: String
)
@JsonClass(generateAdapter = true)
data class IdentityPermissionResponse(
val id: String,
val displayName: String?,
)
@JsonClass(generateAdapter = true)
data class GrantedToIdentitiesResponse(
val user: IdentityPermissionResponse?,
val group: IdentityPermissionResponse?,
)
@JsonClass(generateAdapter = true)
data class DeleteResponse(
val state: String,
)
@JsonClass(generateAdapter = true)
data class PermissionResponse(
val grantedTo: List<GrantedToIdentitiesResponse>?,
val grantedToIdentities: List<GrantedToIdentitiesResponse>?,
val roles: List<String>,
) {
/**
* Supports api renaming from grantedTo to grantedToIdentities on v1.0.1
* https://github.com/owncloud/libre-graph-api/releases/tag/v1.0.1
*/
fun getGrantedToIdentitiesResponse(): List<GrantedToIdentitiesResponse> {
return grantedToIdentities ?: grantedTo ?: throw IllegalArgumentException("Permissions not granted to anyone")
}
}
@JsonClass(generateAdapter = true)
data class SpecialFolderResponse(
val name: String