001    /**
002     * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.security.membershippolicy;
016    
017    import com.liferay.portal.kernel.util.UnicodeProperties;
018    import com.liferay.portal.model.Group;
019    import com.liferay.portlet.asset.model.AssetCategory;
020    import com.liferay.portlet.asset.model.AssetTag;
021    
022    import java.io.Serializable;
023    
024    import java.util.List;
025    import java.util.Map;
026    
027    /**
028     * @author Roberto D??az
029     * @author Sergio Gonz??lez
030     */
031    public class DummySiteMembershipPolicy extends BaseSiteMembershipPolicy {
032    
033            @Override
034            public void checkMembership(
035                    long[] userIds, long[] addGroupIds, long[] removeGroupIds) {
036            }
037    
038            @Override
039            public boolean isMembershipAllowed(long userId, long groupId) {
040                    return true;
041            }
042    
043            @Override
044            public boolean isMembershipRequired(long userId, long groupId) {
045                    return false;
046            }
047    
048            @Override
049            public boolean isRoleAllowed(long userId, long groupId, long roleId) {
050                    return true;
051            }
052    
053            @Override
054            public boolean isRoleRequired(long userId, long groupId, long roleId) {
055                    return false;
056            }
057    
058            @Override
059            public void propagateMembership(
060                    long[] userIds, long[] addGroupIds, long[] removeGroupIds) {
061            }
062    
063            @Override
064            public void verifyPolicy(Group group) {
065            }
066    
067            @Override
068            public void verifyPolicy(
069                    Group group, Group oldGroup, List<AssetCategory> oldAssetCategories,
070                    List<AssetTag> oldAssetTags,
071                    Map<String, Serializable> oldExpandoAttributes,
072                    UnicodeProperties oldTypeSettingsProperties) {
073            }
074    
075    }