001/* 002 * Copyright 2010 Anyware Services 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016 017package org.ametys.web.pageaccess; 018 019import org.ametys.runtime.authentication.AccessDeniedException; 020 021/** 022 * Per-site policy of rendering of restricted pages.<br> 023 * <ul> 024 * <li>HIDDEN: restricted pages access will remain hidden for unauthorized front-office users. 025 * Technically, it means that the SitemapInputData and the Sitemap service will not generate SAX events for those pages. 026 * <b>This implies that the cache is disabled for sites with this policy.</b> 027 * Use it only for intranets or sites with less traffic. 028 * <li>DISPLAYED: restricted pages access will be displayed for everyone. When trying to go on one of these pages, an unauthorized user will get an {@link AccessDeniedException}. 029 * Technically, it means that the SitemapInputData and the Sitemap service will generate SAX events for those pages. Skins are then in charge of rendering restricted pages properly. 030 * </ul> 031 */ 032public enum RestrictedPagePolicy 033{ 034 /** 035 * Restricted pages access will remain hidden for unauthorized front-office users. 036 */ 037 HIDDEN, 038 /** 039 * Restricted pages access will be displayed for everyone. 040 */ 041 DISPLAYED 042}