mirror of
https://github.com/grocy/grocy.git
synced 2025-10-14 17:24:07 +00:00
Added possibility to export the calendar in iCal format (closes #141)
This commit is contained in:
@@ -44,6 +44,18 @@ class ApiKeyAuthMiddleware extends BaseMiddleware
|
||||
$validApiKey = false;
|
||||
}
|
||||
|
||||
// Handling of special purpose API keys
|
||||
if (!$validApiKey)
|
||||
{
|
||||
if ($routeName === 'calendar-ical')
|
||||
{
|
||||
if ($request->getQueryParam('secret') !== null && $apiKeyService->IsValidApiKey($request->getQueryParam('secret'), ApiKeyService::API_KEY_TYPE_SPECIAL_PURPOSE_CALENDAR_ICAL))
|
||||
{
|
||||
$validApiKey = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!$validSession && !$validApiKey)
|
||||
{
|
||||
define('GROCY_AUTHENTICATED', false);
|
||||
|
Reference in New Issue
Block a user