From: David ‘Bombe’ Roden Date: Thu, 26 Jul 2012 04:47:51 +0000 (+0200) Subject: Add base admin page. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=06c77dbfc8fc57cba9a472f67778e6c2e8212d7a;p=demoscenemusic.git Add base admin page. --- 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; + } + +}