mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-05-24 02:24:39 +00:00
Allow freebusy query to be public for freebusy URLs at least.
This commit is contained in:
parent
9e9d232b88
commit
cf5e93c9f5
@ -2,8 +2,14 @@
|
||||
require_once("../inc/always.php");
|
||||
dbg_error_log( "freebusy", " User agent: %s", ((isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : "Unfortunately Mulberry and Chandler don't send a 'User-agent' header with their requests :-(")) );
|
||||
dbg_log_array( "headers", '_SERVER', $_SERVER, true );
|
||||
require_once("HTTPAuthSession.php");
|
||||
$session = new HTTPAuthSession();
|
||||
if ( isset($c->public_freebusy_url) && $c->public_freebusy_url ) {
|
||||
require_once("PublicSession.php");
|
||||
$session = new PublicSession();
|
||||
}
|
||||
else {
|
||||
require_once("HTTPAuthSession.php");
|
||||
$session = new HTTPAuthSession();
|
||||
}
|
||||
|
||||
/**
|
||||
* Submission parameters recommended by calconnect, plus some generous alternatives
|
||||
|
||||
@ -69,7 +69,8 @@ class PublicSession {
|
||||
* @return boolean Whether or not the user has the specified role.
|
||||
*/
|
||||
function AllowedTo ( $whatever ) {
|
||||
return ( $this->logged_in && isset($this->roles[$whatever]) && $this->roles[$whatever] );
|
||||
dbg_error_log('session', 'Checking whether "Public" is allowed to "%s"', $whatever);
|
||||
return ( isset($this->roles[$whatever]) && $this->roles[$whatever] );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user