import net.pterodactylus.util.template.TemplateContext
import java.util.logging.Level
import java.util.logging.Logger
+import javax.inject.Inject
/**
* The “create Sone” page lets the user create a new Sone.
*/
-class CreateSonePage(template: Template, webInterface: WebInterface):
- SoneTemplatePage("createSone.html", template, "Page.CreateSone.Title", webInterface, false) {
+class CreateSonePage @Inject constructor(template: Template, webInterface: WebInterface):
+ SoneTemplatePage("createSone.html", webInterface, template, "Page.CreateSone.Title") {
private val logger = Logger.getLogger(CreateSonePage::class.java.name)
}
override fun isEnabled(toadletContext: ToadletContext) =
- if (webInterface.core.preferences.isRequireFullAccess && !toadletContext.isAllowedFullAccess) {
+ if (webInterface.core.preferences.requireFullAccess && !toadletContext.isAllowedFullAccess) {
false
} else {
(getCurrentSone(toadletContext) == null) || (webInterface.core.localSones.size == 1)