mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-05-25 02:34:17 +00:00
Move MKCOL/MKCALENDAR to NeedPrivilege()
This commit is contained in:
parent
1457f6066b
commit
ddb45c8158
@ -10,9 +10,7 @@
|
||||
*/
|
||||
dbg_error_log('MKCOL', 'method handler');
|
||||
|
||||
if ( ! $request->AllowedTo('bind') ) {
|
||||
$request->DoResponse( 403, translate('You may not create a calendar there.') );
|
||||
}
|
||||
$request->NeedPrivilege('DAV::bind');
|
||||
|
||||
$displayname = $request->path;
|
||||
|
||||
@ -51,7 +49,7 @@ if ( isset($request->xml_tags) ) {
|
||||
if ( $xmltree->GetTag() == 'DAV::mkcol' ) $request_type = 'extended-mkcol';
|
||||
|
||||
if ( $xmltree->GetTag() != 'urn:ietf:params:xml:ns:caldav:mkcalendar' && $request_type != 'extended-mkcol' ) {
|
||||
$request->DoResponse( 403, sprintf('The XML is not a "DAV::mkcol" or "urn:ietf:params:xml:ns:caldav:mkcalendar" document (%s)', $xmltree->GetTag()) );
|
||||
$request->DoResponse( 406, sprintf('The XML is not a "DAV::mkcol" or "urn:ietf:params:xml:ns:caldav:mkcalendar" document (%s)', $xmltree->GetTag()) );
|
||||
}
|
||||
$setprops = $xmltree->GetContent(); // <set>
|
||||
$setprops = $setprops[0]->GetContent(); // <prop>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user