mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-05-21 01:54:23 +00:00
Check precondition to disallow creating collections in a schedule-inbox.
This commit is contained in:
parent
606e7d6338
commit
aeaf09a2d4
@ -12,7 +12,6 @@ dbg_error_log('MKCOL', 'method handler');
|
|||||||
require_once('AwlQuery.php');
|
require_once('AwlQuery.php');
|
||||||
|
|
||||||
$request->NeedPrivilege('DAV::bind');
|
$request->NeedPrivilege('DAV::bind');
|
||||||
|
|
||||||
$displayname = $request->path;
|
$displayname = $request->path;
|
||||||
|
|
||||||
// Enforce trailling '/' on collection name
|
// Enforce trailling '/' on collection name
|
||||||
@ -27,6 +26,13 @@ if ( preg_match( '#^(.*/)([^/]+)(/)?$#', $request->path, $matches ) ) {
|
|||||||
$displayname = $matches[2];
|
$displayname = $matches[2];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
require_once('DAVResource.php');
|
||||||
|
$parent = new DAVResource( $parent_container );
|
||||||
|
if ( $parent->IsSchedulingCollection( 'inbox' ) ) {
|
||||||
|
$request->PreconditionFailed(403, 'urn:ietf:params:xml:ns:caldav:no-mkcol-in-inbox' );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$request_type = $request->method;
|
$request_type = $request->method;
|
||||||
$is_calendar = ($request_type == 'MKCALENDAR');
|
$is_calendar = ($request_type == 'MKCALENDAR');
|
||||||
$is_addressbook = false;
|
$is_addressbook = false;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user