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            public void checkMembership(
034                    long[] userIds, long[] addGroupIds, long[] removeGroupIds) {
035            }
036    
037            @Override
038            public boolean isMembershipAllowed(long userId, long groupId) {
039                    return true;
040            }
041    
042            @Override
043            public boolean isMembershipRequired(long userId, long groupId) {
044                    return false;
045            }
046    
047            @Override
048            public boolean isRoleAllowed(long userId, long groupId, long roleId) {
049                    return true;
050            }
051    
052            @Override
053            public boolean isRoleRequired(long userId, long groupId, long roleId) {
054                    return false;
055            }
056    
057            public void propagateMembership(
058                    long[] userIds, long[] addGroupIds, long[] removeGroupIds) {
059            }
060    
061            @Override
062            public void verifyPolicy(Group group) {
063            }
064    
065            public void verifyPolicy(
066                    Group group, Group oldGroup, List<AssetCategory> oldAssetCategories,
067                    List<AssetTag> oldAssetTags,
068                    Map<String, Serializable> oldExpandoAttributes,
069                    UnicodeProperties oldTypeSettingsProperties) {
070            }
071    
072    }