mirror of
				https://github.com/owncloud/android-library.git
				synced 2025-10-31 02:17:41 +00:00 
			
		
		
		
	Merge pull request #552 from owncloud/remove_drives_permission_parsing
Remove permission parsing from spaces.
This commit is contained in:
		
						commit
						f7d4d27ebb
					
				| @ -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 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user