Allow any share-access value

pull/1384/head
Alex Baker 3 years ago
parent 737fb5b711
commit 8aac517cd2

@ -34,9 +34,7 @@ data class ShareAccess(val access: Property.Name): Property {
var eventType = parser.eventType
while (!(eventType == XmlPullParser.END_TAG && parser.depth == depth)) {
if (eventType == XmlPullParser.START_TAG && parser.depth == depth + 1) {
when (val name = parser.propertyName()) {
SHARED_OWNER, READ_WRITE, NOT_SHARED, READ -> result = name
}
result = parser.propertyName()
}
eventType = parser.next()
}

@ -28,9 +28,10 @@ class Sharee(parser: XmlPullParser) {
DavResource.HREF ->
XmlUtils.readText(parser)?.let { href = it }
ShareAccess.NAME ->
access = PropertyRegistry.create(ShareAccess.NAME, parser) as ShareAccess
PropertyRegistry.create(ShareAccess.NAME, parser)
?.let { access = it as ShareAccess }
COMMENT ->
comment = XmlUtils.readText(parser)
XmlUtils.readText(parser)?.let { comment = it }
INVITE_ACCEPTED, INVITE_DECLINED, INVITE_NORESPONSE, INVITE_INVALID ->
response = name
DavResource.PROP ->

Loading…
Cancel
Save