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