1 package net.pterodactylus.sone.web.pages
3 import net.pterodactylus.sone.data.*
4 import net.pterodactylus.sone.main.*
5 import net.pterodactylus.sone.web.*
6 import net.pterodactylus.sone.web.page.*
7 import net.pterodactylus.util.template.*
10 * Base class for [SoneTemplatePage] implementations that require a logged in user.
12 abstract class LoggedInPage(pageTitleKey: String, webInterface: WebInterface, loaders: Loaders, templateRenderer: TemplateRenderer) :
13 SoneTemplatePage(webInterface, loaders, templateRenderer, pageTitleKey = pageTitleKey, requiresLogin = true) {
15 final override fun handleRequest(soneRequest: SoneRequest, templateContext: TemplateContext) {
16 handleRequest(soneRequest, getCurrentSone(soneRequest.toadletContext, false)!!, templateContext)
19 protected abstract fun handleRequest(soneRequest: SoneRequest, currentSone: Sone, templateContext: TemplateContext)