mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-08-21 17:06:22 +00:00
Modification of protected properties should be a 403.
We might as well send an error response along with that, too.
This commit is contained in:
parent
5185e04eb9
commit
1711fb68aa
@ -70,7 +70,8 @@ foreach( $setprops AS $k => $setting ) {
|
||||
else {
|
||||
$failure['set-'.$tag] = new XMLElement( 'propstat', array(
|
||||
new XMLElement( 'prop', new XMLElement($tag)),
|
||||
new XMLElement( 'status', 'HTTP/1.1 409 Conflict' ),
|
||||
new XMLElement( 'status', 'HTTP/1.1 403 Forbidden' ),
|
||||
new XMLElement( 'error', new XMLElement( 'cannot-modify-protected-property') ),
|
||||
new XMLElement( 'responsedescription', translate("The displayname may only be set on collections or principals.") )
|
||||
));
|
||||
}
|
||||
@ -91,7 +92,8 @@ foreach( $setprops AS $k => $setting ) {
|
||||
else {
|
||||
$failure['set-'.$tag] = new XMLElement( 'propstat', array(
|
||||
new XMLElement( 'prop', new XMLElement($tag)),
|
||||
new XMLElement( 'status', 'HTTP/1.1 409 Conflict' ),
|
||||
new XMLElement( 'status', 'HTTP/1.1 403 Forbidden' ),
|
||||
new XMLElement( 'error', new XMLElement( 'cannot-modify-protected-property') ),
|
||||
new XMLElement( 'responsedescription', translate("Resources may not be changed to / from collections.") )
|
||||
));
|
||||
}
|
||||
@ -134,7 +136,8 @@ foreach( $setprops AS $k => $setting ) {
|
||||
case 'DAV::supportedlock':
|
||||
$failure['set-'.$tag] = new XMLElement( 'propstat', array(
|
||||
new XMLElement( 'prop', new XMLElement($tag)),
|
||||
new XMLElement( 'status', 'HTTP/1.1 409 Conflict' ),
|
||||
new XMLElement( 'status', 'HTTP/1.1 403 Forbidden' ),
|
||||
new XMLElement( 'error', new XMLElement( 'cannot-modify-protected-property') ),
|
||||
new XMLElement('responsedescription', translate("Property is read-only") )
|
||||
));
|
||||
break;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user