mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-02-26 05:33:40 +00:00
Use NeedPrivilege() method to check privileges.
This commit is contained in:
parent
ef77bc3d39
commit
2255e1fa6a
@ -10,10 +10,7 @@
|
||||
*/
|
||||
dbg_error_log('PROPFIND', 'method handler');
|
||||
|
||||
if ( ! ($request->AllowedTo('read') || $request->AllowedTo('freebusy') || $request->AllowedTo('read-current-user-privilege-set') ) ) {
|
||||
dbg_error_log('ERROR','Insufficient privileges for "%s" of "%s"', $request->path, implode(', ', $request->permissions) );
|
||||
$request->DoResponse( 403, translate('You may not access that collection') );
|
||||
}
|
||||
$request->NeedPrivilege( array('read','read-free-busy','read-current-user-privilege-set') );
|
||||
|
||||
require_once('iCalendar.php');
|
||||
require_once('XMLDocument.php');
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user