From 06c77dbfc8fc57cba9a472f67778e6c2e8212d7a Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Thu, 26 Jul 2012 06:47:51 +0200 Subject: [PATCH] Add base admin page. --- .../demoscenemusic/page/admin/AdminBasePage.java | 61 ++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 src/main/java/net/pterodactylus/demoscenemusic/page/admin/AdminBasePage.java diff --git a/src/main/java/net/pterodactylus/demoscenemusic/page/admin/AdminBasePage.java b/src/main/java/net/pterodactylus/demoscenemusic/page/admin/AdminBasePage.java new file mode 100644 index 0000000..040e641 --- /dev/null +++ b/src/main/java/net/pterodactylus/demoscenemusic/page/admin/AdminBasePage.java @@ -0,0 +1,61 @@ +/* + * DemosceneMusic - AdminBasePage.java - Copyright © 2012 David Roden + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package net.pterodactylus.demoscenemusic.page.admin; + +import net.pterodactylus.demoscenemusic.core.Core; +import net.pterodactylus.demoscenemusic.data.User; +import net.pterodactylus.demoscenemusic.page.BasePage; +import net.pterodactylus.util.template.Template; +import net.pterodactylus.util.template.TemplateContextFactory; + +/** + * Base page for all admin pages. + * + * @author David ‘Bombe’ Roden + */ +public class AdminBasePage extends BasePage { + + /** + * Creates a new admin page. + * + * @param core + * The core + * @param templateContextFactory + * The template context factory + * @param template + * The template to render + * @param pageName + * The name of the page + */ + public AdminBasePage(Core core, TemplateContextFactory templateContextFactory, Template template, String pageName) { + super(core, templateContextFactory, template, pageName); + } + + // + // BASEPAGE METHODS + // + + /** + * {@inheritDoc} + */ + @Override + protected int getRequiredUserLevel() { + return User.LEVEL_GOD; + } + +} -- 2.7.4