Add new "choir" calendar and add cascading functionality for calendars
Jenkins Production Deployment

This commit is contained in:
2024-06-04 11:17:28 +02:00
parent 59fee19a76
commit cb85e81d67
4 changed files with 67 additions and 3 deletions
@@ -24,6 +24,7 @@ export const eventsRouter = express.Router();
export const calendarNames = new Map<string, any>([
['public', {id: 1, name: 'Nachklang_calendar'}],
['members', {id: 2, name: 'Nachklang_internal_calendar'}],
['choir', {id: 4, name: 'Nachklang_choir_calendar'}],
['management', {id: 3, name: 'Nachklang_management_calendar'}]
]);
@@ -55,6 +56,7 @@ eventsRouter.get('/:calendar/json', async (req: Request, res: Response) => {
let user = await UserService.checkSession(sessionId, sessionKey, ip);
// If no user was found, check if the password gives access to the calendar
if(user === null || !user.isActive) {
if (! await CredentialService.hasAccess(calendarName, sessionId, sessionKey, password, ip)) {
res.status(403).send({'message': 'You do not have access to the specified calendar.'});